From ee6fd716bc6a077cd80241746dba72c4a9acc836 Mon Sep 17 00:00:00 2001 From: yanps Date: Wed, 20 Dec 2023 18:23:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=86=85=E5=8C=85=E9=97=B4=E8=A1=8C?= =?UTF-8?q?=E6=9E=B6=E4=BB=BB=E5=8A=A1=E8=A2=AB=E8=BE=93=E9=80=81=E7=BA=BF?= =?UTF-8?q?=E7=BB=99=E4=B8=8B=E5=8F=91=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CasingStationConveyorDeviceDriver.java | 18 ++++++++++++++---- .../SiemensConveyorDeviceDriver.java | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java index c0ae8f29f..8594c266a 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/casing_station/CasingStationConveyorDeviceDriver.java @@ -127,6 +127,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i String message = null; String device_code; + String remark = ""; @Override public Device getDevice() { @@ -208,7 +209,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i logServer.deviceExecuteLog(this.device_code, "", "", "信号qty:" + last_qty + "->" + qty); } - if (move != 0 && task > 0 ) { + if (move != 0 && task > 0) { update_instruction_status(); } @@ -248,6 +249,14 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i //申请套管校验 // apply_for_casing_inspection(material1, material2); bushingSucess(); + } else if (move != 1) { + remark += "套管工位没有货"; + } else if (task < 1) { + remark += "纸管库的任务号为空"; + } else if (task1 < 1) { + remark += "行架任务为空"; + } else if (requireSucess) { + remark += "requrieSucess为" + requireSucess; } break; default: @@ -411,15 +420,15 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i } else if (this.getMode() == 1) { mode = "单机"; } else if (this.getMode() == 2) { - mode = "联机"; + mode = "联机"; } else if (this.getMode() == 3) { mode = "运行中"; } else if (this.getMode() == 4) { mode = "套管完成"; } - if(this.getMove() ==0){ + if (this.getMove() == 0) { move = "无货"; - }else if(this.getMove() == 1){ + } else if (this.getMove() == 1) { move = "有托盘"; } jo.put("device_name", this.getDevice().getDevice_name()); @@ -431,6 +440,7 @@ public class CasingStationConveyorDeviceDriver extends AbstractOpcDeviceDriver i jo.put("material1", material1); jo.put("material2", material2); jo.put("isOnline", this.getIsonline()); + jo.put("message", ObjectUtil.isNotEmpty(remark)?"反馈套管失败的原因:"+remark:remark); return jo; } diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java index dcf3e6ebb..1b185d01f 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/basedriver/siemens_conveyor/SiemensConveyorDeviceDriver.java @@ -843,7 +843,7 @@ public class SiemensConveyorDeviceDriver extends AbstractOpcDeviceDriver impleme return false; } //当起点为行架任务的时候不需要请求下发 - if (StrUtil.equals(inst.getInstruction_type(), "6")) { + if (StrUtil.equals(inst.getInstruction_type(), "6") || StrUtil.equals(inst.getInstruction_type(),"9")) { return false; } Device nextdevice = deviceAppservice.findDeviceByCode(inst.getNext_device_code());