From b98f4ea401b03cc0f69f0bae228513e993fa586a Mon Sep 17 00:00:00 2001 From: tuqiang <437016993@qq.com> Date: Sun, 8 Sep 2024 12:50:15 +0800 Subject: [PATCH] =?UTF-8?q?rev:=E6=A3=80=E9=AA=8C=E8=A1=8C=E6=9E=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../conveyor/belt_conveyor/BeltConveyorDeviceDriver.java | 2 +- .../instruction/service/impl/InstructionServiceImpl.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java index 5cc56c1de..fe9ac5147 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/device_driver/conveyor/belt_conveyor/BeltConveyorDeviceDriver.java @@ -467,7 +467,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements } else { this.instruction_require_time = date; //查找有没有对应的指令 - Instruction inst = instructionService.findByDeviceCodeFromCache(this.device_code); + Instruction inst = instructionService.findByStartCodeAndReady(this.device_code); if (ObjectUtil.isNotNull(inst)) { List routeLineDtos = routeLineService.selectDeviceCodeList(this.device_code); if (routeLineDtos.size() < 1) { diff --git a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java index 474bd0ca7..ee91a38eb 100644 --- a/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java +++ b/acs2/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java @@ -527,7 +527,7 @@ public class InstructionServiceImpl extends CommonServiceImpl it = instructions.iterator(); while (it.hasNext()) { Instruction inst = it.next(); - if (StrUtil.equals(devicecode, inst.getNext_device_code()) && Integer.parseInt(inst.getInstruction_status()) <= Integer.parseInt(InstructionStatusEnum.BUSY.getIndex()) && !inst.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex()) ) { + if (StrUtil.equals(devicecode, inst.getNext_device_code()) && Integer.parseInt(inst.getInstruction_status()) <= Integer.parseInt(InstructionStatusEnum.BUSY.getIndex()) && !inst.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex())) { return inst; } } @@ -1869,7 +1869,7 @@ public class InstructionServiceImpl extends CommonServiceImpl optionalInstruction = instructions.stream() .filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code) - && StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex())) + && StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex())) .findFirst(); return optionalInstruction.orElse(null); }