允许wms取消任务
This commit is contained in:
@@ -74,16 +74,20 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
|||||||
throw new WDKException("任务号不能为空");
|
throw new WDKException("任务号不能为空");
|
||||||
}
|
}
|
||||||
TaskDto taskDto = taskService.findByCodeFromCache(task_code);
|
TaskDto taskDto = taskService.findByCodeFromCache(task_code);
|
||||||
String cancelTaskCheck = paramService.findByCode(AcsConfig.CANCELTASKCHECK).getValue();
|
if(taskDto==null){
|
||||||
if (StrUtil.equals(cancelTaskCheck, "1")) {
|
log.info("任务已完成或取消");
|
||||||
taskService.cancelNoSendWms(taskDto.getTask_id());
|
}else {
|
||||||
} else if (StrUtil.equals(cancelTaskCheck, "0")) {
|
// if (StrUtil.equals(cancelTaskCheck, "1")) {
|
||||||
|
// taskService.cancelNoSendWms(taskDto.getTask_id());
|
||||||
|
// } else if (StrUtil.equals(cancelTaskCheck, "0")) {
|
||||||
Instruction inst = instructionService.findByTaskcode(task_code);
|
Instruction inst = instructionService.findByTaskcode(task_code);
|
||||||
if (inst == null) {
|
if (inst != null) {
|
||||||
taskService.cancelNoSendWms(taskDto.getTask_id());
|
instructionService.cancel(inst.getInstruction_id());
|
||||||
} else {
|
|
||||||
throw new RuntimeException("指令正在执行中,操作失败!");
|
|
||||||
}
|
}
|
||||||
|
taskService.cancelNoSendWms(taskDto.getTask_id());
|
||||||
|
// } else {
|
||||||
|
// throw new RuntimeException("指令正在执行中,操作失败!");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user