From ef60b381d2c9e7fad9f126538b03d1b9c59cd352 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 12 二月 2025 16:09:11 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile

---
 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 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..d4479db 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;
@@ -1212,7 +1213,7 @@
 			endTime2 = split[1];
 		}
 		PageInfo<ChargingOrderVO> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize());
-		PageInfo<ChargingOrderVO> pageInfo1 = new PageInfo<>(1,9999999);
+		PageInfo<ChargingOrderVO> pageInfo1 = new PageInfo<>(1,999999999);
 
 		if (StringUtils.hasLength(dto.getPhone())){
 			List<Long> data = appUserClient.getUserIdsByPhone(dto.getPhone()).getData();
@@ -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