|
|
@ -55,7 +55,12 @@ public class QueryXZAgvTaskStatus { |
|
|
|
String state = one.getString("state"); |
|
|
|
if (!StrUtil.isEmpty(one.getString("vehicle"))) { |
|
|
|
String carno = one.getString("vehicle"); |
|
|
|
inst.setCarno(carno); |
|
|
|
if (ObjectUtil.isEmpty(inst.getCarno())) { |
|
|
|
inst.setCarno(carno); |
|
|
|
instructionService.update(inst); |
|
|
|
TaskDto taskDto = taskService.findByCode(inst.getTask_code()); |
|
|
|
taskService.update(taskDto); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 已创建=CREATED,
|
|
|
@ -72,22 +77,16 @@ public class QueryXZAgvTaskStatus { |
|
|
|
if (inst != null) { |
|
|
|
inst.setInstruction_status("1"); |
|
|
|
instructionService.update(inst); |
|
|
|
TaskDto taskDto = taskService.findByCode(inst.getTask_code()); |
|
|
|
taskService.update(taskDto); |
|
|
|
} |
|
|
|
} else if ("FINISHED".equals(state)) { |
|
|
|
if (inst != null) { |
|
|
|
inst.setInstruction_status("2"); |
|
|
|
instructionService.finish(inst); |
|
|
|
TaskDto taskDto = taskService.findByCode(inst.getTask_code()); |
|
|
|
taskService.update(taskDto); |
|
|
|
} |
|
|
|
} else if ("STOPPED".equals(state) || "FAILED".equals(state) || "Error".equals(state)) { |
|
|
|
if (inst != null) { |
|
|
|
inst.setInstruction_status("1"); |
|
|
|
instructionService.update(inst); |
|
|
|
TaskDto taskDto = taskService.findByCode(inst.getTask_code()); |
|
|
|
taskService.update(taskDto); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|