Browse Source

允许wms取消任务

master
psh 1 year ago
parent
commit
68c70d93a6
  1. 20
      acs/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java

20
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")) {
Instruction inst = instructionService.findByTaskcode(task_code);
if (inst == null) {
taskService.cancelNoSendWms(taskDto.getTask_id());
if(taskDto==null){
log.info("任务已完成或取消");
}else {
throw new RuntimeException("指令正在执行中,操作失败!");
// 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) {
instructionService.cancel(inst.getInstruction_id());
}
taskService.cancelNoSendWms(taskDto.getTask_id());
// } else {
// throw new RuntimeException("指令正在执行中,操作失败!");
// }
}
}

Loading…
Cancel
Save