java110
2023-04-07 bc8750e55ae35a58e3e282198fe47d13e8727023
service-common/src/main/java/com/java110/common/cmd/chargeMachine/StopChargeCmd.java
@@ -61,7 +61,6 @@
        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区信息");
        Assert.hasKeyAndValue(reqJson, "machineId", "未包含充电桩");
        Assert.hasKeyAndValue(reqJson, "portId", "未包含插槽");
        Assert.hasKeyAndValue(reqJson, "orderId", "未包含订单号");
        String userId = context.getReqHeaders().get("user-id");
        Assert.hasLength(userId, "用户不存在");
@@ -98,7 +97,6 @@
        chargeMachinePortDto.setPortId(reqJson.getString("portId"));
        List<ChargeMachinePortDto> chargeMachinePortDtos = chargeMachinePortV1InnerServiceSMOImpl.queryChargeMachinePorts(chargeMachinePortDto);
        String orderId = reqJson.getString("orderId");
        //调用充电桩充电
        ResultVo resultVo = chargeCoreImpl.stopCharge(chargeMachineDtos.get(0), chargeMachinePortDtos.get(0));
@@ -115,10 +113,11 @@
//        chargeMachineOrderPo.setOrderId(orderId);
//        chargeMachineOrderV1InnerServiceSMOImpl.updateChargeMachineOrder(chargeMachineOrderPo);
        ChargeMachinePortPo chargeMachinePortPo = new ChargeMachinePortPo();
        chargeMachinePortPo.setPortId(reqJson.getString("portId"));
        chargeMachinePortPo.setState(ChargeMachinePortDto.STATE_FREE);
        chargeMachinePortV1InnerServiceSMOImpl.updateChargeMachinePort(chargeMachinePortPo);
        //todo  这里不操作 以设备通知为主
//        ChargeMachinePortPo chargeMachinePortPo = new ChargeMachinePortPo();
//        chargeMachinePortPo.setPortId(reqJson.getString("portId"));
//        chargeMachinePortPo.setState(ChargeMachinePortDto.STATE_FREE);
//        chargeMachinePortV1InnerServiceSMOImpl.updateChargeMachinePort(chargeMachinePortPo);
        context.setResponseEntity(ResultVo.createResponseEntity(resultVo));
    }