mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-02 21:18:05 +08:00
如果算出来的电费金额大于总消费金额,则电费金额等于总消费金额
This commit is contained in:
@@ -757,6 +757,10 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
totalElectricityAmount = totalElectricityAmount.add(multiply);
|
totalElectricityAmount = totalElectricityAmount.add(multiply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 如果算出来的电费金额大于总消费金额,则电费金额等于总消费金额
|
||||||
|
if (totalElectricityAmount.compareTo(orderAmount) > 0) {
|
||||||
|
totalElectricityAmount = orderAmount;
|
||||||
|
}
|
||||||
orderDetail.setTotalElectricityAmount(totalElectricityAmount);
|
orderDetail.setTotalElectricityAmount(totalElectricityAmount);
|
||||||
orderDetail.setTotalServiceAmount(orderAmount.subtract(totalElectricityAmount));
|
orderDetail.setTotalServiceAmount(orderAmount.subtract(totalElectricityAmount));
|
||||||
orderDetail.setTotalUsedElectricity(new BigDecimal(data.getTotalElectricity())); // 总用电量
|
orderDetail.setTotalUsedElectricity(new BigDecimal(data.getTotalElectricity())); // 总用电量
|
||||||
|
|||||||
Reference in New Issue
Block a user