Browse Source

关系节点返回字段更改

DESKTOP-2K9OVK9\siwei 5 months ago
parent
commit
114c0582f4

+ 1 - 1
onemap-modules/onemap-apply/src/main/java/com/onemap/apply/service/dimentity/impl/DimEntityServiceImpl.java

@@ -160,7 +160,7 @@ public class DimEntityServiceImpl implements DimEntityService {
     public Map<String, Object> queryEntityRelationshipToNeo4j(String entityid) {
         Map<String, Object> retMap = new HashMap<>();
 //        String sql = "match (n:Entity{ entityid:'MA1001NE103K1034230XXXXXXXXXXXXX2501010009'}) <-[r]->(b:Entity)  return b.entityid, type(r)";
-        String sql = "match (n:Entity{ entityid:'" + entityid + "'}) <-[r]->(b:Entity)  " + "return n.entityid as source,  n.entilayer as entilayer, " + " b.entityid as target,  b.entilayer as comilayer,  " + "type(r) as comrelation";
+        String sql = "match (n:Entity{ entityid:'" + entityid + "'}) <-[r]->(b:Entity)  " + "return n.entityid as source,  n.entilayer as entilayer, " + " b.entityid as target,  b.entilayer as comilayer,  " + "type(r) as value";
         System.out.println("cql:" + sql);
         Collection<Map<String, Object>> links = neo4jClient.query(sql).fetch().all();
         if (links.isEmpty()) {