This commit is contained in:
2022-07-25 17:19:42 +08:00
parent baf747802e
commit 332ee8d089
5 changed files with 59 additions and 87 deletions

View File

@@ -297,8 +297,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
this.writing("to_clear", "1");
this.writing("to_pause", "1");
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,任务确认完成,电器信号写入成功");
} else {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,move:" + move + ",order_finish>" + order_finish + ",last_order_finish>" + last_order_finish);
}
if (ObjectUtil.isEmpty(inst)) {
@@ -414,25 +412,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
}
}
protected void thingToNothing() {
log.debug("从有货到无货 清理数据");
this.setRequireSucess(false);
this.setApplySucess(false);
}
public void set_last_container(String barcode, String type_desc) {
this.setInst_message(null);
this.setContainer(null);
this.set_last_container(barcode);
this.set_last_container_type_desc(type_desc);
}
public void set_last_container(String barcode) {
}
public void set_last_container_type_desc(String type) {
}
public synchronized boolean apply_take_empty_task() throws Exception {
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
@@ -463,8 +442,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
if (hailiangEngravingCacheDeviceDriver.getMove() != 0) {
continue;
}
//querySameDestinationTask 查询是否有相同终点的任务
int num = taskserver.querySameDestinationTask(next_device_code);
if (num != 0) {
int numE = taskserver.querySameOriginTask(this.getDevice_code());
if (num != 0 || numE != 0) {
continue;
}
//判断缓存位是否锁定
@@ -504,7 +485,6 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
} catch (Exception e) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务失败," + String.valueOf(e.getMessage()));
}
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务成功");
}
}
//生成任务成功
@@ -557,8 +537,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
if (hailiangEngravingCacheDeviceDriver.getMove() == 0 || hailiangEngravingCacheDeviceDriver.getMove() == 1) {
continue;
}
//querySameOriginTask 查询是否有相同起点的任务
int num = taskserver.querySameOriginTask(start_device_code);
if (num != 0) {
int numN = taskserver.querySameDestinationTask(this.getDevice_code());
if (num != 0 || numN != 0) {
continue;
}
String material = route_link_device.getMaterial_type();
@@ -594,13 +576,10 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
} catch (Exception e) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务失败," + String.valueOf(e.getMessage()));
}
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":创建任务成功");
}
}
}
//生成任务成功
if (flag) {
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":缺料请求任务生成成功");

View File

@@ -1196,7 +1196,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
for (int i = 0; i < this.tasks.size(); i++) {
TaskDto task = tasks.get(i);
//处理空盘位站点
String start_code = task.getStart_point_code();
String start_code = task.getNext_device_code();
if (start_code.indexOf(".") != -1) {
start_code = start_code.substring(0, start_code.indexOf("."));
}
@@ -1213,7 +1213,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
for (int i = 0; i < this.tasks.size(); i++) {
TaskDto task = tasks.get(i);
//处理空盘位站点
String next_code = task.getNext_point_code();
String next_code = task.getStart_device_code();
if (next_code.indexOf(".") != -1) {
next_code = next_code.substring(0, next_code.indexOf("."));
}