From d8fb4b38736d0c7b3277ee87289bd72bea155b95 Mon Sep 17 00:00:00 2001 From: ls <1793460677@qq.com> Date: Tue, 31 Dec 2024 08:30:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20=E6=BB=A1=E5=85=A5=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E6=A0=87=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardStackerDeviceDriver.java | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java index a5876d2cd..c5c64cc5d 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/stacker/standard_stacker/StandardStackerDeviceDriver.java @@ -103,6 +103,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme private boolean stopReceiveTask = false; + /** + * 异常处理请求标示位 + */ + private boolean error_request = false; + /** * 心跳 */ @@ -288,6 +293,11 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme Boolean requireSucess = false; + /** + * 满入空出成功标记 + */ + Boolean errorRequireSucess = false; + /** * 当前指令 */ @@ -347,6 +357,9 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme clearWrite(); } } + if (!error.equals(last_error) && error == 0){ + errorRequireSucess = false; + } // 更新指令状态 if (mode == 3 && task > 0 && command == 1 && error == 0) { @@ -393,7 +406,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme if (mode != 3 || requireSucess) { message = "one_message7"; } else { - if (error != 0) { + if (error != 0 && !errorRequireSucess) { erroBlock(); } List list = new ArrayList(); @@ -738,7 +751,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme } if (type.equals(StandarStirageErroEnum.BLOCK_IN.getType()) || type.equals(StandarStirageErroEnum.FILL.getType())) { - updateData2(poinCode, point, split, vehicleCode); +// updateData2(poinCode, point, split, vehicleCode); List list = new ArrayList(); String x = point.getExtraValue().get("x").toString(); String y = split[1]; @@ -759,12 +772,13 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme errorInst = checkInst(); } } catch (Exception e) { - this.requireSucess = true; + this.errorRequireSucess = false; e.printStackTrace(); } -// this.requireSucess = true; + this.errorRequireSucess = true; } else { + this.errorRequireSucess = false; LuceneLogDto logDto2 = LuceneLogDto.builder() .device_code(device_code) .content("申请更新点位,返回参数:" + jo) @@ -1049,7 +1063,7 @@ public class StandardStackerDeviceDriver extends AbstractOpcDeviceDriver impleme List plan = stragety.getPlan(); Map> startDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getStart_device_code)); Map> endDeviceCodes = instructionList.stream().collect(Collectors.groupingBy(Instruction::getNext_device_code)); - //初始化队列 + //初始化队列 if (CollUtil.isNotEmpty(plan)){ if (tackerInstructionQueue.isEmpty()) { for (StackerInstruction stackerInstruction : plan) {