From 7f5bc999cc48272c1967c9acdf856631e708a710 Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Sat, 8 Apr 2023 14:42:53 +0800 Subject: [PATCH] =?UTF-8?q?fix=20agv=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../agv/ndcone/AgvNdcOneDeviceDriver.java | 8 ++++---- .../StandardOrdinarySiteDeviceDriver.java | 16 +++++++++------- 2 files changed, 13 insertions(+), 11 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 83adf35..60c22a7 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 @@ -417,10 +417,10 @@ public class AgvNdcOneDeviceDriver extends AbstractDeviceDriver implements Devic if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) { standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver(); -// standardOrdinarySiteDeviceDriver.setAgvphase(phase); -// standardOrdinarySiteDeviceDriver.setIndex(index); -// standardOrdinarySiteDeviceDriver.setInst(inst); - data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); + standardOrdinarySiteDeviceDriver.setAgvphase(phase); + standardOrdinarySiteDeviceDriver.setIndex(index); + standardOrdinarySiteDeviceDriver.setInst(inst); +// data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); } } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java index 70654b0..5c5fe46 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/standard_ordinary_site/StandardOrdinarySiteDeviceDriver.java @@ -7,6 +7,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.agv.server.AgvService; import org.nl.acs.agv.server.NDCAgvService; +import org.nl.acs.auto.run.OneNDCSocketConnectionAutoRun; import org.nl.acs.device.service.DeviceService; import org.nl.acs.device_driver.DeviceDriver; import org.nl.acs.device_driver.RouteableDeviceDriver; @@ -127,10 +128,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple inst.setExecute_status("1"); instructionService.update(inst); byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); + OneNDCSocketConnectionAutoRun.write(data); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); agvphase = 0; index = 0; inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); } else { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); @@ -142,11 +144,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple inst.setExecute_status("2"); instructionService.update(inst); byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); + OneNDCSocketConnectionAutoRun.write(data); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); agvphase = 0; index = 0; inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); } else { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); @@ -158,11 +160,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple inst.setExecute_status("5"); instructionService.update(inst); byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); + OneNDCSocketConnectionAutoRun.write(data); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); agvphase = 0; index = 0; inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); } else { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈"); } @@ -173,11 +175,11 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple inst.setExecute_status("6"); instructionService.update(inst); byte[] data = agvService.sendAgvOneModeInst(agvphase, index, 0); -// OneNDCSocketConnectionAutoRun.write(data); + OneNDCSocketConnectionAutoRun.write(data); + logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); agvphase = 0; index = 0; inst = null; - logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "反馈成功"); } else { logServer.deviceExecuteLog(this.device_code, "", "", "agvphase:" + agvphase + "等待反馈");