|
@@ -1,6 +1,5 @@
|
|
|
package com.diagbot.facade;
|
|
|
|
|
|
-import com.diagbot.dto.BaseNodeDTO;
|
|
|
import com.diagbot.dto.BaseNodeRSDTO;
|
|
|
import com.diagbot.dto.GraphDTO;
|
|
|
import com.diagbot.dto.GraphLabelDTO;
|
|
@@ -28,24 +27,17 @@ public class KgFacade extends KgServiceImpl {
|
|
|
if (ListUtil.isEmpty(res)) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
|
} else {
|
|
|
- List<String> allLabel = new ArrayList<>();
|
|
|
+ List<String> allRs = new ArrayList<>();
|
|
|
for (GraphDTO graphDTO : res) {
|
|
|
- if (!allLabel.contains(graphDTO.getLabel())) {
|
|
|
- allLabel.add(graphDTO.getLabel());
|
|
|
- }
|
|
|
if (ListUtil.isNotEmpty(graphDTO.getENodeRSDTOS())) {
|
|
|
for (BaseNodeRSDTO baseNodeRSDTO : graphDTO.getENodeRSDTOS()) {
|
|
|
- if (ListUtil.isNotEmpty(baseNodeRSDTO.getENodeDTOS())) {
|
|
|
- for (BaseNodeDTO baseNodeDTO : baseNodeRSDTO.getENodeDTOS()) {
|
|
|
- if (!allLabel.contains(baseNodeDTO.getLabel())) {
|
|
|
- allLabel.add(baseNodeDTO.getLabel());
|
|
|
- }
|
|
|
- }
|
|
|
+ if (!allRs.contains(baseNodeRSDTO.getRType())) {
|
|
|
+ allRs.add(baseNodeRSDTO.getRType());
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- graphLabelDTO.setAllLabel(allLabel);
|
|
|
+ graphLabelDTO.setAllRs(allRs);
|
|
|
graphLabelDTO.setGraphDTOS(res);
|
|
|
}
|
|
|
return graphLabelDTO;
|