|
@@ -10,6 +10,7 @@ import com.diagbot.dto.GraphDTO;
|
|
import com.diagbot.dto.GraphLabelDTO;
|
|
import com.diagbot.dto.GraphLabelDTO;
|
|
import com.diagbot.dto.Link;
|
|
import com.diagbot.dto.Link;
|
|
import com.diagbot.dto.LinkDTO;
|
|
import com.diagbot.dto.LinkDTO;
|
|
|
|
+import com.diagbot.dto.NextNodeDTO;
|
|
import com.diagbot.dto.Node;
|
|
import com.diagbot.dto.Node;
|
|
import com.diagbot.dto.Tree;
|
|
import com.diagbot.dto.Tree;
|
|
import com.diagbot.dto.TreeDTO;
|
|
import com.diagbot.dto.TreeDTO;
|
|
@@ -75,10 +76,14 @@ public class KgFacade extends KgServiceImpl {
|
|
links.add(new LinkDTO(gNodeDTO.getName(), nNodeDTO.getName(), baseNodeRSDTO.getRType()));
|
|
links.add(new LinkDTO(gNodeDTO.getName(), nNodeDTO.getName(), baseNodeRSDTO.getRType()));
|
|
nodeId++;
|
|
nodeId++;
|
|
if (ListUtil.isNotEmpty(baseNodeRSDTO.getENodeDTOS())) {
|
|
if (ListUtil.isNotEmpty(baseNodeRSDTO.getENodeDTOS())) {
|
|
- for (BaseNodeDTO baseNodeDTO : baseNodeRSDTO.getENodeDTOS()) {
|
|
|
|
|
|
+ for (NextNodeDTO baseNodeDTO : baseNodeRSDTO.getENodeDTOS()) {
|
|
|
|
+ String symbol = "diamond";
|
|
|
|
+ if (baseNodeDTO.getPCount() > 0){
|
|
|
|
+ symbol = "circle";
|
|
|
|
+ }
|
|
GNodeDTO eNodeDTO
|
|
GNodeDTO eNodeDTO
|
|
= new GNodeDTO(baseNodeDTO.getLabel(), cMap.get(baseNodeRSDTO.getRType()),
|
|
= new GNodeDTO(baseNodeDTO.getLabel(), cMap.get(baseNodeRSDTO.getRType()),
|
|
- baseNodeDTO.getName(), nodeId, "diamond", 28);
|
|
|
|
|
|
+ baseNodeDTO.getName(), nodeId, symbol, 28);
|
|
nodeId++;
|
|
nodeId++;
|
|
node.add(eNodeDTO);
|
|
node.add(eNodeDTO);
|
|
links.add(new LinkDTO(nNodeDTO.getName(), eNodeDTO.getName(), ""));
|
|
links.add(new LinkDTO(nNodeDTO.getName(), eNodeDTO.getName(), ""));
|
|
@@ -108,8 +113,8 @@ public class KgFacade extends KgServiceImpl {
|
|
if (kgTreeVO.getType() == 1
|
|
if (kgTreeVO.getType() == 1
|
|
&& kgTreeVO.getSubType() == 1) {
|
|
&& kgTreeVO.getSubType() == 1) {
|
|
KgQueryVO kgQueryVO = new KgQueryVO();
|
|
KgQueryVO kgQueryVO = new KgQueryVO();
|
|
- kgQueryVO.setLabelName("国icd10");
|
|
|
|
- kgQueryVO.setInputStr("国icd10");
|
|
|
|
|
|
+ kgQueryVO.setLabelName("诊断依据");
|
|
|
|
+ kgQueryVO.setInputStr("诊断依据");
|
|
String tree = this.getTree(kgQueryVO);
|
|
String tree = this.getTree(kgQueryVO);
|
|
if (StringUtil.isBlank(tree)) {
|
|
if (StringUtil.isBlank(tree)) {
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
@@ -125,7 +130,7 @@ public class KgFacade extends KgServiceImpl {
|
|
private TreeDTO getTreeDTO(String tree) {
|
|
private TreeDTO getTreeDTO(String tree) {
|
|
TreeDTO treeDTO = new TreeDTO();
|
|
TreeDTO treeDTO = new TreeDTO();
|
|
List<TreeNodeDTO> nodes = new ArrayList<>();
|
|
List<TreeNodeDTO> nodes = new ArrayList<>();
|
|
- Tree treeObj = FastJsonUtils.getJsonToBean(jsonStr, Tree.class);
|
|
|
|
|
|
+ Tree treeObj = FastJsonUtils.getJsonToBean(tree, Tree.class);
|
|
if (null != treeObj) {
|
|
if (null != treeObj) {
|
|
Map<String, Integer> treeMap = new HashMap<>();
|
|
Map<String, Integer> treeMap = new HashMap<>();
|
|
treeMap.put("根节点", 0);
|
|
treeMap.put("根节点", 0);
|