From aca615312b20f3dfcbe3042acae58cc32ce47a4c Mon Sep 17 00:00:00 2001 From: gengby <858962040@qq.com> Date: Thu, 29 Dec 2022 16:07:54 +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 --- .../device_driver/maGang/MaGangConveyorDeviceDriver.java | 2 +- .../nl/modules/quartz/task/QueryXZAgvDeviceStatus.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java index 4008f8a..2199740 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/maGang/MaGangConveyorDeviceDriver.java @@ -294,7 +294,7 @@ public class MaGangConveyorDeviceDriver extends AbstractOpcDeviceDriver implemen String opcservcerid = this.getDevice().getOpc_server_id(); Server server = ReadUtil.getServer(opcservcerid); Map itemMap = new HashMap(); - itemMap.put(param, value); + itemMap.put(param, Integer.parseInt(value)); ReadUtil.write(itemMap, server); log.info("设备号{},kep点位名称{},下发信号{}", this.getDevice().getDevice_code(), param, value); } diff --git a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java index 5a01e58..8f79835 100644 --- a/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java +++ b/acs/nladmin-system/src/main/java/org/nl/modules/quartz/task/QueryXZAgvDeviceStatus.java @@ -102,10 +102,10 @@ public class QueryXZAgvDeviceStatus { String kepStatus = String.valueOf(maGangAgvDeviceDriver.getStatus()); String kepType = String.valueOf(maGangAgvDeviceDriver.getType()); if (!StrUtil.equals(kepStatus, status)) { - maGangAgvDeviceDriver.writing("status", status); + maGangAgvDeviceDriver.writing("status", Integer.parseInt(status)); } if (!StrUtil.equals(kepType, task_type)) { - maGangAgvDeviceDriver.writing("type", task_type); + maGangAgvDeviceDriver.writing("type", Integer.parseInt(task_type)); } maGangAgvDeviceDriver.writing("x_coordinate", hisFormat.format(x)); maGangAgvDeviceDriver.writing("y_coordinate", hisFormat.format(y)); @@ -135,7 +135,7 @@ public class QueryXZAgvDeviceStatus { MaGangLedDeviceDriver maGangLedDeviceDriver; if (device.getDeviceDriver() instanceof MaGangLedDeviceDriver) { maGangLedDeviceDriver = (MaGangLedDeviceDriver) device.getDeviceDriver(); - maGangLedDeviceDriver.writing("D01", "1"); + maGangLedDeviceDriver.writing("D01", 1); } } else { String name = jsonObject.getString("name"); @@ -146,7 +146,7 @@ public class QueryXZAgvDeviceStatus { MaGangLedDeviceDriver maGangLedDeviceDriver; if (device.getDeviceDriver() instanceof MaGangLedDeviceDriver) { maGangLedDeviceDriver = (MaGangLedDeviceDriver) device.getDeviceDriver(); - maGangLedDeviceDriver.writing("D01", "0"); + maGangLedDeviceDriver.writing("D01", 0); } } }