|
@@ -11,13 +11,11 @@ import com.diagbot.dto.GraphLabelDTO;
|
|
|
import com.diagbot.dto.Link;
|
|
|
import com.diagbot.dto.LinkDTO;
|
|
|
import com.diagbot.dto.Node;
|
|
|
-import com.diagbot.dto.TreeDTO;
|
|
|
import com.diagbot.dto.Tu;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.service.impl.KgServiceImpl;
|
|
|
import com.diagbot.util.EntityUtil;
|
|
|
-import com.diagbot.util.FastJsonUtils;
|
|
|
import com.diagbot.util.ListUtil;
|
|
|
import com.diagbot.vo.KgQueryVO;
|
|
|
import com.diagbot.vo.KgTreeVO;
|
|
@@ -99,57 +97,18 @@ public class KgFacade extends KgServiceImpl {
|
|
|
return random;
|
|
|
}
|
|
|
|
|
|
- public TreeDTO getTreeFac(KgTreeVO kgTreeVO) {
|
|
|
- TreeDTO treeDTO = new TreeDTO();
|
|
|
- if (kgTreeVO.getType() == 1 && kgTreeVO.getSubType() == 1) {
|
|
|
- treeDTO = FastJsonUtils.getJsonToBean(jsonStr, TreeDTO.class);
|
|
|
+ public String getTreeFac(KgTreeVO kgTreeVO) {
|
|
|
+ String tree = "";
|
|
|
+ if (kgTreeVO.getType() == 1
|
|
|
+ && kgTreeVO.getSubType() == 1) {
|
|
|
+ KgQueryVO kgQueryVO = new KgQueryVO();
|
|
|
+ kgQueryVO.setLabelName("国icd10");
|
|
|
+ kgQueryVO.setInputStr("国icd10");
|
|
|
+ tree = this.getTree(kgQueryVO);
|
|
|
} else {
|
|
|
throw new CommonException(CommonErrorCode.PARAM_IS_ERROR);
|
|
|
}
|
|
|
- return treeDTO;
|
|
|
- }
|
|
|
-
|
|
|
- private static final String jsonStr = "{\n" +
|
|
|
- " \"icdCode\": \"1\",\n" +
|
|
|
- " \"label\": null,\n" +
|
|
|
- " \"name\": \"疾病\",\n" +
|
|
|
- " \"snode\": [\n" +
|
|
|
- " {\n" +
|
|
|
- "\t\t\"icdCode\": \"A\",\n" +
|
|
|
- "\t\t\"label\": \"\",\n" +
|
|
|
- "\t\t\"name\": \"A\",\n" +
|
|
|
- "\t\t\"snode\": [\n" +
|
|
|
- "\t\t {\n" +
|
|
|
- "\t\t\t\"icdCode\": \"A1\",\n" +
|
|
|
- "\t\t\t\"label\": \"\",\n" +
|
|
|
- "\t\t\t\"name\": \"A1\",\n" +
|
|
|
- "\t\t\t\"snode\": [\n" +
|
|
|
- "\t\t\t null\n" +
|
|
|
- "\t\t\t]\n" +
|
|
|
- "\t\t },\n" +
|
|
|
- "\t\t {\n" +
|
|
|
- "\t\t\t\"icdCode\": \"A2\",\n" +
|
|
|
- "\t\t\t\"label\": \"\",\n" +
|
|
|
- "\t\t\t\"name\": \"A2\",\n" +
|
|
|
- "\t\t\t\"snode\": [\n" +
|
|
|
- "\t\t\t null\n" +
|
|
|
- "\t\t\t]\n" +
|
|
|
- "\t\t }\n" +
|
|
|
- "\t\t]\n" +
|
|
|
- "\t },\n" +
|
|
|
- "\t {\n" +
|
|
|
- "\t\t\"icdCode\": \"B\",\n" +
|
|
|
- "\t\t\"label\": \"\",\n" +
|
|
|
- "\t\t\"name\": \"B\",\n" +
|
|
|
- "\t\t\"snode\": [\n" +
|
|
|
- "\t\t null\n" +
|
|
|
- "\t\t]\n" +
|
|
|
- "\t }\n" +
|
|
|
- " ]\n" +
|
|
|
- "}";
|
|
|
-
|
|
|
- private void addNode(TreeDTO treeDTO) {
|
|
|
-
|
|
|
+ return tree;
|
|
|
}
|
|
|
|
|
|
public GraDTO getTuFac(KgQueryVO kgQueryVO) {
|