|
|
@ -70,6 +70,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public CancelTaskResponse cancelFromWms(List<CancelTaskRequest> reqs) throws Exception { |
|
|
|
log.info("cancelFromWms--------------:输入参数:" + reqs); |
|
|
|
ParamService paramService = SpringContextHolder.getBean(ParamService.class); |
|
|
|
InstructionService instructionService = SpringContextHolder.getBean(InstructionService.class); |
|
|
|
CancelTaskResponse response = new CancelTaskResponse(); |
|
|
@ -84,7 +85,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
} |
|
|
|
TaskDto taskDto = taskService.findByCodeFromCache(task_code); |
|
|
|
String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue(); |
|
|
|
|
|
|
|
if(taskDto==null){ |
|
|
|
log.info("任务已完成或取消"); |
|
|
|
}else { |
|
|
|
// if (StrUtil.equals(cancelTaskCheck, "1")) {
|
|
|
|
// taskService.cancelNoSendWms(taskDto.getTask_id());
|
|
|
|
// } else if (StrUtil.equals(cancelTaskCheck, "0")) {
|
|
|
@ -92,10 +95,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { |
|
|
|
if (inst != null) { |
|
|
|
instructionService.cancel(inst.getInstruction_id()); |
|
|
|
} |
|
|
|
taskService.cancelNoSendWms(taskDto.getTask_id()); |
|
|
|
taskService.cancelNoSendWms(taskDto.getTask_id()); |
|
|
|
// } else {
|
|
|
|
// throw new RuntimeException("指令正在执行中,操作失败!");
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|