fix: 同排移库指令bug修改
This commit is contained in:
@@ -230,8 +230,21 @@ public class CreateDDJInst {
|
||||
Instruction instruction = new Instruction();
|
||||
instruction.setInstruction_status(CommonFinalParam.ONE);
|
||||
List<Instruction> byDeviceCodes = instructionService.findByDeviceCodes(instruction, true);
|
||||
//筛选出库指令
|
||||
List<Instruction> insts = new ArrayList<>();
|
||||
for (Instruction byDeviceCode : byDeviceCodes) {
|
||||
String nextDeviceCode = byDeviceCode.getNext_device_code();
|
||||
Device nextdevice = appService.findDeviceByCode(nextDeviceCode);
|
||||
String startDeviceCode = byDeviceCode.getStart_device_code();
|
||||
Device startDevice1 = appService.findDeviceByCode(startDeviceCode);
|
||||
if (startDevice1.getDevice_type().equals(DeviceType.storage.name()) &&
|
||||
(nextdevice.getDevice_type().equals(DeviceType.conveyor.name()) || nextdevice.getDevice_type().equals(DeviceType.storage.name()))) {
|
||||
insts.add(byDeviceCode);
|
||||
}
|
||||
}
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
if (CollUtil.isEmpty(byDeviceCodes)) {
|
||||
if (CollUtil.isEmpty(insts)) {
|
||||
//判断有没有DDJ对接位出入库的指令,只判断终点
|
||||
List<Instruction> byCodeAndExcute = instructionService.findByNextCode(next_device_code);
|
||||
if (CollUtil.isNotEmpty(byCodeAndExcute)) {
|
||||
@@ -292,17 +305,6 @@ public class CreateDDJInst {
|
||||
taskDto.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||
taskserver.update(taskDto);
|
||||
} else {
|
||||
List<Instruction> insts = new ArrayList<>();
|
||||
for (Instruction byDeviceCode : byDeviceCodes) {
|
||||
String nextDeviceCode = byDeviceCode.getNext_device_code();
|
||||
Device nextdevice = appService.findDeviceByCode(nextDeviceCode);
|
||||
String startDeviceCode = byDeviceCode.getStart_device_code();
|
||||
Device startDevice1 = appService.findDeviceByCode(startDeviceCode);
|
||||
if (startDevice1.getDevice_type().equals(DeviceType.storage.name()) &&
|
||||
(nextdevice.getDevice_type().equals(DeviceType.conveyor.name()) || nextdevice.getDevice_type().equals(DeviceType.storage.name()))) {
|
||||
insts.add(byDeviceCode);
|
||||
}
|
||||
}
|
||||
int max = 0;
|
||||
//非同排的路径
|
||||
for (Instruction inst : insts) {
|
||||
|
||||
Reference in New Issue
Block a user