|
@@ -66,7 +66,11 @@ public class DimEntityServiceImpl implements DimEntityService {
|
|
|
EntityRelationshipVo d0_relationshipVo = relationshipVos.get(0);
|
|
|
String d0_entilayer = d0_relationshipVo.getEntilayer();
|
|
|
Map<String, Object> d0_EntityData = dimEntityMapper.queryEntityDataByEntityId(d0_entilayer, entityid);
|
|
|
- result.put("info", d0_EntityData);
|
|
|
+ if (d0_EntityData == null) {
|
|
|
+ result.put("info", new HashMap<String, Object>());
|
|
|
+ } else {
|
|
|
+ result.put("info", d0_EntityData);
|
|
|
+ }
|
|
|
//查询空间详细数据
|
|
|
List<Map<String, Object>> geomList = new ArrayList<Map<String, Object>>();
|
|
|
if (d0_EntityData != null) {
|
|
@@ -156,10 +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 entityid, n.entilayer as entilayer, " +
|
|
|
- " b.entityid as comentityid, b.entilayer as comilayer, " +
|
|
|
- "type(r) as comrelation";
|
|
|
+ String sql = "match (n:Entity{ entityid:'" + entityid + "'}) <-[r]->(b:Entity) " + "return n.entityid as entityid, n.entilayer as entilayer, " + " b.entityid as comentityid, b.entilayer as comilayer, " + "type(r) as comrelation";
|
|
|
System.out.println("cql:" + sql);
|
|
|
Collection<Map<String, Object>> links = neo4jClient.query(sql).fetch().all();
|
|
|
if (links.isEmpty()) {
|