|
|
|
@ -203,14 +203,13 @@ public class SeKnowGroupController extends JeecgController<SeKnowGroup, ISeKnowG |
|
|
|
|
NodeName nodes1 = new NodeName(); |
|
|
|
|
//根据id获取知识点名字,并且进行赋值
|
|
|
|
|
nodes1.setName(seKonwService.getById(listid.get(i)).getName()); |
|
|
|
|
|
|
|
|
|
nodelist.add(nodes1); |
|
|
|
|
//开始第二层循环
|
|
|
|
|
List<String> listid2 = seKnowGroupService.listid(listid.get(i)); |
|
|
|
|
for (int j =0;j<listid2.size();j++ ){ |
|
|
|
|
NodeName nodes2 = new NodeName(); |
|
|
|
|
nodes2.setName(seKonwService.getById(listid.get(j)).getName()); |
|
|
|
|
nodelist.add(nodes2); |
|
|
|
|
System.out.println(seKonwService.getById(listid.get(j)).getName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//现在开始组装知识图谱经管系节点
|
|
|
|
@ -218,6 +217,7 @@ public class SeKnowGroupController extends JeecgController<SeKnowGroup, ISeKnowG |
|
|
|
|
//首先根据中心知识点查询
|
|
|
|
|
List<SeKonwRelationshipMain> segouplisttemp = new ArrayList<>(); |
|
|
|
|
segouplisttemp=seKnowGroupService.getzxzsnodelist(seknow.getId()); |
|
|
|
|
//第二层
|
|
|
|
|
for (int i=0; i< segouplisttemp.size();i++){ |
|
|
|
|
NodeList ndoesl = new NodeList(); |
|
|
|
|
ndoesl.setSource(seKonwService.getById(segouplisttemp.get(i).getPerKowId()).getName()); |
|
|
|
@ -228,22 +228,15 @@ public class SeKnowGroupController extends JeecgController<SeKnowGroup, ISeKnowG |
|
|
|
|
segouplisttemp2=seKnowGroupService.getzxzsnodelist(segouplisttemp.get(i).getNextKnowId()); |
|
|
|
|
for (int j=0;j<segouplisttemp2.size();j++){ |
|
|
|
|
NodeList ndoesl2 = new NodeList(); |
|
|
|
|
ndoesl2.setSource(seKonwService.getById(segouplisttemp.get(i).getPerKowId()).getName()); |
|
|
|
|
ndoesl2.setTarget(seKonwService.getById(segouplisttemp.get(i).getNextKnowId()).getName()); |
|
|
|
|
ndoesl2.setValue(seKonwService.getrelaint(segouplisttemp.get(i).getRelationId())); |
|
|
|
|
ndoesl2.setSource(seKonwService.getById(segouplisttemp2.get(j).getPerKowId()).getName()); |
|
|
|
|
ndoesl2.setTarget(seKonwService.getById(segouplisttemp2.get(j).getNextKnowId()).getName()); |
|
|
|
|
ndoesl2.setValue(seKonwService.getrelaint(segouplisttemp2.get(j).getRelationId())); |
|
|
|
|
nodelistdss.add(ndoesl2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Exports exep = new Exports(); |
|
|
|
|
exep.setNodes(nodelist.stream().distinct().collect(Collectors.toList())); |
|
|
|
|
exep.setLinks(nodelistdss); |
|
|
|
|
|
|
|
|
|
System.out.println(exep); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return exep; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|