From aed949553204782c9ec7dc7fb8201b5e00370462 Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Mon, 13 Feb 2023 10:02:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../standard_rgv/ItemProtocol.java | 18 +++++++------- .../standard_rgv/StandardRGVDeviceDriver.java | 24 +++++++++---------- .../standard_rgv/Standard_RGVDefination.java | 2 +- .../service/impl/StageActorServiceImpl.java | 16 ++++++------- .../resources/config/application-prod.yml | 2 +- .../src/main/resources/config/application.yml | 2 +- 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/ItemProtocol.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/ItemProtocol.java index fc2fec4..0af14b7 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/ItemProtocol.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/ItemProtocol.java @@ -13,7 +13,7 @@ public class ItemProtocol { public static String item_heartbeat = "heartbeat"; public static String item_mode = "mode"; - public static String item_move = "move"; + //public static String item_move = "move"; public static String item_action = "action"; public static String item_walk_y = "walk_y"; public static String item_container_type = "container_type"; @@ -40,9 +40,9 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_mode); } - public int getMove() { - return this.getOpcIntegerValue(item_move); - } +// public int getMove() { +// return this.getOpcIntegerValue(item_move); +// } public int getWalk_y() { return this.getOpcIntegerValue(item_walk_y); @@ -84,10 +84,10 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_to_container_type); } - //是否有货 - public int hasGoods(int move) { - return move; - } +// //是否有货 +// public int hasGoods(int move) { +// return move; +// } Boolean isonline; @@ -108,7 +108,7 @@ public class ItemProtocol { ArrayList list = new ArrayList(); list.add(new ItemDto(item_heartbeat, "心跳", "DB600.B0")); list.add(new ItemDto(item_mode, "工作状态", "DB600.B2", Boolean.valueOf(true))); - list.add(new ItemDto(item_move, "光电开关信号", "DB600.B3")); +// list.add(new ItemDto(item_move, "光电开关信号", "DB600.B3")); list.add(new ItemDto(item_action, "动作信号", "DB600.B4")); list.add(new ItemDto(item_walk_y, "行走列", "DB600.B5")); list.add(new ItemDto(item_container_type, "托盘类型", "DB600.B6")); diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/StandardRGVDeviceDriver.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/StandardRGVDeviceDriver.java index 7e481d6..18eef5b 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/StandardRGVDeviceDriver.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/StandardRGVDeviceDriver.java @@ -71,7 +71,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements int mode = 0; int error = 0; - int move = 0; +// int move = 0; int task = 0; int action = 0; int container_type = 0; @@ -79,13 +79,13 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements int walk_y = 0; int last_mode = 0; int last_error = 0; - int last_move = 0; +// int last_move = 0; int last_task = 0; int last_action = 0; int last_container_type = 0; int last_walk_y = 0; Boolean isonline = true; - int hasGoods = 0; +// int hasGoods = 0; String message = null; Boolean iserror = false; @@ -119,21 +119,21 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements device_code = this.getDeviceCode(); mode = this.itemProtocol.getMode(); error = this.itemProtocol.getError(); - move = this.itemProtocol.getMove(); + //move = this.itemProtocol.getMove(); walk_y = this.itemProtocol.getWalk_y(); container_type = this.itemProtocol.getContainer_type(); action = this.itemProtocol.getAction(); task = this.itemProtocol.getTask(); - hasGoods = this.itemProtocol.getMove(); +// hasGoods = this.itemProtocol.getMove(); if (mode != last_mode) { this.execute_log.setResource(this.device_code, this.device.getDevice_name()); this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode); } - if (move != last_move) { - this.execute_log.setResource(this.device_code, this.device.getDevice_name()); - this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move); - } +// if (move != last_move) { +// this.execute_log.setResource(this.device_code, this.device.getDevice_name()); +// this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move); +// } if (error != last_error) { this.execute_log.setResource(this.device_code, this.device.getDevice_name()); this.execute_log.log("设备:" + device_code + ",last_error -> error:" + last_error + "->" + error); @@ -175,7 +175,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements return; case 2: //申请任务 - if (mode == 2 && walk_y == 1 && move == 0 && !applySucess ) { + if (mode == 2 && walk_y == 1 /*&& move == 0*/ && !applySucess ) { instruction_apply(); } @@ -194,7 +194,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements } - if ( action == 4 && move == 0 && task > 0) { + if ( action == 4 /*&& move == 0*/ && task > 0) { //inst_message inst = instructionService.findByCodeFromCache(String.valueOf(task)); if (inst != null) { @@ -210,7 +210,7 @@ public class StandardRGVDeviceDriver extends AbstractOpcDeviceDriver implements last_mode = mode; last_error = error; - last_move = move; +// last_move = move; last_task = task; } diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/Standard_RGVDefination.java b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/Standard_RGVDefination.java index bf3b6a6..a404ef1 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/Standard_RGVDefination.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/device_driver/standard_rgv/Standard_RGVDefination.java @@ -58,7 +58,7 @@ public class Standard_RGVDefination implements OpcDeviceDriverDefination { List list = new ArrayList(); list.add(new ItemDto(ItemProtocol.item_heartbeat, "心跳", "DB600.B0")); list.add(new ItemDto(ItemProtocol.item_mode, "工作状态", "DB600.B2", true)); - list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B3")); +// list.add(new ItemDto(ItemProtocol.item_move, "光电开关信号", "DB600.B3")); list.add(new ItemDto(ItemProtocol.item_action, "动作信号", "DB600.B4")); list.add(new ItemDto(ItemProtocol.item_walk_y, "行走列", "DB600.B5")); list.add(new ItemDto(ItemProtocol.item_container_type, "托盘类型", "DB600.B6")); diff --git a/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java b/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java index 73adeb0..f356e02 100644 --- a/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java +++ b/hd/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java @@ -950,17 +950,17 @@ public class StageActorServiceImpl implements StageActorService { } else if (standardRGVDeviceDriver.getMode() == 2) { mode = "联机"; } - if (standardRGVDeviceDriver.getMove() == 0) { - move = "无货"; - } else if (standardRGVDeviceDriver.getMove() == 1) { - move = "有货"; - } else if (standardRGVDeviceDriver.getMove() == 2) { - move = "有托盘有货"; - } +// if (standardRGVDeviceDriver.getMove() == 0) { +// move = "无货"; +// } else if (standardRGVDeviceDriver.getMove() == 1) { +// move = "有货"; +// } else if (standardRGVDeviceDriver.getMove() == 2) { +// move = "有托盘有货"; +// } obj.put("devicede_name", standardRGVDeviceDriver.getDevice().getDevice_name()); jo.put("mode", mode); jo.put("move", move); - jo.put("hasGoods", standardRGVDeviceDriver.getHasGoods()); +// jo.put("hasGoods", standardRGVDeviceDriver.getHasGoods()); jo.put("isOnline", standardRGVDeviceDriver.getIsonline()); jo.put("error", standardRGVDeviceDriver.getError()); jo.put("isError", standardRGVDeviceDriver.getIserror()); diff --git a/hd/nladmin-system/src/main/resources/config/application-prod.yml b/hd/nladmin-system/src/main/resources/config/application-prod.yml index a3bf6e3..1b3a9f6 100644 --- a/hd/nladmin-system/src/main/resources/config/application-prod.yml +++ b/hd/nladmin-system/src/main/resources/config/application-prod.yml @@ -8,7 +8,7 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:njyf_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true + url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:zgln_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} password: ${DB_PWD:123456} # 初始连接数 diff --git a/hd/nladmin-system/src/main/resources/config/application.yml b/hd/nladmin-system/src/main/resources/config/application.yml index 1733121..2e814bc 100644 --- a/hd/nladmin-system/src/main/resources/config/application.yml +++ b/hd/nladmin-system/src/main/resources/config/application.yml @@ -2,7 +2,7 @@ spring: freemarker: check-template-location: false profiles: - active: dev + active: prod jackson: time-zone: GMT+8 data: