|
@@ -36,10 +36,8 @@ import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.List;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -306,7 +304,7 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> implements ITaskS
|
|
|
List<QueryTaskVO> tasks = taskMapper.queryTasks(queryTaskDTO);
|
|
|
PageInfo<QueryTaskVO> pageInfo = new PageInfo<>(tasks);
|
|
|
|
|
|
- //装载创建人名称(调用权限系统接口,根据创建人ids查询出人员列表)
|
|
|
+ //装载创建人名称、装载任务名称
|
|
|
if (tasks.size() > 0) {
|
|
|
List<Integer> createPersonIds = tasks.stream().map(QueryTaskVO::getCreateBy).collect(Collectors.toList());
|
|
|
String res = outInterfaceService.getPersonnelByIdsFromPCS(createPersonIds);
|
|
@@ -324,9 +322,10 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> implements ITaskS
|
|
|
//遍历装载任务名称(检索式+创建时间+创建人名称)
|
|
|
for (QueryTaskVO task : tasks) {
|
|
|
if (task.getType().equals(3) || task.getType().equals(4)) {
|
|
|
- String createTimeStr = (task.getCreateTime() + "").replace("-", "");
|
|
|
- String createTime = createTimeStr.substring(0, createTimeStr.lastIndexOf(" "));
|
|
|
- String taskName = task.getConditions() + " " + createTime + " " + task.getCreateName();
|
|
|
+ String conditions = task.getConditions();
|
|
|
+ conditions = conditions.substring(conditions.indexOf("(") + 1, conditions.lastIndexOf(")"));
|
|
|
+ String createTime = new SimpleDateFormat("yyyyMMdd").format(task.getCreateTime());
|
|
|
+ String taskName = createTime + "-" + conditions + "-" + task.getCreateName();
|
|
|
task.setTaskName(taskName);
|
|
|
}
|
|
|
}
|