条款导入拆分结果标准结构树查询子集数据
This commit is contained in:
+19
-6
@@ -1288,12 +1288,25 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
|||||||
public IPage<ManyStandardSelectionBox> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
|
public IPage<ManyStandardSelectionBox> getManyStandardSelectionBox(ManyStandardSelectionBoxVO selectionBoxVO, Integer pageNo, Integer pageSize) {
|
||||||
if (StringUtils.isNotBlank(selectionBoxVO.getStandardSystem())) {
|
if (StringUtils.isNotBlank(selectionBoxVO.getStandardSystem())) {
|
||||||
List<String> list = Arrays.asList(selectionBoxVO.getStandardSystem().split(","));
|
List<String> list = Arrays.asList(selectionBoxVO.getStandardSystem().split(","));
|
||||||
List<LawsNodeRelation> lawsNodeRelationList = lawsNodeRelationService.list(
|
List<LawsTreeNode> lawsTreeNodeList = lawsTreeNodeService.listByIds(list);
|
||||||
new LambdaQueryWrapper<LawsNodeRelation>().in(LawsNodeRelation::getNodeId, list));
|
if (!CollectionUtils.isEmpty(lawsTreeNodeList)) {
|
||||||
if (CollectionUtils.isNotEmpty(lawsNodeRelationList)) {
|
List<String> nodeCode = lawsTreeNodeList.stream()
|
||||||
String ids = lawsNodeRelationList.stream()
|
.map(LawsTreeNode::getNodeCode).collect(Collectors.toList());
|
||||||
.map(LawsNodeRelation::getUniqueRelationFlag).collect(Collectors.joining(","));
|
LambdaQueryWrapper<LawsNodeRelation> query = new LambdaQueryWrapper<>();
|
||||||
selectionBoxVO.setIds(ids);
|
query.and(o->{
|
||||||
|
for (int i = 0; i < nodeCode.size(); i++) {
|
||||||
|
o.likeRight(LawsNodeRelation::getNodeCode, nodeCode.get(i));
|
||||||
|
if(i != (nodeCode.size() - 1)){
|
||||||
|
o.or();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
List<LawsNodeRelation> lawsNodeRelationListAll = lawsNodeRelationService.list(query);
|
||||||
|
if(!CollectionUtils.isEmpty(lawsNodeRelationListAll)){
|
||||||
|
String ids = lawsNodeRelationListAll.stream().map(LawsNodeRelation::getUniqueRelationFlag)
|
||||||
|
.collect(Collectors.joining(","));
|
||||||
|
selectionBoxVO.setIds(ids);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user