|
@@ -33,10 +33,7 @@ import com.google.common.collect.Lists;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -108,9 +105,18 @@ public class OtherTipProcess {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- Map<String, String> diagNameMap = diagItems.stream().collect(Collectors.toMap(Item::getUniqueName, Item::getName));
|
|
|
+// Map<String, String> diagNameMap = diagItems.stream().collect(Collectors.toMap(Item::getUniqueName, Item::getName));
|
|
|
+//
|
|
|
+// List<String> uniqueNames = diagItems.stream().map(Item::getUniqueName).collect(Collectors.toList());
|
|
|
|
|
|
- List<String> uniqueNames = diagItems.stream().map(Item::getUniqueName).collect(Collectors.toList());
|
|
|
+ Map<String, String> diagNameMap = diagItems.stream()
|
|
|
+ .collect(Collectors.toMap(
|
|
|
+ Item::getUniqueName,
|
|
|
+ Item::getName,
|
|
|
+ (existing, replacement) -> replacement)); // 合并策略:保留新值
|
|
|
+
|
|
|
+ // 获取去重后的uniqueName列表(基于Map keySet)
|
|
|
+ List<String> uniqueNames = new ArrayList<>(diagNameMap.keySet());
|
|
|
|
|
|
SearchCollectionConceptVO searchCollectionConceptVO = new SearchCollectionConceptVO();
|
|
|
searchCollectionConceptVO.setNames(uniqueNames);
|