diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java index a7683ae..149aa78 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/auto/run/OneNDCSocketConnectionAutoRun.java @@ -14,6 +14,8 @@ import org.nl.acs.instruction.service.impl.InstructionServiceImpl; import org.nl.acs.log.service.DeviceExecuteLogService; import org.nl.acs.opc.Device; import org.nl.acs.opc.DeviceAppService; +import org.nl.acs.task.service.TaskService; +import org.nl.acs.task.service.impl.TaskServiceImpl; import org.nl.modules.system.service.ParamService; import org.nl.modules.system.service.impl.ParamServiceImpl; import org.nl.modules.wql.util.SpringContextHolder; @@ -76,6 +78,7 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class); DeviceService deviceService = SpringContextHolder.getBean(DeviceService.class); DeviceExecuteLogService logServer = SpringContextHolder.getBean(DeviceExecuteLogService.class); + TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class); ip = paramService.findByCode(AcsConfig.AGVURL).getValue(); port = Integer.parseInt(paramService.findByCode(AcsConfig.AGVPORT).getValue()); @@ -131,9 +134,9 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { } if (ikey != 0) { inst = instructionService.findByCodeFromCache(String.valueOf(ikey)); - if (ObjectUtil.isEmpty(inst)) { - inst = instructionService.findByCode(String.valueOf(ikey)); - } +// if (ObjectUtil.isEmpty(inst)) { +// inst = instructionService.findByCode(String.valueOf(ikey)); +// } } if (!ObjectUtil.isEmpty(link_inst)) { link_flag = true; @@ -178,10 +181,10 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable { else if (phase == 0xFF) { if (!ObjectUtil.isEmpty(inst)) { - if (!ObjectUtil.isEmpty(inst)) { - instructionService.cancelNOSendAgv(inst.getInstruction_id()); - } + instructionService.cancelNOSendAgv(inst.getInstruction_id()); + taskService.cancel(inst.getTask_id()); } + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); } else { diff --git a/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue b/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue index e5cf3a9..6dc3782 100644 --- a/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue +++ b/acs/nladmin-ui/src/views/acs/history/instRecord/index.vue @@ -104,6 +104,7 @@ 就绪 执行中 完成 + 取消 diff --git a/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue b/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue index 72722e3..a8f24dc 100644 --- a/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue +++ b/acs/nladmin-ui/src/views/acs/history/taskRecord/index.vue @@ -237,6 +237,7 @@ 就绪 执行中 完成 + 取消 diff --git a/acs/nladmin-ui/src/views/acs/history/taskTreeRecord/index.vue b/acs/nladmin-ui/src/views/acs/history/taskTreeRecord/index.vue index 4db587a..9321ad4 100644 --- a/acs/nladmin-ui/src/views/acs/history/taskTreeRecord/index.vue +++ b/acs/nladmin-ui/src/views/acs/history/taskTreeRecord/index.vue @@ -94,6 +94,7 @@ 就绪 执行中 完成 + 取消