|
|
@ -493,15 +493,20 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp |
|
|
|
try { |
|
|
|
if (taskList.size() != 0) { |
|
|
|
for (TaskDto task : taskList) { |
|
|
|
log.warn("当前取消任务code为{}",task.getTask_code()); |
|
|
|
System.out.println("当前取消任务code为"+task.getTask_code()); |
|
|
|
Instruction inst = instructionService.findByTaskCodeFromCache(task.getTask_code()); |
|
|
|
if (ObjectUtil.isNotEmpty(inst)) { |
|
|
|
log.warn("当前取消指令id为{}",inst.getInstruction_id()); |
|
|
|
System.out.println("当前取消指令id为"+inst.getInstruction_id()); |
|
|
|
instructionService.cancel(inst.getInstruction_id()); |
|
|
|
} |
|
|
|
taskserver.cancel(task.getTask_id()); |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
e.printStackTrace(); |
|
|
|
log.error("取消指令异常{}",e,e.getMessage()); |
|
|
|
System.out.println("取消指令异常"+e.getMessage()); |
|
|
|
} |
|
|
|
writing(6); |
|
|
|
return true; |
|
|
|