|
@ -248,7 +248,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
public List<TaskDto> queryAllUnfinished(Map whereJson) { |
|
|
public List<TaskDto> queryAllUnfinished(Map whereJson) { |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
JSONArray arr = wo.query("task_status < 2 ").getResultJSONArray(0); |
|
|
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; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -273,6 +273,19 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
return list; |
|
|
return list; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<TaskDto> queryTaskByStartDeviceCode(String start_device_code) { |
|
|
|
|
|
List<TaskDto> list = new ArrayList<>(); |
|
|
|
|
|
Iterator<TaskDto> iterator = tasks.iterator(); |
|
|
|
|
|
while (iterator.hasNext()) { |
|
|
|
|
|
TaskDto task = iterator.next(); |
|
|
|
|
|
if (task.getStart_device_code().equals(start_device_code)) { |
|
|
|
|
|
list.add(task); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return list; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public TaskDto queryTaskByLinkNum(String link_num) { |
|
|
public TaskDto queryTaskByLinkNum(String link_num) { |
|
|
return null; |
|
|
return null; |
|
@ -390,7 +403,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto); |
|
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto); |
|
|
|
|
|
|
|
|
wo.insert(json); |
|
|
wo.insert(json); |
|
|
tasks.add(dto); |
|
|
tasks.add(dto); |
|
@ -492,7 +505,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(this.findByStartCode(start_device_code)) |
|
|
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("已存在该起点或终点的任务!"); |
|
|
throw new WDKException("已存在该起点或终点的任务!"); |
|
|
} |
|
|
} |
|
|
if (StrUtil.equals(material_type, "") || StrUtil.equals(quantity, "")) { |
|
|
if (StrUtil.equals(material_type, "") || StrUtil.equals(quantity, "")) { |
|
@ -523,7 +536,7 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial { |
|
|
dto.setUpdate_by(currentUsername); |
|
|
dto.setUpdate_by(currentUsername); |
|
|
|
|
|
|
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
WQLObject wo = WQLObject.getWQLObject("acs_task"); |
|
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto); |
|
|
JSONObject json = (JSONObject) JSONObject.toJSON(dto); |
|
|
|
|
|
|
|
|
wo.update(json); |
|
|
wo.update(json); |
|
|
|
|
|
|
|
|