|
@@ -14897,6 +14897,55 @@ public class TaskByTypeManagerImpl implements ITaskByTypeManager{
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Map<String, Object> findMergeTaskInfo(List<Long> taskIds, Long taskType){
|
|
|
+ Map<String, Object> data = new HashMap<>();
|
|
|
+ data.put("taskType",taskType);
|
|
|
+ List<Map<String,Object>> titles = new ArrayList<>();
|
|
|
+ data.put("titles",titles);
|
|
|
+ List<Map<String,Object>> contents = new ArrayList<>();
|
|
|
+ data.put("contents",contents);
|
|
|
+ List<Map<String,Object>> types = new ArrayList<>();
|
|
|
+ data.put("types",types);
|
|
|
+ List<Map<String,Object>> directorys = new ArrayList<>();
|
|
|
+ data.put("directorys",directorys);
|
|
|
+ List<Map<String,Object>> froms = new ArrayList<>();
|
|
|
+ data.put("froms",froms);
|
|
|
+ taskIds.forEach(e -> {
|
|
|
+ TaskSummaryBean summary = taskSummaryDao.findTaskSummaryById(e);
|
|
|
+ Map<String, Object> importReportData = buildImportReportData(summary, taskType);
|
|
|
+ Map<String,Object> title = new HashMap<>();
|
|
|
+ title.put("label",importReportData.get("title"));
|
|
|
+ title.put("value",e);
|
|
|
+ titles.add(title);
|
|
|
+ Map<String,Object> content = new HashMap<>();
|
|
|
+ content.put("label",importReportData.get("content"));
|
|
|
+ content.put("value",e);
|
|
|
+ contents.add(content);
|
|
|
+ Map<String,Object> type = new HashMap<>();
|
|
|
+ type.put("label",importReportData.get("type"));
|
|
|
+ type.put("value",e);
|
|
|
+ types.add(type);
|
|
|
+ Map<String,Object> directory = new HashMap<>();
|
|
|
+ directory.put("label",importReportData.get("field_1000"));
|
|
|
+ directory.put("value",e);
|
|
|
+ directorys.add(directory);
|
|
|
+ Map<String,Object> from = new HashMap<>();
|
|
|
+ from.put("label",importReportData.get("field_51"));
|
|
|
+ from.put("value",e);
|
|
|
+ froms.add(from);
|
|
|
+
|
|
|
+ });
|
|
|
+ Map<String,Object> form = new HashMap<>();
|
|
|
+ data.put("form",form);
|
|
|
+ form.put("titleId",titles.get(0).get("value"));
|
|
|
+ form.put("contentId",contents.get(0).get("value"));
|
|
|
+ form.put("typeId",types.get(0).get("value"));
|
|
|
+ form.put("directoryId",directorys.get(0).get("value"));
|
|
|
+ form.put("fromId",froms.get(0).get("value"));
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
private Map<String, Object> buildImportReportData(TaskSummaryBean summary, Long taskType){
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
data.put("id", summary.getId());
|