From 460c2df13adcc89c371c6fc0f80f12fa91c89289 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Fri, 10 Nov 2023 13:32:09 +0800 Subject: [PATCH] =?UTF-8?q?rev=20=E8=87=AA=E5=8A=A8=E9=97=A8=20=E6=89=8B?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardAutodoorDeviceDriver.java | 4 +-- .../service/impl/YkbkHandServiceImpl.java | 33 ++++++++++++++++++- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java index e221efe..6cbcc7f 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_autodoor/StandardAutodoorDeviceDriver.java @@ -122,10 +122,10 @@ public class StandardAutodoorDeviceDriver extends AbstractOpcDeviceDriver implem public synchronized String getStatus() { JSONObject jo = new JSONObject(); - if (action == 1 && mode == 2) { + if (action == 1) { jo.put("name", this.getDevice().getDevice_code()); jo.put("status", "OPEN"); - } else if (action == 2 && mode == 2) { + } else if (action == 2) { jo.put("name", this.getDevice().getDevice_code()); jo.put("status", "CLOSE"); } else { diff --git a/hd/nladmin-system/src/main/java/org/nl/hand/aykbk/service/impl/YkbkHandServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/hand/aykbk/service/impl/YkbkHandServiceImpl.java index 8901f4c..5ee0e50 100644 --- a/hd/nladmin-system/src/main/java/org/nl/hand/aykbk/service/impl/YkbkHandServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/hand/aykbk/service/impl/YkbkHandServiceImpl.java @@ -19,6 +19,7 @@ import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSit import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver; import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver; +import org.nl.acs.device_driver.standard_special_inspect_site.StandardSpecialInspectSiteDeviceDriver; import org.nl.acs.device_driver.ykbk_special.YkbkSpecialDeviceDriver; import org.nl.acs.instruction.service.InstructionService; import org.nl.acs.instruction.service.dto.Instruction; @@ -118,7 +119,8 @@ public class YkbkHandServiceImpl implements YkbkHandService { YkbkSpecialDeviceDriver ykbkSpecialDeviceDriver; //检测站点 StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver; - + //专机站点 + StandardSpecialInspectSiteDeviceDriver standardSpecialInspectSiteDeviceDriver; if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); @@ -207,6 +209,35 @@ public class YkbkHandServiceImpl implements YkbkHandService { jo.put("batch", standardInspectSiteDeviceDriver.getBatch()); jo.put("input_material", input_material); + } + + else if (device.getDeviceDriver() instanceof StandardSpecialInspectSiteDeviceDriver) { + standardSpecialInspectSiteDeviceDriver = (StandardSpecialInspectSiteDeviceDriver) device.getDeviceDriver(); + + if (StrUtil.equals(device.getIslock(), "true")) { + status = "3"; + move = "有任务"; + } else { + if (standardSpecialInspectSiteDeviceDriver.getHasGoods() == 0) { + status = "0"; + move = "无货"; + } else if (standardSpecialInspectSiteDeviceDriver.getHasGoods() == 1) { + status = "1"; + move = "有托盘"; + } else if (standardSpecialInspectSiteDeviceDriver.getHasGoods() == 2) { + status = "2"; + move = "有托盘有货"; + } + } + jo.put("material_type", standardSpecialInspectSiteDeviceDriver.getMaterial()); + jo.put("status_name", move); + jo.put("status", status); + jo.put("device_id", devicejo.optString("device_id")); + jo.put("device_code", devicejo.optString("device_code")); + jo.put("device_name", devicejo.optString("device_name")); + jo.put("allow_update", "1"); + jo.put("input_material", input_material); + } resultArr.add(jo); }