From bfce06b5612e5a42c84c1552ae17e5628b181156 Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Mon, 1 Aug 2022 17:39:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=BF=9C=E7=A8=8B=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=A1=A9=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xhpc/pp/controller/PileController.java | 2 +- .../main/java/com/xhpc/pp/logic/RemoteUpgradeDataLogic.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/PileController.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/PileController.java index 5b9c67e4..4dfe0340 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/PileController.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/controller/PileController.java @@ -305,7 +305,7 @@ public class PileController { } int runFlag = charging ? 2: 1; try { - String rsmsg = RemoteUpgradeDataLogic.translate(pileNo, "0094", + String rsmsg = RemoteUpgradeDataLogic.translate(pileNo, "0", 0L, "0", "0", "0", runFlag); diff --git a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RemoteUpgradeDataLogic.java b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RemoteUpgradeDataLogic.java index db44b07a..605a1c96 100644 --- a/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RemoteUpgradeDataLogic.java +++ b/xhpc-modules/xhpc-power-pile/src/main/java/com/xhpc/pp/logic/RemoteUpgradeDataLogic.java @@ -44,7 +44,7 @@ public class RemoteUpgradeDataLogic implements ServiceLogic { return new ServiceResult(null, ServiceResult.FAIL, json); } - String resultStr = translate(pileNo, "0094", "0", 0L, "0", "0", "0", 2); + String resultStr = translate(pileNo, "0", 0L, "0", "0", "0", 2); String remark = "充电桩主动下发远程更新"; XhpcDeviceMessage deviceMessage = new XhpcDeviceMessage(); @@ -57,14 +57,14 @@ public class RemoteUpgradeDataLogic implements ServiceLogic { return new ServiceResult(HexUtils.toBytes(resultStr), ServiceResult.OK); } - public static String translate(String pileNo, String svc, String remoteHost, Long port, String ftpUserName, String ftpPassword, String upgradeUrl, int runFlag) { + public static String translate(String pileNo, String remoteHost, Long port, String ftpUserName, String ftpPassword, String upgradeUrl, int runFlag) { String skey = "pile:".concat(pileNo).concat(".seqhex"); Map cachePile = REDIS.getCacheMap("pile:".concat(pileNo)); Long pileType = Long.parseLong(cachePile.get("equipmentType") + ""); // 桩型号(01-直流, 02-交流) Long pilePower = new Double((double)cachePile.get("power")).longValue(); // 桩功率 - String resultStr = "6862".concat(seqHex(skey)).concat(svc) + String resultStr = "6862".concat(seqHex(skey)).concat("0094") .concat(pileNo).concat(String.format("%02X", pileType)).concat(String.format("%04X", pilePower)) .concat(stringToAscii(remoteHost, 16)).concat(String.format("%02X", port)) .concat(stringToAscii(ftpUserName, 16)).concat(stringToAscii(ftpPassword, 16))