From ba0d4c179f06823e71c1cfcfcdd63c11cbef8b42 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 12 二月 2025 11:40:07 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java index 88a7fa5..83c902a 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java @@ -396,7 +396,7 @@ if(null != data){ //支付失败,删除无效的订单 String tradeStatus = data.getTradeStatus(); - if(tradeStatus.equals("TRADE_CLOSED")){ + if(null != tradeStatus && tradeStatus.equals("TRADE_CLOSED")){ this.removeById(tChargingOrder.getId()); } } @@ -599,6 +599,7 @@ if(null != data && data.getChargeNum() > 0){ //计算折扣 List<AccountingStrategyDetailOrder> list = accountingStrategyDetailOrderClient.getAllAccountingStrategyDetailOrder(chargingOrder.getId()).getData(); + list.get(list.size() - 1).setEndTime("23:59"); //将数据叠加两份,处理跨天的情况 list.addAll(list); boolean sta = false; @@ -2192,9 +2193,9 @@ UploadRealTimeMonitoringData uploadRealTimeMonitoringData = uploadRealTimeMonitoringDataClient.chargingOrderInfo(chargingOrder.getCode()).getData(); if(null != uploadRealTimeMonitoringData && null == chargingOrder.getEndMode()){ Integer soc = uploadRealTimeMonitoringData.getSoc(); - if(soc > 98){ + if(soc >= 98){ order.setEndMode(2); - }else if(order.getResidualAmount().compareTo(new BigDecimal(1)) <= 0){ + }else if(chargingOrder.getResidualAmount().compareTo(new BigDecimal(1)) <= 0){ order.setEndMode(3); }else{ order.setEndMode(0); -- Gitblit v1.7.1