mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-12 03:09:48 +08:00
优化orderSplitRecord中金额计算方式
This commit is contained in:
@@ -491,10 +491,16 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
orderInfoDetailVO.setRefundAmount(orderBasicInfo.getRefundAmount());
|
orderInfoDetailVO.setRefundAmount(orderBasicInfo.getRefundAmount());
|
||||||
orderInfoDetailVO.setRefundStatus(orderBasicInfo.getRefundStatus());
|
orderInfoDetailVO.setRefundStatus(orderBasicInfo.getRefundStatus());
|
||||||
orderInfoDetailVO.setTotalUsedElectricity(orderDetail.getTotalUsedElectricity());
|
orderInfoDetailVO.setTotalUsedElectricity(orderDetail.getTotalUsedElectricity());
|
||||||
orderInfoDetailVO.setTotalOrderAmount(orderDetail.getTotalOrderAmount());
|
// 总订单金额
|
||||||
orderInfoDetailVO.setTotalElectricityAmount(orderDetail.getTotalElectricityAmount());
|
// orderInfoDetailVO.setTotalOrderAmount(orderDetail.getTotalOrderAmount());
|
||||||
|
orderInfoDetailVO.setTotalOrderAmount(orderBasicInfo.getSettleAmount()); // 使用订单主表中已经保留两位小数后的结算金额
|
||||||
|
// 总电费金额
|
||||||
|
// orderInfoDetailVO.setTotalElectricityAmount(orderDetail.getTotalElectricityAmount());
|
||||||
|
orderInfoDetailVO.setTotalElectricityAmount(orderDetail.getTotalElectricityAmount().setScale(2, RoundingMode.DOWN));
|
||||||
orderInfoDetailVO.setDiscountElectricityAmount(orderDetail.getDiscountElectricityAmount());
|
orderInfoDetailVO.setDiscountElectricityAmount(orderDetail.getDiscountElectricityAmount());
|
||||||
orderInfoDetailVO.setTotalServiceAmount(orderDetail.getTotalServiceAmount());
|
// 总服务费金额
|
||||||
|
// orderInfoDetailVO.setTotalServiceAmount(orderDetail.getTotalServiceAmount());
|
||||||
|
orderInfoDetailVO.setTotalServiceAmount(orderInfoDetailVO.getTotalOrderAmount().subtract(orderDetail.getTotalElectricityAmount()));
|
||||||
orderInfoDetailVO.setDiscountServiceAmount(orderDetail.getDiscountServiceAmount());
|
orderInfoDetailVO.setDiscountServiceAmount(orderDetail.getDiscountServiceAmount());
|
||||||
orderInfoDetailVO.setSharpPrice(orderDetail.getSharpPrice());
|
orderInfoDetailVO.setSharpPrice(orderDetail.getSharpPrice());
|
||||||
orderInfoDetailVO.setSharpUsedElectricity(orderDetail.getSharpUsedElectricity());
|
orderInfoDetailVO.setSharpUsedElectricity(orderDetail.getSharpUsedElectricity());
|
||||||
|
|||||||
Reference in New Issue
Block a user