Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
64427443
提交
64427443
编写于
12月 31, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibz-dst,应用]
上级
194136ef
变更
15
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
162 行增加
和
32 行删除
+162
-32
dabuilds.ts
app_web/src/mock/entity/dabuilds/dabuilds.ts
+4
-4
meta-models.ts
app_web/src/mock/entity/meta-models/meta-models.ts
+38
-0
dabuild-service-base.ts
app_web/src/service/dabuild/dabuild-service-base.ts
+6
-6
meta-model-service-base.ts
app_web/src/service/meta-model/meta-model-service-base.ts
+28
-0
meta-model-ui-service-base.ts
...eb/src/uiservice/meta-model/meta-model-ui-service-base.ts
+19
-0
IDABuildService.java
...ava/cn/ibizlab/core/analysis/service/IDABuildService.java
+2
-2
DABuildServiceImpl.java
...bizlab/core/analysis/service/impl/DABuildServiceImpl.java
+3
-3
DABuildExService.java
.../cn/ibizlab/core/extensions/service/DABuildExService.java
+3
-3
MetaModelExService.java
...n/ibizlab/core/extensions/service/MetaModelExService.java
+10
-0
IMetaModelService.java
.../java/cn/ibizlab/core/lite/service/IMetaModelService.java
+2
-0
MetaModelServiceImpl.java
.../ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
+16
-0
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+2
-2
systemResource.json
...st-core/src/main/resources/permission/systemResource.json
+2
-2
DABuildResource.java
...pi/src/main/java/cn/ibizlab/api/rest/DABuildResource.java
+10
-10
MetaModelResource.java
.../src/main/java/cn/ibizlab/api/rest/MetaModelResource.java
+17
-0
未找到文件。
app_web/src/mock/entity/dabuilds/dabuilds.ts
浏览文件 @
64427443
...
...
@@ -233,16 +233,16 @@ mock.onPost(new RegExp(/^\/dabuilds\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
});
// Export
Zip
mock
.
onPost
(
new
RegExp
(
/^
\/
dabuilds
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
export
zip
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dabuild 方法: Export
Zip
"
);
// Export
File
mock
.
onPost
(
new
RegExp
(
/^
\/
dabuilds
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
export
file
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dabuild 方法: Export
File
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'build_id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dabuilds
\/([
a-zA-Z0-9
\-\;]{1,35})\/
export
zip
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dabuilds
\/([
a-zA-Z0-9
\-\;]{1,35})\/
export
file
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/mock/entity/meta-models/meta-models.ts
浏览文件 @
64427443
...
...
@@ -309,6 +309,44 @@ mock.onPost(new RegExp(/^\/metamodels\/?([a-zA-Z0-9\-\;]{0,35})\/exportfile$/)).
return
[
status
,
data
];
});
// ImportFile
mock
.
onPost
(
new
RegExp
(
/^
\/
metamodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
importfile$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metamodel 方法: ImportFile"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
metamodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
importfile$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
metamodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metamodel 方法: Save"
);
...
...
app_web/src/service/dabuild/dabuild-service-base.ts
浏览文件 @
64427443
...
...
@@ -156,7 +156,7 @@ export default class DABuildServiceBase extends EntityService {
}
/**
* Export
Zip
接口方法
* Export
File
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -164,13 +164,13 @@ export default class DABuildServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof DABuildServiceBase
*/
public
async
Export
Zip
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/dabuilds/
${
context
.
dabuild
}
/export
zip
`
,
data
,
isloading
);
public
async
Export
File
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/dabuilds/
${
context
.
dabuild
}
/export
file
`
,
data
,
isloading
);
return
res
;
}
/**
* Export
Zip
Batch接口方法
* Export
File
Batch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -178,9 +178,9 @@ export default class DABuildServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof DABuildServiceBase
*/
public
async
Export
Zip
Batch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Export
File
Batch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/dabuild/export
zip
batch`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/dabuild/export
file
batch`
,
tempData
,
isloading
);
}
/**
...
...
app_web/src/service/meta-model/meta-model-service-base.ts
浏览文件 @
64427443
...
...
@@ -209,6 +209,34 @@ export default class MetaModelServiceBase extends EntityService {
return
await
Http
.
getInstance
().
post
(
`/metamodel/exportfilebatch`
,
tempData
,
isloading
);
}
/**
* ImportFile接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaModelServiceBase
*/
public
async
ImportFile
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/metamodels/
${
context
.
metamodel
}
/importfile`
,
data
,
isloading
);
return
res
;
}
/**
* ImportFileBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaModelServiceBase
*/
public
async
ImportFileBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/metamodel/importfilebatch`
,
tempData
,
isloading
);
}
/**
* Save接口方法
*
...
...
app_web/src/uiservice/meta-model/meta-model-ui-service-base.ts
浏览文件 @
64427443
...
...
@@ -161,6 +161,9 @@ export default class MetaModelUIServiceBase extends UIService {
const
openIndexViewTab
=
(
data
:
any
)
=>
{
const
routePath
=
actionContext
.
$viewTool
.
buildUpRoutePath
(
actionContext
.
$route
,
context
,
deResParameters
,
parameters
,
_args
,
data
);
actionContext
.
$router
.
push
(
routePath
);
if
(
this
.
MetaModel_importAfter
&&
this
.
MetaModel_importAfter
instanceof
Function
)
{
this
.
MetaModel_importAfter
([
data
],
context
,
params
,
$event
,
xData
,
actionContext
);
}
return
null
;
}
openIndexViewTab
(
data
);
...
...
@@ -247,6 +250,22 @@ export default class MetaModelUIServiceBase extends UIService {
backend
();
}
/**
* 模型导入
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
MetaModel_importAfter
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'不支持单项数据'
});
}
/**
* 获取指定数据的重定向页面
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/IDABuildService.java
浏览文件 @
64427443
...
...
@@ -34,8 +34,8 @@ public interface IDABuildService extends IService<DABuild> {
DABuild
get
(
String
key
);
DABuild
getDraft
(
DABuild
et
);
boolean
checkKey
(
DABuild
et
);
DABuild
export
Zip
(
DABuild
et
);
boolean
export
Zip
Batch
(
List
<
DABuild
>
etList
);
DABuild
export
File
(
DABuild
et
);
boolean
export
File
Batch
(
List
<
DABuild
>
etList
);
DABuild
run
(
DABuild
et
);
boolean
runBatch
(
List
<
DABuild
>
etList
);
boolean
save
(
DABuild
et
);
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/impl/DABuildServiceImpl.java
浏览文件 @
64427443
...
...
@@ -138,16 +138,16 @@ public class DABuildServiceImpl extends ServiceImpl<DABuildMapper, DABuild> impl
}
@Override
@Transactional
public
DABuild
export
Zip
(
DABuild
et
)
{
public
DABuild
export
File
(
DABuild
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
export
Zip
Batch
(
List
<
DABuild
>
etList
)
{
public
boolean
export
File
Batch
(
List
<
DABuild
>
etList
)
{
for
(
DABuild
et
:
etList
)
{
export
Zip
(
et
);
export
File
(
et
);
}
return
true
;
}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/DABuildExService.java
浏览文件 @
64427443
...
...
@@ -22,14 +22,14 @@ public class DABuildExService extends DABuildServiceImpl {
}
/**
* [Export
Zip:导出Zip] 行为扩展:导出模型的Zip
* [Export
File:导出文件] 行为扩展:导出模型的文件
* @param et
* @return
*/
@Override
@Transactional
public
DABuild
export
Zip
(
DABuild
et
)
{
return
super
.
export
Zip
(
et
);
public
DABuild
export
File
(
DABuild
et
)
{
return
super
.
export
File
(
et
);
}
/**
* [Run:运行] 行为扩展
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/MetaModelExService.java
浏览文件 @
64427443
...
...
@@ -41,5 +41,15 @@ public class MetaModelExService extends MetaModelServiceImpl {
public
MetaModel
exportFile
(
MetaModel
et
)
{
return
super
.
exportFile
(
et
);
}
/**
* [ImportFile:导入文件] 行为扩展:传入一个文件,将该文件转化成对象,根据对象执行表更新操作
* @param et
* @return
*/
@Override
@Transactional
public
MetaModel
importFile
(
MetaModel
et
)
{
return
super
.
importFile
(
et
);
}
}
ibzdst-core/src/main/java/cn/ibizlab/core/lite/service/IMetaModelService.java
浏览文件 @
64427443
...
...
@@ -41,6 +41,8 @@ public interface IMetaModelService extends IService<MetaModel> {
boolean
checkKey
(
MetaModel
et
);
MetaModel
exportFile
(
MetaModel
et
);
boolean
exportFileBatch
(
List
<
MetaModel
>
etList
);
MetaModel
importFile
(
MetaModel
et
);
boolean
importFileBatch
(
List
<
MetaModel
>
etList
);
boolean
save
(
MetaModel
et
);
@CacheEvict
(
value
=
"metamodel"
,
allEntries
=
true
)
void
saveBatch
(
List
<
MetaModel
>
list
);
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
浏览文件 @
64427443
...
...
@@ -173,6 +173,22 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
return
true
;
}
@Override
@Transactional
public
MetaModel
importFile
(
MetaModel
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
importFileBatch
(
List
<
MetaModel
>
etList
)
{
for
(
MetaModel
et
:
etList
)
{
importFile
(
et
);
}
return
true
;
}
@Override
@Transactional
public
boolean
save
(
MetaModel
et
)
{
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
64427443
...
...
@@ -4,7 +4,7 @@
<!--输出实体[DA_BUILD]数据结构 -->
<changeSet
author=
"root"
id=
"tab-da_build-
69
-1"
>
<changeSet
author=
"root"
id=
"tab-da_build-
70
-1"
>
<createTable
tableName=
"IBZDABUILD"
>
<column
name=
"BUILDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_BUILD_BUILDID"
/>
...
...
@@ -328,7 +328,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"root"
id=
"tab-meta_model-
37
-12"
>
<changeSet
author=
"root"
id=
"tab-meta_model-
42
-12"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
...
ibzdst-core/src/main/resources/permission/systemResource.json
浏览文件 @
64427443
...
...
@@ -8,7 +8,7 @@
"delogicname"
:
"分析"
,
"sysmoudle"
:{
"id"
:
"ANALYSIS"
,
"name"
:
"analysis"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Export
Zip"
,
"name"
:
"导出Zip
"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Export
File"
,
"name"
:
"导出文件
"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -120,7 +120,7 @@
"delogicname"
:
"模型"
,
"sysmoudle"
:{
"id"
:
"LITE"
,
"name"
:
"lite"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Change"
,
"name"
:
"change"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"ExportFile"
,
"name"
:
"导出文件"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Change"
,
"name"
:
"change"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"ExportFile"
,
"name"
:
"导出文件"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
ImportFile"
,
"name"
:
"导入文件"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/DABuildResource.java
浏览文件 @
64427443
...
...
@@ -120,21 +120,21 @@ public class DABuildResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
checkKey
(
dabuildMapping
.
toDomain
(
dabuilddto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Export
Zip
-all')"
)
@ApiOperation
(
value
=
"导出
Zip"
,
tags
=
{
"分析"
},
notes
=
"导出Zip
"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/export
zip
"
)
public
ResponseEntity
<
DABuildDTO
>
export
Zip
(
@PathVariable
(
"dabuild_id"
)
String
dabuild_id
,
@RequestBody
DABuildDTO
dabuilddto
)
{
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Export
File
-all')"
)
@ApiOperation
(
value
=
"导出
文件"
,
tags
=
{
"分析"
},
notes
=
"导出文件
"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/export
file
"
)
public
ResponseEntity
<
DABuildDTO
>
export
File
(
@PathVariable
(
"dabuild_id"
)
String
dabuild_id
,
@RequestBody
DABuildDTO
dabuilddto
)
{
DABuild
domain
=
dabuildMapping
.
toDomain
(
dabuilddto
);
domain
.
setBuildId
(
dabuild_id
);
domain
=
dabuildService
.
export
Zip
(
domain
);
domain
=
dabuildService
.
export
File
(
domain
);
dabuilddto
=
dabuildMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuilddto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Export
Zip
-all')"
)
@ApiOperation
(
value
=
"批量处理[导出
Zip]"
,
tags
=
{
"分析"
},
notes
=
"批量处理[导出Zip
]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/export
zip
batch"
)
public
ResponseEntity
<
Boolean
>
export
Zip
Batch
(
@RequestBody
List
<
DABuildDTO
>
dabuilddtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
export
Zip
Batch
(
dabuildMapping
.
toDomain
(
dabuilddtos
)));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Export
File
-all')"
)
@ApiOperation
(
value
=
"批量处理[导出
文件]"
,
tags
=
{
"分析"
},
notes
=
"批量处理[导出文件
]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/export
file
batch"
)
public
ResponseEntity
<
Boolean
>
export
File
Batch
(
@RequestBody
List
<
DABuildDTO
>
dabuilddtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
export
File
Batch
(
dabuildMapping
.
toDomain
(
dabuilddtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Run-all')"
)
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/MetaModelResource.java
浏览文件 @
64427443
...
...
@@ -155,6 +155,23 @@ public class MetaModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metamodelService
.
exportFileBatch
(
metamodelMapping
.
toDomain
(
metamodeldtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ImportFile-all')"
)
@ApiOperation
(
value
=
"导入文件"
,
tags
=
{
"模型"
},
notes
=
"导入文件"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metamodels/{metamodel_id}/importfile"
)
public
ResponseEntity
<
MetaModelDTO
>
importFile
(
@PathVariable
(
"metamodel_id"
)
String
metamodel_id
,
@RequestBody
MetaModelDTO
metamodeldto
)
{
MetaModel
domain
=
metamodelMapping
.
toDomain
(
metamodeldto
);
domain
.
setId
(
metamodel_id
);
domain
=
metamodelService
.
importFile
(
domain
);
metamodeldto
=
metamodelMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metamodeldto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-ImportFile-all')"
)
@ApiOperation
(
value
=
"批量处理[导入文件]"
,
tags
=
{
"模型"
},
notes
=
"批量处理[导入文件]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metamodels/{metamodel_id}/importfilebatch"
)
public
ResponseEntity
<
Boolean
>
importFileBatch
(
@RequestBody
List
<
MetaModelDTO
>
metamodeldtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metamodelService
.
importFileBatch
(
metamodelMapping
.
toDomain
(
metamodeldtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaModel-Save-all')"
)
@ApiOperation
(
value
=
"保存模型"
,
tags
=
{
"模型"
},
notes
=
"保存模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metamodels/save"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录