|
|
|
@ -96,7 +96,7 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
if (query.getRelation() != null && query.getRelation().length > 0) { |
|
|
|
for (String r : query.getRelation()) { |
|
|
|
// String it = String.format("r.name='%s'", r);
|
|
|
|
String it = String.format("r.docTitle='%s'", r); |
|
|
|
String it = String.format("r.name='%s'", r); |
|
|
|
lis.add(it); |
|
|
|
} |
|
|
|
cqr = String.join(" or ", lis); |
|
|
|
@ -106,11 +106,11 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
|
|
|
|
if (!StringUtils.isBlank(query.getNodename())) { |
|
|
|
if (query.getMatchtype() == 1) { |
|
|
|
cqWhere = String.format("where n.docTitle ='%s' ", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name ='%s' ", query.getNodename()); |
|
|
|
|
|
|
|
} else { |
|
|
|
// cqWhere = String.format("where n.name contains('%s')", query.getNodename());
|
|
|
|
cqWhere = String.format("where n.docTitle contains('%s')", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name contains('%s')", query.getNodename()); |
|
|
|
} |
|
|
|
} |
|
|
|
String nodeOnly = cqWhere; |
|
|
|
@ -184,7 +184,7 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
|
|
|
|
} else { |
|
|
|
// cqWhere = String.format("where n.name contains('%s')", query.getNodename());
|
|
|
|
cqWhere = String.format("where n.docTitle ='%s'", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name ='%s'", query.getNodename()); |
|
|
|
} |
|
|
|
} |
|
|
|
String nodeOnly = cqWhere; |
|
|
|
@ -247,7 +247,7 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
List<String> lis = new ArrayList<String>(); |
|
|
|
if (query.getNameList() != null && query.getNameList().length > 0) { |
|
|
|
for (String r : query.getNameList()) { |
|
|
|
String it = String.format("n.docTitle='%s'", r); |
|
|
|
String it = String.format("n.name='%s'", r); |
|
|
|
lis.add(it); |
|
|
|
} |
|
|
|
cqr = String.join(" or ", lis); |
|
|
|
@ -259,11 +259,11 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
|
|
|
|
if (!StringUtils.isBlank(query.getNodename())) { |
|
|
|
if (query.getMatchtype() == 1) { |
|
|
|
cqWhere = String.format("where n.docTitle ='%s' ", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name ='%s' ", query.getNodename()); |
|
|
|
|
|
|
|
} else { |
|
|
|
// cqWhere = String.format("where n.name contains('%s')", query.getNodename());
|
|
|
|
cqWhere = String.format("where n.docTitle contains('%s')", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name contains('%s')", query.getNodename()); |
|
|
|
} |
|
|
|
} |
|
|
|
String nodeOnly = cqWhere; |
|
|
|
@ -333,7 +333,7 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
|
|
|
|
} else { |
|
|
|
// cqWhere = String.format("where n.name contains('%s')", query.getNodename());
|
|
|
|
cqWhere = String.format("where n.docTitle =('%s')", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name =('%s')", query.getNodename()); |
|
|
|
} |
|
|
|
} |
|
|
|
String nodeOnly = cqWhere; |
|
|
|
@ -404,7 +404,7 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
|
|
|
|
} else { |
|
|
|
// cqWhere = String.format("where n.name contains('%s')", query.getNodename());
|
|
|
|
cqWhere = String.format("where n.docTitle contains('%s')", query.getNodename()); |
|
|
|
cqWhere = String.format("where n.name contains('%s')", query.getNodename()); |
|
|
|
} |
|
|
|
} |
|
|
|
String nodeOnly = cqWhere; |
|
|
|
@ -430,28 +430,28 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
for(int a=0;a<nno.size();a++){ |
|
|
|
HashMap<String, Object> aa = new HashMap<>(); |
|
|
|
aa.put("id",nno.get(a).get("uuid")); |
|
|
|
aa.put("name",nno.get(a).get("docTitle")); |
|
|
|
aa.put("name",nno.get(a).get("name")); |
|
|
|
aa.put("docId",nno.get(a).get("docId")); |
|
|
|
aa.put("docParentId",nno.get(a).get("docParentId")); |
|
|
|
if(nno.get(a).get("docLeve").equals("leve0")){ |
|
|
|
aa.put("parentId",nno.get(a).get("parentId")); |
|
|
|
if(nno.get(a).get("leve").equals("leve0")){ |
|
|
|
aa.put("group","0"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve1")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve1")){ |
|
|
|
aa.put("group","1"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve2")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve2")){ |
|
|
|
aa.put("group","2"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve3")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve3")){ |
|
|
|
aa.put("group","3"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve4")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve4")){ |
|
|
|
aa.put("group","4"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve5")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve5")){ |
|
|
|
aa.put("group","5"); |
|
|
|
} |
|
|
|
if(nno.get(a).get("docLeve").equals("leve6")){ |
|
|
|
if(nno.get(a).get("leve").equals("leve6")){ |
|
|
|
aa.put("group","6"); |
|
|
|
} |
|
|
|
|
|
|
|
@ -492,28 +492,28 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
for(int a=0;a<nodeItem.size();a++){ |
|
|
|
HashMap<String, Object> aa = new HashMap<>(); |
|
|
|
aa.put("id",nodeItem.get(a).get("docId")); |
|
|
|
aa.put("name",nodeItem.get(a).get("docTitle")); |
|
|
|
aa.put("docParentId",nodeItem.get(a).get("docParentId")); |
|
|
|
aa.put("name",nodeItem.get(a).get("name")); |
|
|
|
aa.put("parentId",nodeItem.get(a).get("parentId")); |
|
|
|
|
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve0")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve0")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("0")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve1")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve1")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("1")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve2")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve2")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("2")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve3")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve3")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("3")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve4")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve4")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("4")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve5")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve5")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("5")); |
|
|
|
} |
|
|
|
if(nodeItem.get(a).get("docLeve").equals("leve6")){ |
|
|
|
if(nodeItem.get(a).get("leve").equals("leve6")){ |
|
|
|
aa.put("group",nodeItem.get(a).get("6")); |
|
|
|
} |
|
|
|
|
|
|
|
@ -536,29 +536,29 @@ public class GraphServiceImpl implements GraphService { |
|
|
|
for(int a=0;a<graphNode.size();a++){ |
|
|
|
HashMap<String, Object> aa = new HashMap<>(); |
|
|
|
aa.put("id",graphNode.get(a).get("uuid")); |
|
|
|
aa.put("name",graphNode.get(a).get("docTitle")); |
|
|
|
aa.put("name",graphNode.get(a).get("name")); |
|
|
|
aa.put("docId",graphNode.get(a).get("docId")); |
|
|
|
aa.put("docParentId",graphNode.get(a).get("docParentId")); |
|
|
|
aa.put("parentId",graphNode.get(a).get("parentId")); |
|
|
|
|
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve0")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve0")){ |
|
|
|
aa.put("group","0"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve1")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve1")){ |
|
|
|
aa.put("group","1"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve2")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve2")){ |
|
|
|
aa.put("group","2"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve3")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve3")){ |
|
|
|
aa.put("group","3"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve4")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve4")){ |
|
|
|
aa.put("group","4"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve5")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve5")){ |
|
|
|
aa.put("group","5"); |
|
|
|
} |
|
|
|
if(graphNode.get(a).get("docLeve").equals("leve6")){ |
|
|
|
if(graphNode.get(a).get("leve").equals("leve6")){ |
|
|
|
aa.put("group","6"); |
|
|
|
} |
|
|
|
|
|
|
|
|