更新远程更新桩程序
This commit is contained in:
parent
a11070cd04
commit
bfce06b561
@ -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);
|
||||
|
||||
@ -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<String, Object> 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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user