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

修改代码

parent 7866479a
......@@ -109,12 +109,25 @@ public class OrderRefundController extends BaseController<OrderRefundBiz,OrderRe
String key = RENT_REFUND;
//违约金封顶 租车身份价 * 2天
BigDecimal topAmount = vehicleItem.getUnitPrice().multiply(new BigDecimal(2+ ""));
BigDecimal deductionAmount = orderAccountBiz.calculateDeduction(vehicleItem.getBuyAmount()
, orderPageVO.getOrderRentVehicleDetail().getStartTime() - System.currentTimeMillis()
, DictionaryKey.APP_ORDER+ "_"+ key
, refundDescBuilder);
totalDeductAmount = deductionAmount;
deductionAmount = deductionAmount.setScale(2, RoundingMode.HALF_UP);
if(topAmount.compareTo(deductionAmount) > 0) {
totalDeductAmount = totalDeductAmount.add(deductionAmount);
topAmount = topAmount.subtract(deductionAmount);
}else {
totalDeductAmount = totalDeductAmount.add(topAmount);
deductionAmount = topAmount;
topAmount = BigDecimal.ZERO;
}
// totalDeductAmount = deductionAmount;
totalRefundAmount = orderPageVO.getRealAmount().subtract(deductionAmount);
refundDesc = refundDescBuilder.toString();
}
......
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