rev:优化标准输送线校验逻辑
This commit is contained in:
@@ -1669,7 +1669,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
Iterator<Instruction> it = instructions.iterator();
|
Iterator<Instruction> it = instructions.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Instruction inst = it.next();
|
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;
|
return inst;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1869,7 +1869,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
public Instruction findByStartCodeAndReady(String device_code) {
|
public Instruction findByStartCodeAndReady(String device_code) {
|
||||||
Optional<Instruction> optionalInstruction = instructions.stream()
|
Optional<Instruction> optionalInstruction = instructions.stream()
|
||||||
.filter(instruction -> StrUtil.equals(instruction.getStart_device_code(), device_code)
|
.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();
|
.findFirst();
|
||||||
return optionalInstruction.orElse(null);
|
return optionalInstruction.orElse(null);
|
||||||
}
|
}
|
||||||
@@ -2039,7 +2039,7 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
|||||||
|
|
||||||
//根据时间升序取第一个
|
//根据时间升序取第一个
|
||||||
List<Instruction> instructionsList = instructions.stream()
|
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());
|
&& StrUtil.equals(item.getInstruction_status(), TaskStatusEnum.READY.getIndex())).collect(Collectors.toList());
|
||||||
return instructionsList;
|
return instructionsList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,13 +23,14 @@ public enum TaskTypeEnum {
|
|||||||
|
|
||||||
Oven_Truss_Task("8", "8", "烘箱行架任务"),
|
Oven_Truss_Task("8", "8", "烘箱行架任务"),
|
||||||
|
|
||||||
Inner_Truss_Task("9", "9", "子卷下线行架任务"),
|
|
||||||
|
|
||||||
Stacker_Task("11", "11", "堆垛机任务"),
|
Stacker_Task("11", "11", "堆垛机任务"),
|
||||||
Box_Storage("12", "12", "木箱入库行架任务"),
|
Box_Storage("12", "12", "木箱入库行架任务"),
|
||||||
Box_Package("13", "13", "装箱入库行架任务"),
|
Box_Package("13", "13", "装箱入库行架任务"),
|
||||||
Return_Good("14", "14", "退货入库行架任务"),
|
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", "木箱堆叠行架任务");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user