diff --git a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java index ede6c055..de317551 100644 --- a/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java +++ b/xhpc-modules/xhpc-order/src/main/java/com/xhpc/order/controller/XhpcStopChargingOrderController.java @@ -58,14 +58,14 @@ public class XhpcStopChargingOrderController extends BaseController { if(cacheMap!=null){ if(cacheMap.get("orderkey") !=null){ - String orderkey = cacheMap.get("orderkey").toString().substring(6); + String orderNumber = cacheMap.get("orderkey").toString().substring(6); + String orderkey = cacheMap.get("orderkey").toString(); - Map xhpcChargingPileById = xhpcChargeOrderService.getXhpcChargingPileById(chargingPileId); String version ="0A"; - if(xhpcChargingPileById.get("communicationProtocolVersion")!=null && !"".equals(xhpcChargingPileById.get("communicationProtocolVersion").toString())){ - version=xhpcChargingPileById.get("communicationProtocolVersion").toString(); + if(cacheMap.get("version") !=null){ + version =cacheMap.get("version").toString(); } - R r = powerPileService.stopCharging(orderkey, orderkey.substring(0,14), orderkey.substring(0,16), version); + R r = powerPileService.stopCharging(orderNumber, orderkey.substring(0,14), orderkey.substring(0,16), version); if(r.getCode()==200){ return AjaxResult.success("停止充电命令已下发");