diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java index e7b9d383..21c83f7d 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/ChargingController.java @@ -230,12 +230,16 @@ public class ChargingController { return R.fail("端口不在空闲或正常状态,稍后再试"); } if (CacheDataUtils.hori(gunkey)) return R.fail("请检查枪号是否正确,稍后再试"); + String orderkey = "order:".concat(startChargingData.getOrderNo()); +// String oldOrderKey = (String) cacheGun.get("orderkey"); +// if (oldOrderKey!=null && !oldOrderKey.equals(orderkey)) { +// return R.fail("端口正在充电"); +// } //todo delete oldOrderKey val? String skey = gunkey.concat(".seqhex"); String seq = seqHex(skey); byte[] msg = translateStart(startChargingData, seq); handler.sendClientBinary(msg); Integer balance = startChargingData.getBalance(); - String orderkey = "order:".concat(startChargingData.getOrderNo()); Map cacheOrder = REDIS.getCacheMap(orderkey); String pkey = "pile:".concat(pileNo); Map cachePile = REDIS.getCacheMap(pkey); diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java index 2f0b8624..a4b81530 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RealtimeDataLogic.java @@ -99,7 +99,7 @@ public class RealtimeDataLogic implements ServiceLogic { REDIS.setCacheMap(stationTermStatusKey, cacheTerminalStatusMap); Map cacheOrder = REDIS.getCacheMap(orderkey); List realtimeDataList = (List) cacheOrder.get("realtimeDataList"); - if (!orderNo.equals("00000000000000000000000000000000")) { + if (!orderNo.equals("00000000000000000000000000000000") && statusInt != 2) { if (realtimeDataList == null) { realtimeDataList = new ArrayList<>(); }