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