|
|
@ -165,87 +165,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme |
|
|
|
return this.removeByIds(set); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
private void delCaches(String id) { |
|
|
|
redisUtils.delByKey(CACHE_KEY + "::id:", id); |
|
|
|
} |
|
|
|
|
|
|
|
private void delCaches(Set<String> ids) { |
|
|
|
for (String id: ids) { |
|
|
|
delCaches(id); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
/* |
|
|
|
@Override |
|
|
|
public void download(List<TaskDto> all, HttpServletResponse response) throws IOException { |
|
|
|
List<Map<String, Object>> list = new ArrayList<>(); |
|
|
|
for (TaskDto task : all) { |
|
|
|
Map<String,Object> map = new LinkedHashMap<>(); |
|
|
|
map.put("任务外部标识", task.getExtTaskId()); |
|
|
|
map.put("任务号", task.getTaskCode()); |
|
|
|
map.put("载具号", task.getVehicleCode()); |
|
|
|
map.put("载具类型", task.getVehicleType()); |
|
|
|
map.put("任务类型", task.getTaskType()); |
|
|
|
map.put("任务状态", task.getTaskStatus()); |
|
|
|
map.put("复合任务", task.getCompoundTask()); |
|
|
|
map.put("复合任务数据", task.getCompoundTaskData()); |
|
|
|
map.put("再次请求", task.getRequestAgain()); |
|
|
|
map.put("再次请求成功", task.getRequestAgainSuccess()); |
|
|
|
map.put("关联编号", task.getLinkNum()); |
|
|
|
map.put("是否下发", task.getIsSend()); |
|
|
|
map.put("物料类型", task.getMaterial()); |
|
|
|
map.put("物料数量", task.getQuantity()); |
|
|
|
map.put("任务优先级", task.getPriority()); |
|
|
|
map.put("创建类型", task.getCreateType()); |
|
|
|
map.put("完成类型", task.getFinishType()); |
|
|
|
map.put("执行描述编码", task.getExecuteCode()); |
|
|
|
map.put("执行描述信息", task.getExecuteMessage()); |
|
|
|
map.put("起始点位编码", task.getStartPointCode()); |
|
|
|
map.put("起始设备编码", task.getStartDeviceCode()); |
|
|
|
map.put("放货点位编码", task.getPutPointCode()); |
|
|
|
map.put("放货设备编码", task.getPutDeviceCode()); |
|
|
|
map.put("起始点位编码2", task.getStartPointCode2()); |
|
|
|
map.put("起始设备编码2", task.getStartDeviceCode2()); |
|
|
|
map.put("目标点位编码", task.getNextPointCode()); |
|
|
|
map.put("目标设备编码", task.getNextDeviceCode()); |
|
|
|
map.put("目标点位编码2", task.getNextPointCode2()); |
|
|
|
map.put("目标设备编码2", task.getNextDeviceCode2()); |
|
|
|
map.put("排", task.getFromX()); |
|
|
|
map.put("列", task.getFromY()); |
|
|
|
map.put("层", task.getFromZ()); |
|
|
|
map.put("排", task.getPutX()); |
|
|
|
map.put("列", task.getPutY()); |
|
|
|
map.put("层", task.getPutZ()); |
|
|
|
map.put("排", task.getToX()); |
|
|
|
map.put("列", task.getToY()); |
|
|
|
map.put("层", task.getToZ()); |
|
|
|
map.put("排2", task.getFromX2()); |
|
|
|
map.put("列2", task.getFromY2()); |
|
|
|
map.put("层2", task.getFromZ2()); |
|
|
|
map.put("排2", task.getToX2()); |
|
|
|
map.put("列2", task.getToY2()); |
|
|
|
map.put("层2", task.getToZ2()); |
|
|
|
map.put("路由方案名称", task.getRoutePlanName()); |
|
|
|
map.put("路由方案编码", task.getRoutePlanCode()); |
|
|
|
map.put("是否需要反馈上位系统", task.getIsNeedfeedback()); |
|
|
|
map.put("空盘数量", task.getEmptypalletNum()); |
|
|
|
map.put("备注", task.getRemark()); |
|
|
|
map.put("是否启用", task.getIsActive()); |
|
|
|
map.put("是否删除", task.getIsDelete()); |
|
|
|
map.put("创建者", task.getCreateBy()); |
|
|
|
map.put("创建时间", task.getCreateTime()); |
|
|
|
map.put("修改者", task.getUpdateBy()); |
|
|
|
map.put("修改时间", task.getUpdateTime()); |
|
|
|
map.put("重量", task.getWeight()); |
|
|
|
map.put("agv系统类型", task.getAgvSystemType()); |
|
|
|
map.put("立库任务类型", task.getStorageTaskType()); |
|
|
|
map.put("温度", task.getTemperature()); |
|
|
|
map.put("时间", task.getOvenTime()); |
|
|
|
list.add(map); |
|
|
|
} |
|
|
|
FileUtil.downloadExcel(list, response); |
|
|
|
}*/ |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取未完成任务 |
|
|
@ -441,20 +360,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme |
|
|
|
return ConvertUtil.convertList(taskList,TaskDto.class); |
|
|
|
} |
|
|
|
|
|
|
|
// @Override
|
|
|
|
// public TaskDto findById(String task_id) {
|
|
|
|
// WQLObject wo = WQLObject.getWQLObject("acs_task");
|
|
|
|
// JSONObject json = wo.query("task_id ='" + task_id + "'").uniqueResult(0);
|
|
|
|
// final TaskDto obj = json.toJavaObject(TaskDto.class);
|
|
|
|
// return obj;
|
|
|
|
// }
|
|
|
|
|
|
|
|
@Override |
|
|
|
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);
|
|
|
|
// return list;
|
|
|
|
List<Task> taskList= new LambdaQueryChainWrapper<>(taskMapper) |
|
|
|
.lt(Task::getTask_status,"2") |
|
|
|
.list(); |
|
|
@ -463,10 +370,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme |
|
|
|
|
|
|
|
@Override |
|
|
|
public TaskDto findByCode(String code) { |
|
|
|
// WQLObject wo = WQLObject.getWQLObject("acs_task");
|
|
|
|
// JSONObject json = wo.query("task_code ='" + code + "'").uniqueResult(0);
|
|
|
|
// final TaskDto obj = json.toJavaObject(TaskDto.class);
|
|
|
|
// return obj;
|
|
|
|
Task task= new LambdaQueryChainWrapper<>(taskMapper) |
|
|
|
.eq(Task::getTask_code,code) |
|
|
|
.one(); |
|
|
@ -849,15 +752,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme |
|
|
|
Task task = ConvertUtil.convert(dto, Task.class); |
|
|
|
taskMapper.updateById(task); |
|
|
|
|
|
|
|
Iterator<TaskDto> iterator = tasks.iterator(); |
|
|
|
// while (iterator.hasNext()) {
|
|
|
|
// TaskDto task = iterator.next();
|
|
|
|
// if (task.getTask_code().equals(dto.getTask_code())) {
|
|
|
|
// iterator.remove();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
removeByCodeFromCache(entity.getTask_code()); |
|
|
|
|
|
|
|
if (StrUtil.equals(dto.getTask_status(), "0") || StrUtil.equals(dto.getTask_status(), "1")) { |
|
|
|