From e6f45fc0c1952671e1afebb62fbc5a4c97217fb7 Mon Sep 17 00:00:00 2001 From: psh Date: Tue, 5 Dec 2023 15:49:40 +0800 Subject: [PATCH] fix --- .../org/nl/acs/device/device_driver/DriverTypeEnum.java | 2 +- .../basedriver/standard_inspect_site/ItemProtocol.java | 6 ++++++ .../StandardInspectSiteDeviceDriver.java | 5 +++++ .../src/main/resources/config/application-dev.yml | 1 - 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java index 9ccda62..8e6177a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device/device_driver/DriverTypeEnum.java @@ -15,7 +15,7 @@ public enum DriverTypeEnum { STORAGE(3, "standard_storage", "标准版-货架", "storage"), - AUTODOOR(4, "standard_auto_door", "标准版-自动门", "auto_door"), + AUTODOOR(4, "standard_autodoor", "标准版-自动门", "autodoor"), AGV_NDC_ONE(5, "agv_ndc_one", "NDCAGV", "agv"), diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java index 1398148..d69980d 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/ItemProtocol.java @@ -21,6 +21,7 @@ public class ItemProtocol { public static String item_to_target = "to_target"; public static String item_to_task = "to_task"; public static String item_weight = "weight"; + public static String item_number = "number"; private StandardInspectSiteDeviceDriver driver; @@ -52,6 +53,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_task); } + public int getNumber() { + return this.getOpcIntegerValue(item_number); + } + public int getToCommand() { return this.getOpcIntegerValue(item_to_command); } @@ -91,6 +96,7 @@ public class ItemProtocol { list.add(new ItemDto(item_move, "光电开关信号", "DB600.B2")); list.add(new ItemDto(item_error, "报警信号", "DB600.B6")); list.add(new ItemDto(item_task, "任务号", "DB600.D8")); + list.add(new ItemDto(item_number, "数量","DB600.D10")); return list; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java index 3fe9dc0..c1fd1be 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_inspect_site/StandardInspectSiteDeviceDriver.java @@ -79,6 +79,9 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp String message = null; Boolean iserror = false; + int number = 0; + int last_number = 0; + boolean hasVehicle = false; boolean isReady = false; @@ -140,6 +143,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp move = this.itemProtocol.getMove(); task = this.itemProtocol.getTask(); hasGoods = this.itemProtocol.getMove(); + number = this.itemProtocol.getNumber(); if (move != last_move) { this.requireSucess = false; @@ -188,6 +192,7 @@ public class StandardInspectSiteDeviceDriver extends AbstractOpcDeviceDriver imp last_error = error; last_move = move; last_task = task; + last_number = number; } diff --git a/acs/nladmin-system/src/main/resources/config/application-dev.yml b/acs/nladmin-system/src/main/resources/config/application-dev.yml index a8e0fb7..3487fda 100644 --- a/acs/nladmin-system/src/main/resources/config/application-dev.yml +++ b/acs/nladmin-system/src/main/resources/config/application-dev.yml @@ -1,6 +1,5 @@ server: port: 8010 - http-port: 8011 tomcat: accept-count: 1000 max-connections: 10000