rev:拔前行架任务优先级优化

This commit is contained in:
2025-03-09 16:06:24 +08:00
parent 14829606db
commit a593e5e044

View File

@@ -435,9 +435,9 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
} }
} }
} }
taskDtosReady = this.sortTask(taskDtosReady);
for (int j = 0; j < taskDtosReady.size(); j++) { for (int j = 0; j < taskDtosReady.size(); j++) {
//按照优先级排序 优先级相等按照创建时间排序 //按照优先级排序 优先级相等按照创建时间排序
taskDtosReady = this.sortTask(taskDtosReady);
task = taskDtosReady.get(j); task = taskDtosReady.get(j);
// 6 行架任务 8烘箱任务 // 6 行架任务 8烘箱任务
if (!StrUtil.equals(task.getTask_type(), "6")) { if (!StrUtil.equals(task.getTask_type(), "6")) {
@@ -445,20 +445,13 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
continue; continue;
} }
if (ObjectUtil.isNotEmpty(task)) { if (ObjectUtil.isNotEmpty(task)) {
break start;
}
}
}
}
}
if (!ObjectUtil.isEmpty(task)) {
Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code()); Device nextdevice = deviceAppService.findDeviceByCode(task.getNext_device_code());
Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code()); Device startdevice = deviceAppService.findDeviceByCode(task.getStart_device_code());
if (startdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) { if (startdevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startdevice.getDeviceDriver(); plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startdevice.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 1) { if (plugPullDeviceSiteDeviceDriver.getAction() != 1) {
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getStart_device_code() + "工位状态为不允许取,无法生成指令"; notCreateInstMessage = "就绪任务未创建指令原因->" + task.getStart_device_code() + "工位状态为不允许取,无法生成指令";
return false; continue;
} }
} }
@@ -466,10 +459,16 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) nextdevice.getDeviceDriver(); plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) nextdevice.getDeviceDriver();
if (plugPullDeviceSiteDeviceDriver.getAction() != 2) { if (plugPullDeviceSiteDeviceDriver.getAction() != 2) {
notCreateInstMessage = "就绪任务未创建指令原因->" + task.getNext_device_code() + "工位状态为不允许放,无法生成指令"; notCreateInstMessage = "就绪任务未创建指令原因->" + task.getNext_device_code() + "工位状态为不允许放,无法生成指令";
return false; continue;
} }
} }
break start;
}
}
}
}
}
if (!ObjectUtil.isEmpty(task)) {
String taskId = task.getTask_id(); String taskId = task.getTask_id();
String taskCode = task.getTask_code(); String taskCode = task.getTask_code();
String vehicleCode = task.getVehicle_code(); String vehicleCode = task.getVehicle_code();