From 62b3381288c8b7e42fe3beaeadced0808cae35c3 Mon Sep 17 00:00:00 2001 From: ZZ Date: Mon, 6 Sep 2021 18:22:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E4=BD=99=E9=A2=9D=E4=B8=8E?= =?UTF-8?q?=E5=8F=8B=E5=A5=BD=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xhpc/pp/controller/ChargingController.java | 2 +- .../java/com/xhpc/pp/logic/RealtimeDataLogic.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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 915cf580..bd8aae44 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 @@ -217,7 +217,7 @@ public class ChargingController { if (!"空闲".equals(gunstatus)) { return R.fail("端口不在空闲或正常状态,稍后再试"); } - if (CacheDataUtils.hori(gunkey)) return R.fail("等待上一条指令响应"); + if (CacheDataUtils.hori(gunkey)) return R.fail("请检查终端号是否正确,稍后再试"); String skey = gunkey.concat(".seqhex"); String seq = seqHex(skey); byte[] msg = translateStart(startChargingData, seq); 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 56438e1d..e43e588c 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 @@ -105,13 +105,13 @@ public class RealtimeDataLogic implements ServiceLogic { Integer balance = (Integer) cacheOrder.get("balance"); CacheRealtimeData cacheRealtimeData = translate(realtimeData); balance -= cacheRealtimeData.getAmountCharged(); -// startChargingData.setBalance(balance); //todo make pile work then uncomment -// startChargingData.setLogicCardNo(cacheOrder.get("logicCardNo").toString()); -// startChargingData.setPhysicCardNo(cacheOrder.get("physicCardNo").toString()); -// startChargingData.setPileNo(cacheOrder.get("pileNo").toString()); -// startChargingData.setGunId(cacheOrder.get("gunId").toString()); + startChargingData.setBalance(balance); //todo make pile work then uncomment + startChargingData.setLogicCardNo(cacheOrder.get("logicCardNo").toString()); + startChargingData.setPhysicCardNo(cacheOrder.get("physicCardNo").toString()); + startChargingData.setPileNo(cacheOrder.get("pileNo").toString()); + startChargingData.setGunId(cacheOrder.get("gunId").toString()); Thread.sleep(300); -// chargingController.nativeRefreshBalance(startChargingData); + chargingController.nativeRefreshBalance(startChargingData); cacheRealtimeData.setCreateTime(DateUtil.now()); String lord = orderkey.concat(".lord"); REDIS.setCacheObject(lord, cacheRealtimeData);