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 1269d75b..0bc9d317 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 @@ -91,6 +91,7 @@ public class ChargingController { @PostMapping("charging/start") public R startCharging(@Validated @RequestBody StartChargingData startChargingData) { + //todo protocol versioning String pileNo = startChargingData.getPileNo(); String pkey = "pile:".concat(pileNo); Map cachePile = REDIS.getCacheMap(pkey); @@ -108,7 +109,7 @@ public class ChargingController { String gunkey = "gun:".concat(pileNo).concat(startChargingData.getGunId()); String skey = gunkey.concat(".seqhex"); String seq = seqHex(skey); - String rateModelMsg = "680E".concat(seq).concat("0058").concat(pileNo) + String rateModelMsg = "685E".concat(seq).concat("0058").concat(pileNo) .concat(String.format("%04X", stationRateModelId)) .concat(rateModel); rateModelMsg = rateModelMsg.concat(CRCCalculator.calcCrc(rateModel)); 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 fa8ddccf..cf25db63 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 @@ -66,9 +66,9 @@ public class PileController { if (handler != null) { try { handler.sendClientBinary(HexUtils.toBytes(msg)); - r = R.ok("费率模型已下发"); + r = R.ok("费率模型已下发,请再次启动充电"); } catch (IOException e) { - r = R.fail("费率模型下发失败:".concat(e.getMessage())); + r = R.fail("费率模型下发失败:".concat(e.getMessage()).concat(".无法启动充电")); } } else { r = R.fail("费率模型下发失败,充电桩离线");