更新
This commit is contained in:
@@ -28,19 +28,24 @@ public class QueryMagicAgvTaskStatus {
|
|||||||
AgvService agvService;
|
AgvService agvService;
|
||||||
|
|
||||||
|
|
||||||
public void run() throws Exception {
|
public void run() {
|
||||||
|
|
||||||
List<Instruction> instList = instructionService.findAllInstFromCache();
|
List<Instruction> instList = instructionService.findAllInstFromCache();
|
||||||
log.info("instList:{}", instList.size());
|
log.info("instList:{}", instList.size());
|
||||||
if (instList.size() > 0) {
|
if (instList.size() > 0) {
|
||||||
for (int i = 0; i < instList.size(); i++) {
|
for (int i = 0; i < instList.size(); i++) {
|
||||||
Instruction inst = instList.get(i);
|
Instruction inst = instList.get(i);
|
||||||
|
if (!inst.getSend_status().equals("1")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//指令执行状态
|
||||||
|
try {
|
||||||
String instcode = inst.getInstruction_code();
|
String instcode = inst.getInstruction_code();
|
||||||
HttpResponse response = agvService.queryAgvInstStatus(instcode);
|
HttpResponse response = agvService.queryAgvInstStatus(instcode);
|
||||||
JSONObject jo = JSONObject.fromObject(response.body());
|
JSONObject jo = JSONObject.fromObject(response.body());
|
||||||
if (MapUtil.isEmpty(jo)) continue;
|
if (MapUtil.isEmpty(jo)) continue;
|
||||||
//反馈结果状态
|
//反馈结果状态
|
||||||
log.info("instcode:" + instcode + "," + jo.toString());
|
log.info("instcode:" + instcode + "," + jo.toString());
|
||||||
//指令执行状态
|
|
||||||
String state = jo.getString("state");
|
String state = jo.getString("state");
|
||||||
String processingVehicle = "";
|
String processingVehicle = "";
|
||||||
//正在执行指令agv车号
|
//正在执行指令agv车号
|
||||||
@@ -105,8 +110,11 @@ public class QueryMagicAgvTaskStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("未查询到相关任务号");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user