| | |
| | | package com.java110.common.cmd.chargeMachine; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.common.charge.IChargeCore; |
| | | import com.java110.core.annotation.Java110Cmd; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | |
| | | @Autowired |
| | | private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IChargeCore chargeCoreImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | super.validatePageInfo(reqJson); |
| | |
| | | if (count > 0) { |
| | | chargeMachineDtos = chargeMachineV1InnerServiceSMOImpl.queryChargeMachines(chargeMachineDto); |
| | | freshQrCodeUrl(chargeMachineDtos); |
| | | |
| | | // todo 查询设备是否在线 |
| | | queryMachineState(chargeMachineDtos); |
| | | } else { |
| | | chargeMachineDtos = new ArrayList<>(); |
| | | } |
| | |
| | | cmdDataFlowContext.setResponseEntity(responseEntity); |
| | | } |
| | | |
| | | private void queryMachineState(List<ChargeMachineDto> chargeMachineDtos) { |
| | | |
| | | if(chargeMachineDtos == null || chargeMachineDtos.size() < 1 || chargeMachineDtos.size() > 10){ |
| | | return ; |
| | | } |
| | | |
| | | chargeCoreImpl.queryChargeMachineState(chargeMachineDtos); |
| | | } |
| | | |
| | | /** |
| | | * 充电桩二维码 |
| | | * |