Commit d3eb9951 authored by jiaorz's avatar jiaorz

新增订单延长还车费用明细

parent 728cf4e0
......@@ -8,6 +8,7 @@ public enum OrderViolateEnum {
BEFORE(1, "提前"),
AFTER(2, "延期"),
CHANGE(3, "更换还车公司"),
DELAY_VEHICLE(4, "延长还车不计免赔")
;
/**
* 编码
......
......@@ -112,6 +112,12 @@ public class OrderVehicleCrosstown {
@Column(name = "violate_amount_detail")
private String violateDetail;
/**
* 延期还车,不计免赔额计算
*/
@Column(name = "delay_vehicle_detail")
private String delayVehicleDetail;
/**
* 1、交车, 2、还车, 3、定损还车
*/
......
......@@ -33,6 +33,7 @@ public class DedDetailDTO {
//作为:DedDetail :2、车辆损坏 3、其他
//作为:violate_amount_detail 1--提前还车 2--延期还车 3--更换还车公司费用
//作为:delay_vehicle_detail
Integer type;
//小雨都不知道什么东西
......
......@@ -40,6 +40,8 @@ public class OrderPageVO extends BaseOrder {
private String positionName;
//订单违约金
private String dedDetailDTO;
//订单延长还车,不计免赔额
private String delayVehicleDetail;
/**
* 車輛編碼
*/
......
......@@ -348,6 +348,18 @@ public class OrderVehicleCrosstownBiz extends BaseBiz<OrderVehicaleCrosstownMapp
}
}
}
//延期扣除费用
if (StringUtils.isNotBlank(orderVehicleCrosstownDto.getDelayVehicleDetail())) {
JSONArray jsonArray = JSONArray.parseArray(orderVehicleCrosstownDto.getDelayVehicleDetail());
if (jsonArray != null && jsonArray.size() > 0) {
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject jsonObject = JSONObject.parseObject(jsonArray.get(i).toString());
if (jsonObject.getString("cost") != null) {
cost += Double.parseDouble(jsonObject.getString("cost"));
}
}
}
}
orderVehicleCrosstownDto.setUserLicenseImg(orderVehicleCrosstownDto.getLicenseImg());
//扣除费用,每次都是重新计算
BigDecimal amount = new BigDecimal(cost.toString()).divide(new BigDecimal("1"), 2, BigDecimal.ROUND_UP);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment