Commit 7778ec8f authored by 周健威's avatar 周健威

Merge branch 'feature-delay-add' into dev

parents 2b386328 2bb3cc4b
......@@ -8,7 +8,7 @@ import java.util.List;
import java.util.Map;
public enum DeductionTypeEnum {
//账款类型 1--违约金;2--消费金额;3--赔偿金(定损);4--违章相关
//账款类型 1--违约金;2--消费金额;3--赔偿金(定损);4--违章相关;5--其他
VIOLATE_CANCEL(101, "提前取消违约金"),
VIOLATE_ADVANCE(102, "提前还车违约金"),
VIOLATE_DELAY(103, "延迟还车违约金"),
......@@ -17,6 +17,7 @@ public enum DeductionTypeEnum {
DAMAGES(301, "赔偿金(定损)"),
VIOLATE_TRAFFIC_DEDUCT(401, "违章扣款"),
VIOLATE_TRAFFIC_KEEP(402, "违章扣款保留金"),
OTHER_DELAY_SAFE(501, "其他费用-延迟用车不记免赔"),
;
/**
* 编码
......
......@@ -580,6 +580,24 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
private void handleCrosstownDelayDetail(OrderVehicleCrosstown crosstown, OrderAccountDetail oad, CancelStartedVO csv) {
try{
if(null != crosstown.getDelayVehicleDetail()) {
//修改代码
List<DedDetailDTO> vios = JSONUtil.toList(JSONUtil.parseArray(crosstown.getViolateDetail()), DedDetailDTO.class);
//DedDetailDTO vio = JSONUtil.toBean(crosstown.getViolateDetail(), DedDetailDTO.class);
for(DedDetailDTO vio : vios) {
if(OrderViolateEnum.DELAY_VEHICLE.getCode().equals(vio.getType())) {
handleViolateDetail(DeductionTypeEnum.OTHER_DELAY_SAFE, oad, vio, csv);
}
}
}
}catch (Exception e) {
log.error("crosstown.getDelayVehicleDetail() crosstown id :"+crosstown.getId() +" 转换失败");
}
}
private void handleViolateDetail(DeductionTypeEnum dte, OrderAccountDetail oad, DedDetailDTO vio, CancelStartedVO csv) {
Boolean flag = Boolean.FALSE;
for(OrderAccountDeduction deduction : oad.getDeductions()) {
......
......@@ -112,6 +112,8 @@ public class OrderCalculateBiz {
//处理不记免赔违约金
if(useDays > 0) {
inProgressVO.setDelayAddPriceVO(orvd.obtainDelayAddDetail());
OrderAccountDeduction violateDeduction = orderAccountBiz.initDeduction(orvd.obtainDelayAddDetail().getDelayDamageSafeAmount(), "", DeductionTypeEnum.OTHER_DELAY_SAFE, OrderAccountDeduction.ORIGIN_DEPOSIT);
oad.getDeductions().add(violateDeduction);
}
inProgressVO.setMetaOrderUsedAmount(vehicleItemDTO.getUsedAmount(useDays));
......
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