|
@@ -200,7 +200,7 @@ public class RelationContactFacade extends RelationServiceImpl {
|
|
|
relationNodeDTO.setConceptTypeName(LexiconTypeEnum.getName(concept.getLibType().intValue()));
|
|
|
relationNodeDTO.setConceptNameType(concept.getLibName()+"("+LexiconTypeEnum.getName(concept.getLibType().intValue())+")");
|
|
|
|
|
|
- relationNodeDTO.setNodeList(repairRelationDataForQuery(relationContactDetailVO.getConceptId(), relationContactDetailVO.getRelationId()));
|
|
|
+ relationNodeDTO.setNodeList(repairRelationDataForQuery(relationContactDetailVO.getConceptId(), relationContactDetailVO.getRelationId(),null));
|
|
|
|
|
|
return relationNodeDTO;
|
|
|
}
|
|
@@ -209,19 +209,30 @@ public class RelationContactFacade extends RelationServiceImpl {
|
|
|
* 处理关系节点-查询事件
|
|
|
* @param conceptId
|
|
|
* @param relationId
|
|
|
+ * @param hookConceptIds
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<RelationNodeDTO> repairRelationDataForQuery(Long conceptId,Long relationId){
|
|
|
+ private List<RelationNodeDTO> repairRelationDataForQuery(Long conceptId,Long relationId,List<Long> hookConceptIds){
|
|
|
+ if(hookConceptIds==null){
|
|
|
+ hookConceptIds = new ArrayList<>();
|
|
|
+ hookConceptIds.add(conceptId);
|
|
|
+ }
|
|
|
+
|
|
|
List<RelationNodeDTO> relationNodeDTOList = this.baseMapper.getRelationNodeDTOs(conceptId,relationId);
|
|
|
|
|
|
- relationNodeDTOList.forEach(i->{
|
|
|
+ for(RelationNodeDTO i : relationNodeDTOList){
|
|
|
i.setConceptTypeName(LexiconTypeEnum.getName(i.getConceptTypeId().intValue()));
|
|
|
i.setConceptNameType(i.getConceptName()+"("+LexiconTypeEnum.getName(i.getConceptTypeId().intValue())+")");
|
|
|
i.setParentConceptTypeName(LexiconTypeEnum.getName(i.getParentConceptTypeId().intValue()));
|
|
|
i.setParentConceptNameType(i.getParentConceptName()+"("+LexiconTypeEnum.getName(i.getParentConceptTypeId().intValue())+")");
|
|
|
|
|
|
- i.setNodeList(repairRelationDataForQuery(i.getConceptId(), relationId));
|
|
|
- });
|
|
|
+ if(!hookConceptIds.contains(i.getConceptId())){
|
|
|
+ List<Long> hookConceptIds_ = new ArrayList<>();
|
|
|
+ hookConceptIds_.addAll(hookConceptIds);
|
|
|
+ hookConceptIds_.add(i.getConceptId());
|
|
|
+ i.setNodeList(repairRelationDataForQuery(i.getConceptId(), relationId,hookConceptIds_));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
return relationNodeDTOList;
|
|
|
}
|