From 86e60297652f37239c9a976db20108c573427c9d Mon Sep 17 00:00:00 2001 From: psh Date: Wed, 27 Dec 2023 16:27:07 +0800 Subject: [PATCH] fix --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 84 +++++++++---------- 1 file changed, 42 insertions(+), 42 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 284f407..7af05fb 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 @@ -951,28 +951,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver(); if (driver.getMode() != 0) { - if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) - ) { - JSONObject form = new JSONObject(); - form.put("vehicle_code", ""); - form.put("status", 5); - form.put("device_code", device_code); - form.put("task_code", ""); - JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ - add(form); - }}); - if (20000 == result.getIntValue("code")) { - flag = true; - } else { - String resultMessage = result.getString("message"); - this.message = resultMessage; - String message = resultMessage + "无法开门。"; - driver.setMessage(message); - logServer.deviceExecuteLog(device_code, "", "", message); - } - } else { +// if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) +// ) { +// JSONObject form = new JSONObject(); +// form.put("vehicle_code", ""); +// form.put("status", 5); +// form.put("device_code", device_code); +// form.put("task_code", ""); +// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ +// add(form); +// }}); +// if (20000 == result.getIntValue("code")) { +// flag = true; +// } else { +// String resultMessage = result.getString("message"); +// this.message = resultMessage; +// String message = resultMessage + "无法开门。"; +// driver.setMessage(message); +// logServer.deviceExecuteLog(device_code, "", "", message); +// } +// } else { flag = true; - } +// } } else { String message = "自动门未联机,无法开门。"; driver.setMessage(message); @@ -1025,28 +1025,28 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic StandardAutoDoorDeviceDriver driver = (StandardAutoDoorDeviceDriver) device.getDeviceDriver(); if (driver.getMode() != 0) { - if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) - ) { - JSONObject form = new JSONObject(); - form.put("vehicle_code", ""); - form.put("status", 6); - form.put("device_code", device_code); - form.put("task_code", ""); - JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ - add(form); - }}); - if (20000 == result.getIntValue("code")) { - flag = true; - } else { - String resultMessage = result.getString("message"); - this.message = resultMessage; - String message = resultMessage + "无法关门。"; - driver.setMessage(message); - logServer.deviceExecuteLog(device_code, "", "", message); - } - } else { +// if ("1".equals(paramService.findByCode(AcsConfig.HASWMS).getValue()) +// ) { +// JSONObject form = new JSONObject(); +// form.put("vehicle_code", ""); +// form.put("status", 6); +// form.put("device_code", device_code); +// form.put("task_code", ""); +// JSONObject result = acsToWmsService.feedAgvTaskStatus(new JSONArray() {{ +// add(form); +// }}); +// if (20000 == result.getIntValue("code")) { +// flag = true; +// } else { +// String resultMessage = result.getString("message"); +// this.message = resultMessage; +// String message = resultMessage + "无法关门。"; +// driver.setMessage(message); +// logServer.deviceExecuteLog(device_code, "", "", message); +// } +// } else { flag = true; - } +// } } else { String message = "自动门未联机,无法关门。"; driver.setMessage(message);