diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java index 33d9045..e0f135b 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/agv/ndcone/AgvNdcOneDeviceDriver.java @@ -173,8 +173,8 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } -// Object reqWms = device.getExtraValue().get("reqWms"); -// if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) { + Object reqWms = device.getExtraValue().get("reqWms"); + if (ObjectUtil.isNotEmpty(reqWms) && reqWms.toString().equals("true")) { JSONArray req = new JSONArray(); JSONObject map = new JSONObject(); map.put("vehicle_code", inst.getVehicle_code()); @@ -194,9 +194,9 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic } else { log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); } -// } else { -// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); -// } + } else { + data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + } //取货完毕 //(需要WCS反馈) } else if (phase == 0x05) { 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 23b1bb6..fc74800 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 @@ -84,16 +84,18 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { } 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 (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.cancelNOSendAgv(inst.getInstruction_id()); } - } + taskService.cancelNoSendWms(taskDto.getTask_id()); +// } else { +// throw new RuntimeException("指令正在执行中,操作失败!"); +// } }