This commit is contained in:
2024-01-17 19:04:20 +08:00
parent 208f122f32
commit b19dba0a65

View File

@@ -3013,6 +3013,13 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
sendStartCharging = false;
}
// 修改订单
orderInfo.setPayMode(dto.getPayMode());
orderInfo.setPayStatus(OrderPayStatusEnum.paid.getValue());
BigDecimal orderPayAmount = orderInfo.getPayAmount() == null ? BigDecimal.ZERO : orderInfo.getPayAmount();
orderInfo.setPayAmount(orderPayAmount.add(payAmount));
orderInfo.setPayTime(new Date());
if (sendStartCharging) {
String pileSn = orderInfo.getPileSn();
// 发送启动充电指令前,再次下发计费模板
@@ -3027,13 +3034,6 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
logger.info("订单:{}支付成功, 发送启动指令", dto.getOrderCode());
}
// 修改订单
orderInfo.setPayMode(dto.getPayMode());
orderInfo.setPayStatus(OrderPayStatusEnum.paid.getValue());
BigDecimal orderPayAmount = orderInfo.getPayAmount() == null ? BigDecimal.ZERO : orderInfo.getPayAmount();
orderInfo.setPayAmount(orderPayAmount.add(payAmount));
orderInfo.setPayTime(new Date());
if (OrderStatusEnum.STAY_RETROACTIVE_AMOUNT.getValue().equals(orderInfo.getOrderStatus())) {
// 如果订单状态是待补缴,表示已经停止充电了,需要补缴费用,补缴完成订单状态改为订单完成,设置结算时间
orderInfo.setOrderStatus(OrderStatusEnum.ORDER_COMPLETE.getValue());