update 结算订单

This commit is contained in:
Guoqs
2024-08-12 13:38:02 +08:00
parent 7a3d3b3ec3
commit 402d628975
3 changed files with 5 additions and 1 deletions

View File

@@ -196,6 +196,7 @@ public abstract class AbstractProgramLogic implements InitializingBean {
BigDecimal orderAmount = new BigDecimal(data.getConsumptionAmount()).setScale(2, RoundingMode.HALF_UP);
// 付款金额 - 实际消费金额,如果有剩余,需要走退款操作 当使用余额支付时payAmount = principalPay + giftPay
BigDecimal payAmount = orderBasicInfo.getPayAmount();
logger.info("结算订单:【{}】, 支付金额:{}, 消费金额:{}", orderCode, payAmount, orderAmount);
// 有时候充电桩到达金额停止充电会多出一点金额比如实际需要充50元的电充电桩传来的消费金额为50.01元,在后台记录的时候需要舍去
if (orderAmount.compareTo(payAmount) > 0) {