|
|
@@ -68,10 +68,11 @@ public class DimEntityServiceImpl implements DimEntityService {
|
|
|
public Map<String, Object> queryEntityData(String entityid) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
//获取所有的实体关系表
|
|
|
- List<String> tablesList = dimEntityMapper.querySchemaTableByName("vector", "实体图元关联表");
|
|
|
+ List<String> tablesList = dimEntityMapper.querySchemaTableByName("vector", "syst_实体图元关联表");
|
|
|
if (tablesList == null || tablesList.size() == 0) {
|
|
|
return result;
|
|
|
}
|
|
|
+ // ###### TODO:这里用到了关联关系图层
|
|
|
List<EntityRelationshipVo> relationshipVos = dimEntityMapper.queryEntityRelationshipDataByEntityId(entityid, tablesList);
|
|
|
if (relationshipVos == null || relationshipVos.size() == 0) {
|
|
|
return result;
|
|
|
@@ -125,7 +126,7 @@ public class DimEntityServiceImpl implements DimEntityService {
|
|
|
return;
|
|
|
}
|
|
|
//获取所有的实体关系表
|
|
|
- List<String> tablesList = dimEntityMapper.querySchemaTableByName("vector", "实体图元关联表");
|
|
|
+ List<String> tablesList = dimEntityMapper.querySchemaTableByName("vector", "syst_实体图元关联表");
|
|
|
|
|
|
|
|
|
//通过实体关系表,获取实体关系表中,所有映射的实体代理点。此处创建视图,视图将一个小时后删除
|
|
|
@@ -173,7 +174,7 @@ public class DimEntityServiceImpl implements DimEntityService {
|
|
|
@Override
|
|
|
public void createEntityRelationshipToNeo4j(EntityRelationshipToNeo4jVo entityRelationshipToNeo4jVo) {
|
|
|
// String cql = "match (a:Entity {entityid:'MA1001NE103K1034230XXXXXXXXXXXXX2501010009'}), (b:Entity {entityid:'MA1001NE103K103423043622XXXXXXXX2301010018'}) MERGE (a)-[r:关系]->(b)";
|
|
|
- String cql = "match " + "(a:Entity {entityid:'" + entityRelationshipToNeo4jVo.getEntityid() + "'})," + "(b:Entity {entityid:'" + entityRelationshipToNeo4jVo.getComentityid() + "'}) " + " MERGE (a)-[r:" + entityRelationshipToNeo4jVo.getComrelation() + "]->(b) ";
|
|
|
+ String cql = "MERGE (a:Entity {entityid:'" + entityRelationshipToNeo4jVo.getEntityid() + "'})" + " MERGE (b:Entity {entityid:'" + entityRelationshipToNeo4jVo.getComentityid() + "'}) " + " MERGE (a)-[r:" + entityRelationshipToNeo4jVo.getComrelation() + "]->(b) ";
|
|
|
neo4jClient.query(cql).run();
|
|
|
}
|
|
|
|
|
|
@@ -282,6 +283,12 @@ public class DimEntityServiceImpl implements DimEntityService {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<EntityRelationshipToNeo4jVo> queryRelationshipDateByTableName(String tableName) {
|
|
|
+ List<EntityRelationshipToNeo4jVo> list = dimEntityMapper.queryRelationshipDateByTableName(tableName);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Object> queryEntityRelationshipFilter(Map map) {
|
|
|
String query_data = (String) map.get("query_data");
|