fix:88259
This commit is contained in:
+57
-6
@@ -2136,6 +2136,7 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
idSet.addAll(systemList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toSet()));
|
idSet.addAll(systemList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toSet()));
|
||||||
parameterMap.remove(FieldCommon.STANDARD_SYSTEM);
|
parameterMap.remove(FieldCommon.STANDARD_SYSTEM);
|
||||||
}
|
}
|
||||||
|
Set<String> listIntersection = new HashSet<>();
|
||||||
// 代替标准号
|
// 代替标准号
|
||||||
String replaceStandard = (String) parameterMap.get(FieldCommon.REPLACED_STANDARD);
|
String replaceStandard = (String) parameterMap.get(FieldCommon.REPLACED_STANDARD);
|
||||||
if (StrUtil.isNotBlank(replaceStandard)) {
|
if (StrUtil.isNotBlank(replaceStandard)) {
|
||||||
@@ -2144,7 +2145,15 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
lambdaQueryWrapper.like(LawsReplacedStandard::getReplaced, replaceStandard);
|
lambdaQueryWrapper.like(LawsReplacedStandard::getReplaced, replaceStandard);
|
||||||
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "1");
|
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "1");
|
||||||
List<LawsReplacedStandard> replacedStandardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
List<LawsReplacedStandard> replacedStandardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
||||||
snSet.addAll(replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet()));
|
Set<String> setSub = replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet());
|
||||||
|
if(CollectionUtils.isEmpty(listIntersection)){
|
||||||
|
listIntersection.addAll(setSub);
|
||||||
|
}else{
|
||||||
|
listIntersection = listIntersection.stream()
|
||||||
|
.filter(setSub::contains)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
// snSet.addAll(replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet()));
|
||||||
parameterMap.remove(FieldCommon.REPLACED_STANDARD);
|
parameterMap.remove(FieldCommon.REPLACED_STANDARD);
|
||||||
}
|
}
|
||||||
// 被代替标准号
|
// 被代替标准号
|
||||||
@@ -2155,14 +2164,30 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
lambdaQueryWrapper.like(LawsReplacedStandard::getReplacedBy, replacedByStandard);
|
lambdaQueryWrapper.like(LawsReplacedStandard::getReplacedBy, replacedByStandard);
|
||||||
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "1");
|
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "1");
|
||||||
List<LawsReplacedStandard> standardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
List<LawsReplacedStandard> standardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
||||||
snSet.addAll(standardList.stream().map(s -> {
|
Set<String> setSub = standardList.stream().map(s -> {
|
||||||
// 如果有书名号则只取书名号的前半部分
|
// 如果有书名号则只取书名号的前半部分
|
||||||
if (s.getReplaced().contains("《")) {
|
if (s.getReplaced().contains("《")) {
|
||||||
return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
||||||
} else {
|
} else {
|
||||||
return s.getReplaced();
|
return s.getReplaced();
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toSet()));
|
}).collect(Collectors.toSet());
|
||||||
|
if(CollectionUtils.isEmpty(listIntersection)){
|
||||||
|
listIntersection.addAll(setSub);
|
||||||
|
}else{
|
||||||
|
listIntersection = listIntersection.stream()
|
||||||
|
.filter(setSub::contains)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
|
||||||
|
// snSet.addAll(standardList.stream().map(s -> {
|
||||||
|
// // 如果有书名号则只取书名号的前半部分
|
||||||
|
// if (s.getReplaced().contains("《")) {
|
||||||
|
// return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
||||||
|
// } else {
|
||||||
|
// return s.getReplaced();
|
||||||
|
// }
|
||||||
|
// }).collect(Collectors.toSet()));
|
||||||
parameterMap.remove(FieldCommon.REPLACED_BY_STANDARD);
|
parameterMap.remove(FieldCommon.REPLACED_BY_STANDARD);
|
||||||
}
|
}
|
||||||
// 引用标准号
|
// 引用标准号
|
||||||
@@ -2173,7 +2198,15 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
lambdaQueryWrapper.like(LawsReplacedStandard::getReplaced, referenceStandard);
|
lambdaQueryWrapper.like(LawsReplacedStandard::getReplaced, referenceStandard);
|
||||||
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "2");
|
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "2");
|
||||||
List<LawsReplacedStandard> replacedStandardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
List<LawsReplacedStandard> replacedStandardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
||||||
snSet.addAll(replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet()));
|
Set<String> setSub = replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet());
|
||||||
|
if(CollectionUtils.isEmpty(listIntersection)){
|
||||||
|
listIntersection.addAll(setSub);
|
||||||
|
}else{
|
||||||
|
listIntersection = listIntersection.stream()
|
||||||
|
.filter(setSub::contains)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
// snSet.addAll(replacedStandardList.stream().map(LawsReplacedStandard::getReplacedBy).collect(Collectors.toSet()));
|
||||||
parameterMap.remove(FieldCommon.REFERENCE_STANDARD);
|
parameterMap.remove(FieldCommon.REFERENCE_STANDARD);
|
||||||
}
|
}
|
||||||
// 被引用标准号
|
// 被引用标准号
|
||||||
@@ -2184,16 +2217,34 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
lambdaQueryWrapper.like(LawsReplacedStandard::getReplacedBy, referencedStandard);
|
lambdaQueryWrapper.like(LawsReplacedStandard::getReplacedBy, referencedStandard);
|
||||||
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "2");
|
lambdaQueryWrapper.eq(LawsReplacedStandard::getType, "2");
|
||||||
List<LawsReplacedStandard> standardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
List<LawsReplacedStandard> standardList = lawsReplacedStandardService.list(lambdaQueryWrapper);
|
||||||
snSet.addAll(standardList.stream().map(s -> {
|
Set<String> setSub = standardList.stream().map(s -> {
|
||||||
// 如果有书名号则只取书名号的前半部分
|
// 如果有书名号则只取书名号的前半部分
|
||||||
if (s.getReplaced().contains("《")) {
|
if (s.getReplaced().contains("《")) {
|
||||||
return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
||||||
} else {
|
} else {
|
||||||
return s.getReplaced();
|
return s.getReplaced();
|
||||||
}
|
}
|
||||||
}).collect(Collectors.toSet()));
|
}).collect(Collectors.toSet());
|
||||||
|
if(CollectionUtils.isEmpty(listIntersection)){
|
||||||
|
listIntersection.addAll(setSub);
|
||||||
|
}else{
|
||||||
|
listIntersection = listIntersection.stream()
|
||||||
|
.filter(setSub::contains)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
}
|
||||||
|
// snSet.addAll(standardList.stream().map(s -> {
|
||||||
|
// // 如果有书名号则只取书名号的前半部分
|
||||||
|
// if (s.getReplaced().contains("《")) {
|
||||||
|
// return s.getReplaced().substring(0, s.getReplaced().indexOf("《"));
|
||||||
|
// } else {
|
||||||
|
// return s.getReplaced();
|
||||||
|
// }
|
||||||
|
// }).collect(Collectors.toSet()));
|
||||||
parameterMap.remove(FieldCommon.REFERENCED_STANDARD);
|
parameterMap.remove(FieldCommon.REFERENCED_STANDARD);
|
||||||
}
|
}
|
||||||
|
if(!CollectionUtils.isEmpty(listIntersection)){
|
||||||
|
snSet.addAll(listIntersection);
|
||||||
|
}
|
||||||
// 零部件名称
|
// 零部件名称
|
||||||
String partName = (String) parameterMap.get(FieldCommon.PART_NAME);
|
String partName = (String) parameterMap.get(FieldCommon.PART_NAME);
|
||||||
if (StrUtil.isNotBlank(partName)) {
|
if (StrUtil.isNotBlank(partName)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user