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