From 8b7fc2fa68a0f59307fda0039c60c9f11493986d Mon Sep 17 00:00:00 2001 From: pangshenghao Date: Thu, 15 Jun 2023 15:23:43 +0800 Subject: [PATCH] =?UTF-8?q?1.05=E5=8F=96=E5=AE=8C=E6=88=9009=E6=94=BE?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E9=BB=98=E8=AE=A4=E9=9C=80=E8=A6=81=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=EF=BC=8CreqWms=E5=8F=82=E6=95=B0=E6=97=A0=E7=94=A8=20?= =?UTF-8?q?2.httpResponse.body=E7=A9=BA=E6=8C=87=E9=92=88=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C=E6=97=A0=E6=AD=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 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 eae0fca..bb85b4d 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 @@ -234,8 +234,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()); @@ -245,19 +245,14 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic 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); - } +// } else { +// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); +// } //到达放货点 //(需要WCS反馈) } else if (phase == 0x07) { @@ -303,7 +298,7 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic // HttpResponse httpResponse = acsToWmsService.feedAgvTaskStatus(req); // if (ObjectUtil.isNotEmpty(httpResponse) && httpResponse.getStatus() == 200) { // JSONObject resp = JSONObject.parseObject(httpResponse.body()); -// if (resp.getInteger("status") == 200) { + // if (resp.getInteger("status") == 200) { // data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); // log.info("指令号:{},acs请求wms放货申请成功,wms允许agv申请放货,已反馈agv允许放货", inst.getInstruction_code()); // } else { @@ -349,8 +344,8 @@ 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")) { +// 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()); @@ -365,9 +360,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反馈)