代码修改,去除养生区整列锁定、添加供给线判断去货梯口还是养生区
This commit is contained in:
@@ -182,9 +182,7 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
break;
|
||||
case 4:
|
||||
//申请空盘
|
||||
System.out.println("执行到mode = 4了,此时move = " + move + ",requireSucess = " + requireSucess);
|
||||
if (move == 0 && !requireSucess) {
|
||||
System.out.println("进入到申请空盘的任务了,mode = " + mode);
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
@@ -200,17 +198,13 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
if (res_jo.getString("status").equals("200")) {
|
||||
logServer.deviceExecuteLog(device_code, "", "", "空盘任务申请成功-");
|
||||
requireSucess = true;
|
||||
} else {
|
||||
System.out.println("申请满托入库失败" + String.valueOf(res_jo));
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
System.out.println("执行到mode = 5了,此时move = " + move + ",requireSucessFullIn = " + requireSucessFullIn);
|
||||
//满托入库
|
||||
if (move == 1 && !requireSucessFullIn) {
|
||||
System.out.println("进入到申请空盘的任务了,mode = " + mode);
|
||||
Date date = new Date();
|
||||
if (date.getTime() - this.instruction_require_time.getTime() < (long) this.instruction_require_time_out) {
|
||||
log.trace("触发时间因为小于{}毫秒,而被无视", this.instruction_require_time_out);
|
||||
@@ -227,8 +221,6 @@ public class HailiangSmartplcTestDeviceDriver extends AbstractOpcDeviceDriver im
|
||||
if (res_jo.getString("status").equals("200")) {
|
||||
requireSucessFullIn = true;
|
||||
logServer.deviceExecuteLog(device_code, "", "", "满托入库任务申请成功-");
|
||||
} else {
|
||||
System.out.println("申请满托入库失败" + String.valueOf(res_jo));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String task_type = task.getString("task_type");
|
||||
String remark = task.getString("remark");
|
||||
String params = task.getString("params");
|
||||
String vehicle_qty = task.getString("vehicle_qty");
|
||||
|
||||
if (start_point_code.indexOf("-") > 0) {
|
||||
String str[] = start_point_code.split("-");
|
||||
@@ -138,7 +137,6 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("vehicle_type", vehicle_type);
|
||||
jo.put("remark", remark);
|
||||
jo.put("params", params);
|
||||
jo.put("emptypallet_num", vehicle_qty);
|
||||
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
||||
|
||||
if (!StrUtil.isEmpty(ext_task_id)) {
|
||||
|
||||
@@ -248,7 +248,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
public List<TaskDto> queryAllUnfinished(Map whereJson) {
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
||||
JSONArray arr = wo.query("task_status < 2 ").getResultJSONArray(0);
|
||||
List<TaskDto> list = arr.toJavaList(TaskDto.class);
|
||||
List<TaskDto> list =arr.toJavaList(TaskDto.class);
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
}
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
|
||||
wo.insert(json);
|
||||
tasks.add(dto);
|
||||
@@ -492,7 +492,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(this.findByStartCode(start_device_code))
|
||||
|| ObjectUtil.isNotEmpty(this.findByNextCode(next_device_code))) {
|
||||
|| ObjectUtil.isNotEmpty(this.findByNextCode(next_device_code))) {
|
||||
throw new WDKException("已存在该起点或终点的任务!");
|
||||
}
|
||||
if (StrUtil.equals(material_type, "") || StrUtil.equals(quantity, "")) {
|
||||
@@ -523,7 +523,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
dto.setUpdate_by(currentUsername);
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_task");
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
|
||||
|
||||
wo.update(json);
|
||||
|
||||
@@ -787,7 +787,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
JSONObject feed_jo = new JSONObject();
|
||||
feed_jo.put("ext_task_id", entity.getExt_task_id());
|
||||
feed_jo.put("task_code", entity.getTask_code());
|
||||
feed_jo.put("task_status", "0");
|
||||
feed_jo.put("task_status", entity.getTask_status());
|
||||
JSONArray ja = new JSONArray();
|
||||
ja.add(feed_jo);
|
||||
acstowmsService.feedbackTaskStatusToWms(ja);
|
||||
@@ -1215,7 +1215,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryStartNum(String start_code, String next_code) {
|
||||
public Integer queryStartNum(String start_code,String next_code) {
|
||||
int num = 0;
|
||||
Iterator<TaskDto> iterator = tasks.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1228,7 +1228,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer queryEndNum(String next_code, String start_code) {
|
||||
public Integer queryEndNum(String next_code,String start_code) {
|
||||
int num = 0;
|
||||
Iterator<TaskDto> iterator = tasks.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
|
||||
Reference in New Issue
Block a user