Commit f14c1510 authored by 周健威's avatar 周健威

修改代码

parent 759ab4ae
......@@ -342,10 +342,11 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
);
//设置定损金额
csv.setDamagesAmount(crosstown.getDeductionCost());
if(crosstown.getDeductionCost().compareTo(BigDecimal.ZERO) > 0) {
String handleDedRefundDesc = "";
handleDedRefundDesc = handleDed(crosstown, handleDedRefundDesc, csv);
if(csv.getDamagesAmount().compareTo(BigDecimal.ZERO) > 0) {
oad.getDeductions().add(
initDeduction(crosstown.getDeductionCost(), "定损赔偿金", DeductionTypeEnum.DAMAGES, OrderAccountDeduction.ORIGIN_DEPOSIT)
initDeduction(crosstown.getDeductionCost(), handleDedRefundDesc, DeductionTypeEnum.DAMAGES, OrderAccountDeduction.ORIGIN_DEPOSIT)
);
}
......@@ -361,7 +362,7 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
//crosstown.getRestDeposit().add(crosstown.getDeductionCost()).subtract(illegalReserve);
String refundDesc = "退还押金:"+ refundAmont.toString()+ "(已扣除 违章预备金:"+ illegalReserve.toString();
refundDesc = handleDed(crosstown, refundDesc);
refundDesc += handleDedRefundDesc;
refundDesc += ")";
refundTrigger(orderMQDTO, orderMQDTO.getOrderRentVehicleDetail(), illegalReserve, originalRefundAmount, refundAmont, refundDesc, RefundStatusEnum.RESIDUE_ILLEGAL.getCode(), AccountTypeEnum.OUT_PART_DEPOSIT, oad);
......@@ -397,12 +398,13 @@ public class OrderAccountBiz extends BaseBiz<OrderAccountMapper,OrderAccount> {
}
}
private String handleDed(OrderVehicleCrosstown crosstown, String refundDesc) {
private String handleDed(OrderVehicleCrosstown crosstown, String refundDesc, CancelStartedVO csv) {
try{
if(null != crosstown.getDedDetail()) {
List<DedDetailDTO> dddList = JSONUtil.toList(JSONUtil.parseArray(crosstown.getDedDetail()), DedDetailDTO.class);
for(DedDetailDTO ddd : dddList) {
refundDesc += ", "+ ddd.getDeductions()+ ":"+ ddd.getCost();
csv.setDamagesAmount(csv.getDamagesAmount().add(ddd.getCost()));
}
}
}catch (Exception e) {
......
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