Commit 9415f88c by qiuchaofei

1按照环境 区分系统

parent cd4ccaf6
......@@ -165,7 +165,7 @@ public class MetaDataController {
returnReslult = multiModelService.findResultByModelNameList(modelNameList, sizeInt);
}
else if(modelName0.toLowerCase().equals("system")){
returnReslult = metadataService.getSystemGraph(sizeInt);
returnReslult = metadataService.getSystemGraph("",sizeInt);
}else if( !modelName0.toLowerCase().equals("all")){
returnReslult = metadataService.findResultByModelName(modelName0,sizeInt);
}else{
......@@ -334,7 +334,7 @@ public class MetaDataController {
@RequestMapping(path = "/getSystemGraph", method = RequestMethod.GET)
public ReturnReslult getSystemGraph(){
int size = 300;
return metadataService.getSystemGraph(size);
return metadataService.getSystemGraph("",size);
}
......
......@@ -75,13 +75,21 @@ public class RelationalGraphController {
//系统总图的接口
@ApiOperation(tags = "", value = "系统总图")
@ApiOperation(tags = "", value = "按照环境参数返回系统总图")
@RequestMapping(path = "/getAllSystemGraph", method = RequestMethod.GET)
public ReturnReslult getAllSystemGraph(){
public ReturnReslult getAllSystemGraph(String environment){
int size = 300;
return metadataService.getSystemGraph(size);
return metadataService.getSystemGraph(environment,size);
}
// //系统总图的接口
// @ApiOperation(tags = "", value = "按照环境参数返回系统总图")
// @RequestMapping(path = "/getAllSystemGraphByEnvironment", method = RequestMethod.GET)
// public ReturnReslult getAllSystemGraphByEnvironment(String environment){
// int size = 300;
// return metadataService.getSystemGraph(environment,size);
//
// }
//schema的分层,图的形式,由里到外,同上面的分层接口
//系统总图下钻获取schema,schema要分层
@ApiOperation(tags = "", value = "按照系统获取schema,要分层")
......
......@@ -17,8 +17,7 @@ public interface IMetadataService {
ReturnReslult findResultByModelName(String modelName,int count );
ReturnReslult getSystemGraph(int size);
ReturnReslult getSystemGraph(String catalogName,int size);
ReturnReslult searchGraph(String metadataId,int layer );
List<MetaData> findChildrenByParentId(String parentId,Integer count);
......
......@@ -370,7 +370,7 @@ public class MetadataServiceImpl implements IMetadataService {
}
@Override
public ReturnReslult getSystemGraph(int size) {
public ReturnReslult getSystemGraph(String catlogName,int size) {
ReturnReslult returnReslult = new ReturnReslult();
......@@ -382,7 +382,13 @@ public class MetadataServiceImpl implements IMetadataService {
" union match data=(na:softplatform) return data " +
" union match data=(na:Neo4jSystem)<-[r]->(nb:Neo4jSystem) return data " +
" union match data=(na:Neo4jSystem) return data ";
logger.info("系统总图的查询语句:" + cypher);
if(catlogName !=null && !catlogName.equals("")){
cypher = "match data=(na:softplatform)<-[r]->(nb:softplatform) return data " +
" union match data=(na:softplatform) return data " +
" union match data=(na:Neo4jSystem)<-[r]->(nb:Neo4jSystem) where na.metadataId=~'.*=\"+catlogName+\"=.*' return data " +
" union match data=(na:Neo4jSystem) where na.metadataId=~'.*="+catlogName+"=.*' return data ";
}
logger.info("系统环境参数:"+catlogName+";系统总图的查询语句:" + cypher);
long starttime = System.currentTimeMillis();
StatementResult result = session.run(cypher);
......
......@@ -120,11 +120,11 @@ public class TableServiceImpl implements ITableService {
returnNode.setCnName(cnName);
standardList.add(returnNode);
}
relationObjects.put("标准",standardList);
}catch (Exception e){
e.printStackTrace();
}
relationObjects.put("标准",standardList);
long start = System.currentTimeMillis();
List<ReturnNode> neo4jTableList = getCurrentTableInfo(tableId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment