rev:优化标准输送线校验逻辑

This commit is contained in:
2024-09-09 14:54:42 +08:00
parent 9de3416685
commit 8200ce1927
2 changed files with 6 additions and 5 deletions

View File

@@ -1669,7 +1669,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
Iterator<Instruction> 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.Mxddhj_Task.getIndex())) {
return inst;
}
}
@@ -1869,7 +1869,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
public Instruction findByStartCodeAndReady(String device_code) {
Optional<Instruction> optionalInstruction = instructions.stream()
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code)
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex()))
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Mxddhj_Task.getIndex()))
.findFirst();
return optionalInstruction.orElse(null);
}
@@ -2039,7 +2039,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
//根据时间升序取第一个
List<Instruction> instructionsList = instructions.stream()
.filter(item -> StrUtil.equals(item.getInstruction_type(), TaskTypeEnum.Truss_Task.getIndex())
.filter(item -> StrUtil.equals(item.getInstruction_type(), TaskTypeEnum.Mxddhj_Task.getIndex())
&& StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())).collect(Collectors.toList());
return instructionsList;
}

View File

@@ -23,13 +23,14 @@ public enum TaskTypeEnum {
Oven_Truss_Task("8", "8", "烘箱行架任务"),
Inner_Truss_Task("9", "9", "子卷下线行架任务"),
Stacker_Task("11", "11", "堆垛机任务"),
Box_Storage("12", "12", "木箱入库行架任务"),
Box_Package("13", "13", "装箱入库行架任务"),
Return_Good("14", "14", "退货入库行架任务"),
Rgv_Conveyor_Task("15", "15", "RGV输送任务");
Rgv_Conveyor_Task("15", "15", "RGV输送任务"),
Inner_Truss_Task("16", "16", "子卷下线行架任务"),
Mxddhj_Task("17", "17", "木箱堆叠行架任务");
/**