|
|
@@ -509,7 +509,13 @@ public class SearchServiceImpl implements SearchService {
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据输入获取相似的器件原厂型号
|
|
|
+ *
|
|
|
+ * @param componentCode
|
|
|
+ * @return
|
|
|
+ */
|
|
|
private List<String> getSimilarComponentCodes(String componentCode) {
|
|
|
return getSimilarValues(SearchConstants.COMPONENT_CODE_FIELD, componentCode);
|
|
|
}
|
|
|
@@ -583,7 +589,11 @@ public class SearchServiceImpl implements SearchService {
|
|
|
if (CollectionUtils.isEmpty(nameEns)) {
|
|
|
return names;
|
|
|
}
|
|
|
- names.addAll(nameEns);
|
|
|
+ for (String name : nameEns) {
|
|
|
+ if (!names.contains(name)) {
|
|
|
+ names.add(name);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (names.size() > SIMILAR_NUM) {
|
|
|
removeElements(names, SIMILAR_NUM);
|
|
|
}
|