|
@@ -1,14 +1,7 @@
|
|
|
package com.persagy.proxy.adm.service.impl;
|
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Collections;
|
|
|
-import java.util.Comparator;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Set;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -558,12 +551,14 @@ public class RelationReportService implements IRelationReportService {
|
|
|
}
|
|
|
// 3.使用图类型定义的二级标签作为第一级
|
|
|
List<JSONObject> topList = new ArrayList<>();
|
|
|
+ Set<String> categoryIds = new HashSet<>();
|
|
|
for (GraphDefine graphDefine : graphDefines) {
|
|
|
GraphParentMes secondCategoryMes = graphDefine.getSecondCategoryMes();
|
|
|
if (null==secondCategoryMes){
|
|
|
continue;
|
|
|
}
|
|
|
- if (!levelMap.containsKey(secondCategoryMes.getId())){
|
|
|
+ if (!categoryIds.contains(secondCategoryMes.getId())){
|
|
|
+ categoryIds.add(secondCategoryMes.getId());
|
|
|
topList.add(this.transfer(secondCategoryMes));
|
|
|
}
|
|
|
List<JSONObject> threeLevelList = levelMap.getOrDefault(graphDefine.getCode(), new ArrayList<>());
|