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) {