| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.account.AccountDto; |
| | | import com.java110.dto.chargeMachine.ChargeMachineDto; |
| | | import com.java110.dto.chargeMachineOrder.ChargeMachineOrderDto; |
| | | import com.java110.dto.chargeMachinePort.ChargeMachinePortDto; |
| | | import com.java110.dto.user.UserDto; |
| | | import com.java110.dto.chargeMachine.ChargeMachinePortDto; |
| | | import com.java110.intf.acct.IAccountInnerServiceSMO; |
| | | import com.java110.intf.common.IChargeMachineOrderV1InnerServiceSMO; |
| | | import com.java110.intf.common.IChargeMachinePortV1InnerServiceSMO; |
| | | import com.java110.intf.common.IChargeMachineV1InnerServiceSMO; |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.po.chargeMachineOrder.ChargeMachineOrderPo; |
| | | import com.java110.po.chargeMachinePort.ChargeMachinePortPo; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | 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, "用户不存在"); |
| | |
| | | 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)); |
| | | |
| | |
| | | // 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)); |
| | | } |