|
@@ -220,9 +220,11 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
QueryWrapper<Relation> relationQe = new QueryWrapper<>();
|
|
|
relationQe.eq("relation_id", getAllForRelationVO.getRelationId());
|
|
|
if (getAllForRelationVO.getRelationPosition() == 1) {
|
|
|
- relationQe.eq(getAllForRelationVO.getRelationConceptId() != null, "end_id", getAllForRelationVO.getRelationConceptId());
|
|
|
- relationQe.and(wrapper->wrapper.in("start_id", conceptIdList).or(getAllForRelationVO.getRelationConceptId() == null).in("end_id", conceptIdList));
|
|
|
- reCouMap = relationFacade.list(relationQe).stream().collect(Collectors.groupingBy(Relation::getStartId, Collectors.counting()));
|
|
|
+ if(getAllForRelationVO.getIsStartRootExt()==1){
|
|
|
+ relationQe.eq(getAllForRelationVO.getRelationConceptId() != null, "end_id", getAllForRelationVO.getRelationConceptId());
|
|
|
+ relationQe.and(wrapper->wrapper.in("start_id", conceptIdList).or(getAllForRelationVO.getRelationConceptId() == null).in("end_id", conceptIdList));
|
|
|
+ reCouMap = relationFacade.list(relationQe).stream().collect(Collectors.groupingBy(Relation::getStartId, Collectors.counting()));
|
|
|
+ }
|
|
|
} else if(getAllForRelationVO.getRelationConceptId() != null) {
|
|
|
relationQe.in("end_id", conceptIdList);
|
|
|
relationQe.eq("start_id", getAllForRelationVO.getRelationConceptId());
|