diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java index fd02bf47..e62e7a9a 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/service/impl/XhpcChargeOrderServiceImpl.java @@ -511,10 +511,6 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar return r; } - //获取桩信息 - Map xhpcChargingPileById = - xhpcChargeOrderMapper.getXhpcChargingPileById(xhpcTerminal.getChargingPileId(),null); - //启动充电 //订单流水号 终端号+年月日时分秒+自增4位 共32位 Date date = Calendar.getInstance().getTime(); @@ -525,11 +521,7 @@ public class XhpcChargeOrderServiceImpl extends BaseService implements IXhpcChar startChargingData.setOrderNo(orderNo); startChargingData.setPileNo(xhpcTerminal.getPileSerialNumber()); startChargingData.setGunId(xhpcTerminal.getSerialNumber().substring(14)); - if (xhpcChargingPileById.get("communicationProtocolVersion") != null && !"".equals(xhpcChargingPileById.get("communicationProtocolVersion").toString())) { - startChargingData.setVersion(xhpcChargingPileById.get("communicationProtocolVersion").toString()); - } else { - startChargingData.setVersion("0A"); - } + startChargingData.setVersion("0A"); //桩、平台(最小的) 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 8879f1c5..49e7f87f 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 @@ -302,7 +302,7 @@ public class ChargingController { String gunkey = "gun:".concat(connectorId); String skey = gunkey.concat(".seqhex"); String seq = seqHex(skey); - byte[] msg = translateStop(connectorId, version, seq); + byte[] msg = translateStop(connectorId, seq); if (!handler.isOpen()) { log.error("send message failed. [{}]({}) connection lost", handler.getName(), pileNo); removeHandler(pileNo); @@ -349,13 +349,11 @@ public class ChargingController { return HexUtils.toBytes(msg); } - private byte[] translateStop(String connectorId, String version, String seq) { + private byte[] translateStop(String connectorId, String seq) { byte[] data = new byte[0]; data = ArrayUtils.addAll(data, HexUtils.toBytes("680C".concat(seq).concat("0036"))); - if (default_version.equals(version)) { - data = ArrayUtils.addAll(data, HexUtils.toBytes(connectorId)); - } + data = ArrayUtils.addAll(data, HexUtils.toBytes(connectorId)); String msg = HexUtils.toHex(data); msg = msg.concat(CRCCalculator.calcCrc(msg)); log.debug("stop charging, send msg to terminal ({}) >>>> {}", connectorId, msg);