From 5577021bbb56f9e83840e026a8a4dd428d926d66 Mon Sep 17 00:00:00 2001 From: pangshenghao Date: Thu, 15 Jun 2023 13:54:36 +0800 Subject: [PATCH] =?UTF-8?q?03=E5=8F=96=E8=AF=B7=E6=B1=8207=E6=94=BE?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=97=A0=E9=9C=80=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) 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 e0f135b..eae0fca 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,30 +173,30 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic return; } - 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()); - map.put("status", "1"); - map.put("device_code", inst.getStart_point_code()); - map.put("task_code", inst.getTask_code()); - req.add(map); - HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); - if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { - JSONObject resp = JSONObject.parseObject(httpResponse.body()); - if (resp.getInteger("status") == 200) { - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); - } else { - log.warn("指令号:{},acs请求wms取货申请成功,wms不允许agv申请取货,未反馈agv允许取货", inst.getInstruction_code()); - } - } else { - log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); - } - } else { +// 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()); +// map.put("status", "1"); +// map.put("device_code", inst.getStart_point_code()); +// map.put("task_code", inst.getTask_code()); +// req.add(map); +// HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); +// if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { +// JSONObject resp = JSONObject.parseObject(httpResponse.body()); +// if (resp.getInteger("status") == 200) { +// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); +// log.info("指令号:{},acs请求wms取货申请成功,wms允许agv申请取货,已反馈agv允许取货", inst.getInstruction_code()); +// } else { +// log.warn("指令号:{},acs请求wms取货申请成功,wms不允许agv申请取货,未反馈agv允许取货", inst.getInstruction_code()); +// } +// } else { +// log.warn("指令号:{},acs请求wms取货申请失败,连接被拒绝,未反馈agv允许取货", inst.getInstruction_code()); +// } +// } else { data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } +// } //取货完毕 //(需要WCS反馈) } else if (phase == 0x05) { @@ -291,30 +291,30 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic log.info("未找到关联编号{}对应的指令", ikey); return; } - 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()); - map.put("status", "3"); - map.put("device_code", inst.getNext_point_code()); - map.put("task_code", inst.getTask_code()); - req.add(map); - HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); - if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { - JSONObject resp = JSONObject.parseObject(httpResponse.body()); - if (resp.getInteger("status") == 200) { - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); - } else { - log.warn("指令号:{},acs请求wms放货申请成功,wms不允许agv申请放货,未反馈agv允许放货", inst.getInstruction_code()); - } - } else { - log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); - } - } else { +// 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()); +// map.put("status", "3"); +// map.put("device_code", inst.getNext_point_code()); +// map.put("task_code", inst.getTask_code()); +// req.add(map); +// HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); +// if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { +// JSONObject resp = JSONObject.parseObject(httpResponse.body()); +// if (resp.getInteger("status") == 200) { +// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); +// log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); +// } else { +// log.warn("指令号:{},acs请求wms放货申请成功,wms不允许agv申请放货,未反馈agv允许放货", inst.getInstruction_code()); +// } +// } else { +// log.warn("指令号:{},acs请求wms放货申请失败,连接被拒绝,未反馈agv允许放货", inst.getInstruction_code()); +// } +// } else { data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); - } +// } //放货完毕 //(需要WCS反馈) } else if (phase == 0x09) {