标准拆分拆分已入库文本查询标准结构树修改

This commit is contained in:
梁琦涛
2024-09-10 18:56:35 +08:00
parent 8c477df597
commit 215dc27c20
@@ -1480,10 +1480,19 @@ public class DocumentSplitServiceImpl implements IDocumentSplitService {
if (StringUtils.isNotBlank(splitFileInfo.getStandardSystem())){ if (StringUtils.isNotBlank(splitFileInfo.getStandardSystem())){
List<String> list = Arrays.asList(splitFileInfo.getStandardSystem().split(",")); List<String> list = Arrays.asList(splitFileInfo.getStandardSystem().split(","));
List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list); List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list);
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(new LambdaQueryWrapper<LawsNodeRelation>() if(CollectionUtils.isEmpty(lawsTreeNodeList)){
.in(LawsNodeRelation::getNodeId, lawsTreeNodeList.stream().map(LawsTreeNode::getId) return new Page<>();
.collect(Collectors.toList()))); }
if (lawsNodeRelationList.isEmpty()){ List<String> nodeCode = lawsTreeNodeList.stream().map(LawsTreeNode::getNodeCode).collect(Collectors.toList());
LambdaQueryWrapper<LawsNodeRelation> query = new LambdaQueryWrapper<>();
for (int i = 0; i < nodeCode.size(); i++) {
query.likeRight(LawsNodeRelation::getNodeCode, nodeCode.get(i));
if(i != nodeCode.size() - 1){
query.or();
}
}
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(query);
if (CollectionUtils.isEmpty(lawsNodeRelationList)){
return new Page<>(); return new Page<>();
} }
List<String> idList = lawsNodeRelationList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toList()); List<String> idList = lawsNodeRelationList.stream().map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.toList());