rev:检验行架任务类型
This commit is contained in:
@@ -467,7 +467,7 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
} else {
|
} else {
|
||||||
this.instruction_require_time = date;
|
this.instruction_require_time = date;
|
||||||
//查找有没有对应的指令
|
//查找有没有对应的指令
|
||||||
Instruction inst = instructionService.findByDeviceCodeFromCache(this.device_code);
|
Instruction inst = instructionService.findByStartCodeAndReady(this.device_code);
|
||||||
if (ObjectUtil.isNotNull(inst)) {
|
if (ObjectUtil.isNotNull(inst)) {
|
||||||
List<RouteLineDto> routeLineDtos = routeLineService.selectDeviceCodeList(this.device_code);
|
List<RouteLineDto> routeLineDtos = routeLineService.selectDeviceCodeList(this.device_code);
|
||||||
if (routeLineDtos.size() < 1) {
|
if (routeLineDtos.size() < 1) {
|
||||||
|
|||||||
@@ -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.Truss_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()))
|
&& StrUtil.equals(instruction.getInstruction_status(), InstructionStatusEnum.READY.getIndex()) && !instruction.getInstruction_type().equals(TaskTypeEnum.Truss_Task.getIndex()))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
return optionalInstruction.orElse(null);
|
return optionalInstruction.orElse(null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user