From 7fe30fd48f32edd8e12944fb9a47b383fc1085a3 Mon Sep 17 00:00:00 2001 From: psh Date: Wed, 3 Jan 2024 16:49:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../amb/service/impl/HFHandServiceImpl.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/hand/amb/service/impl/HFHandServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/hand/amb/service/impl/HFHandServiceImpl.java index d787c43..04aac5b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/hand/amb/service/impl/HFHandServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/hand/amb/service/impl/HFHandServiceImpl.java @@ -686,9 +686,25 @@ public class HFHandServiceImpl implements HFHandService { Device nextDevice = deviceAppService.findDeviceByCode(acsTask.getNext_device_code()); startDevice.setIslock("false"); nextDevice.setIslock("false"); + } else if (type.equals("3")) { + //任务取消 + TaskService taskService = SpringContextHolder.getBean(TaskServiceImpl.class); + TaskDto acsTask = taskjo.toJavaObject(TaskDto.class); + InstructionService instructionservice = SpringContextHolder.getBean(InstructionServiceImpl.class); + InstructionDto instdto = instructionservice.findByTaskid(acsTask.getTask_id(), "instruction_status <2 "); + if (instdto != null) { + jo.put("code", "0"); + jo.put("desc", "有指令未完成!"); + jo.put("result", new JSONObject()); + return jo; + } + taskService.cancel(acsTask.getTask_id()); + Device startDevice = deviceAppService.findDeviceByCode(acsTask.getStart_device_code()); + Device nextDevice = deviceAppService.findDeviceByCode(acsTask.getNext_device_code()); + startDevice.setIslock("false"); + nextDevice.setIslock("false"); } - jo.put("code", "1"); jo.put("desc", "操作成功"); jo.put("result", new JSONObject());