update 优化计算订单日报

This commit is contained in:
2023-07-14 14:53:12 +08:00
parent 132ec764ae
commit 1258ab42eb

View File

@@ -2115,15 +2115,23 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
}
// 电费金额
totalElectricityAmount = totalElectricityAmount.add(vo.getTotalElectricityAmount());
BigDecimal e = vo.getTotalElectricityAmount() != null ? vo.getTotalElectricityAmount() : BigDecimal.ZERO;
totalElectricityAmount = totalElectricityAmount.add(e);
// 服务费金额
totalServiceAmount = totalServiceAmount.add(vo.getTotalServiceAmount());
BigDecimal serviceAmount = vo.getTotalServiceAmount() != null ? vo.getTotalServiceAmount() : BigDecimal.ZERO;
totalServiceAmount = totalServiceAmount.add(serviceAmount);
// 订单金额
totalOrderAmount = totalOrderAmount.add(new BigDecimal(orderAmount));
// 虚拟金额
totalVirtualAmount = totalVirtualAmount.add(new BigDecimal(vo.getVirtualAmount()));
String virtualAmount = StringUtils.isNotBlank(vo.getVirtualAmount()) ? vo.getVirtualAmount() : Constants.ZERO;
totalVirtualAmount = totalVirtualAmount.add(new BigDecimal(virtualAmount));
// 结算金额
totalSettleAmount = totalSettleAmount.add(new BigDecimal(vo.getSettleAmount()));
String settleAmount = StringUtils.isNotBlank(vo.getSettleAmount()) ? vo.getSettleAmount() : Constants.ZERO;
totalSettleAmount = totalSettleAmount.add(new BigDecimal(settleAmount));
}
// 计算报表