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); }