提交 bf3381f2 编写于 作者: tangyaolong's avatar tangyaolong

調整先後順序

上级 2a91a0c9
......@@ -168,20 +168,24 @@ public class MetaModelExService extends MetaModelServiceImpl {
}
entities.add(item.getEntity());
});
if(entities.size()>0){
LinkedHashSet<DstDataSource> dataSource = new LinkedHashSet();
LinkedHashSet<DstSystem> systems = new LinkedHashSet();
for (MetaEntity entity : entities) {
if(!ObjectUtils.isEmpty(entity.getDataSource())){
dataSource.add(entity.getDataSource());
}
if(!ObjectUtils.isEmpty(entity.getSystem())){
systems.add(entity.getSystem());
}
}
dstSystemService.saveBatch(systems);
metaEntityService.saveBatch(entities);
dstDataSourceService.saveBatch(dataSource);
//核心数据导入
if (model.getMetaModel() != null) {
metaModelService.save(model.getMetaModel());
}
if (model.getSystems().size() > 0) {
dstSystemService.saveBatch(model.getSystems());
}
if (model.getDataSources().size() > 0) {
dstDataSourceService.saveBatch(model.getDataSources());
}
if (model.getDaBuilds().size() > 0) {
idaBuildService.saveBatch(model.getDaBuilds());
}
if (model.getMetrics().size() > 0) {
idaMetricService.saveBatch(model.getMetrics());
}
if (model.getRuleItems().size() > 0) {
ruleItemService.saveBatch(model.getRuleItems());
}
if(p_relations.size()>0){
relationshipService.saveBatch(p_relations);
......@@ -196,19 +200,6 @@ public class MetaModelExService extends MetaModelServiceImpl {
fieldService.saveBatch(fields);
}
}
//核心数据导入
if (model.getMetaModel() != null) {
metaModelService.save(model.getMetaModel());
}
if (model.getDaBuilds().size() > 0) {
idaBuildService.saveBatch(model.getDaBuilds());
}
if (model.getMetrics().size() > 0) {
idaMetricService.saveBatch(model.getMetrics());
}
if (model.getRuleItems().size() > 0) {
ruleItemService.saveBatch(model.getRuleItems());
}
}
}
return super.importFile(et);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册