From 68c70d93a6ff25548218a2a0764dd5c4c4031f50 Mon Sep 17 00:00:00 2001 From: psh Date: Mon, 22 Jan 2024 09:40:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8wms=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/service/impl/WmsToAcsServiceImpl.java | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index e4c70f8..7992cf2 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -74,16 +74,20 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { throw new WDKException("任务号不能为空"); } TaskDto taskDto = taskService.findByCodeFromCache(task_code); - String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue(); - if (StrUtil.equals(cancelTaskCheck, "1")) { - taskService.cancelNoSendWms(taskDto.getTask_id()); - } else if (StrUtil.equals(cancelTaskCheck, "0")) { + if(taskDto==null){ + log.info("任务已完成或取消"); + }else { +// if (StrUtil.equals(cancelTaskCheck, "1")) { +// taskService.cancelNoSendWms(taskDto.getTask_id()); +// } else if (StrUtil.equals(cancelTaskCheck, "0")) { Instruction inst = instructionService.findByTaskcode(task_code); - if (inst == null) { - taskService.cancelNoSendWms(taskDto.getTask_id()); - } else { - throw new RuntimeException("指令正在执行中,操作失败!"); + if (inst != null) { + instructionService.cancel(inst.getInstruction_id()); } + taskService.cancelNoSendWms(taskDto.getTask_id()); +// } else { +// throw new RuntimeException("指令正在执行中,操作失败!"); +// } } }