Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
eab99da0
提交
eab99da0
编写于
6月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
5b8e2ed0
变更
43
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
43 个修改的文件
包含
1439 行增加
和
1316 行删除
+1439
-1316
wfgroups.ts
app_web/src/mock/entity/wfgroups/wfgroups.ts
+24
-24
wfmembers.ts
app_web/src/mock/entity/wfmembers/wfmembers.ts
+113
-113
wfprocess-definitions.ts
...ock/entity/wfprocess-definitions/wfprocess-definitions.ts
+46
-46
wfremodels.ts
app_web/src/mock/entity/wfremodels/wfremodels.ts
+51
-51
wfsystems.ts
app_web/src/mock/entity/wfsystems/wfsystems.ts
+34
-34
wfusers.ts
app_web/src/mock/entity/wfusers/wfusers.ts
+44
-44
wfgroup-mpickup-view-base.vue
...rkflow/wfgroup-mpickup-view/wfgroup-mpickup-view-base.vue
+11
-2
wfuser-mpickup-view-base.vue
...workflow/wfuser-mpickup-view/wfuser-mpickup-view-base.vue
+11
-2
wfgroup-service-base.ts
app_web/src/service/wfgroup/wfgroup-service-base.ts
+43
-43
wfmember-service-base.ts
app_web/src/service/wfmember/wfmember-service-base.ts
+70
-70
wfprocess-definition-service-base.ts
...wfprocess-definition/wfprocess-definition-service-base.ts
+24
-24
wfremodel-service-base.ts
app_web/src/service/wfremodel/wfremodel-service-base.ts
+31
-31
wfsystem-service-base.ts
app_web/src/service/wfsystem/wfsystem-service-base.ts
+27
-27
wfuser-service-base.ts
app_web/src/service/wfuser/wfuser-service-base.ts
+59
-59
IWFGroupService.java
...ava/cn/ibizlab/core/workflow/service/IWFGroupService.java
+6
-6
IWFHistoryService.java
...a/cn/ibizlab/core/workflow/service/IWFHistoryService.java
+6
-6
IWFMemberService.java
...va/cn/ibizlab/core/workflow/service/IWFMemberService.java
+5
-5
IWFProcessDefinitionService.java
...ab/core/workflow/service/IWFProcessDefinitionService.java
+7
-7
IWFProcessInstanceService.java
...zlab/core/workflow/service/IWFProcessInstanceService.java
+5
-5
IWFProcessNodeService.java
.../ibizlab/core/workflow/service/IWFProcessNodeService.java
+6
-6
IWFREModelService.java
...a/cn/ibizlab/core/workflow/service/IWFREModelService.java
+6
-6
IWFSystemService.java
...va/cn/ibizlab/core/workflow/service/IWFSystemService.java
+6
-6
IWFTaskService.java
...java/cn/ibizlab/core/workflow/service/IWFTaskService.java
+4
-4
IWFTaskWayService.java
...a/cn/ibizlab/core/workflow/service/IWFTaskWayService.java
+5
-5
IWFUserService.java
...java/cn/ibizlab/core/workflow/service/IWFUserService.java
+6
-6
WFGroupServiceImpl.java
...bizlab/core/workflow/service/impl/WFGroupServiceImpl.java
+46
-46
WFHistoryServiceImpl.java
...zlab/core/workflow/service/impl/WFHistoryServiceImpl.java
+22
-22
WFMemberServiceImpl.java
...izlab/core/workflow/service/impl/WFMemberServiceImpl.java
+38
-38
WFProcessDefinitionServiceImpl.java
...workflow/service/impl/WFProcessDefinitionServiceImpl.java
+37
-37
WFProcessInstanceServiceImpl.java
...e/workflow/service/impl/WFProcessInstanceServiceImpl.java
+16
-16
WFProcessNodeServiceImpl.java
.../core/workflow/service/impl/WFProcessNodeServiceImpl.java
+24
-24
WFSystemServiceImpl.java
...izlab/core/workflow/service/impl/WFSystemServiceImpl.java
+36
-36
WFTaskServiceImpl.java
...ibizlab/core/workflow/service/impl/WFTaskServiceImpl.java
+16
-16
WFTaskWayServiceImpl.java
...zlab/core/workflow/service/impl/WFTaskWayServiceImpl.java
+16
-16
WFUserServiceImpl.java
...ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
+45
-45
systemResource.json
ibzwf-core/src/main/resources/permission/systemResource.json
+6
-6
WFGroupResource.java
...pi/src/main/java/cn/ibizlab/api/rest/WFGroupResource.java
+43
-43
WFMemberResource.java
...i/src/main/java/cn/ibizlab/api/rest/WFMemberResource.java
+143
-143
WFProcessDefinitionResource.java
...java/cn/ibizlab/api/rest/WFProcessDefinitionResource.java
+46
-46
WFREModelResource.java
.../src/main/java/cn/ibizlab/api/rest/WFREModelResource.java
+40
-40
WFSystemResource.java
...i/src/main/java/cn/ibizlab/api/rest/WFSystemResource.java
+46
-46
WFUserResource.java
...api/src/main/java/cn/ibizlab/api/rest/WFUserResource.java
+50
-50
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+119
-14
未找到文件。
app_web/src/mock/entity/wfgroups/wfgroups.ts
浏览文件 @
eab99da0
...
...
@@ -115,16 +115,16 @@ mock.onGet(new RegExp(/^\/wfgroups\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
return
[
status
,
_items
];
});
//
Sav
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Sav
e"
);
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Creat
e"
);
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
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -134,23 +134,11 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
});
});
}
//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
.
table
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
mockDatas
[
0
]
];
});
// Update
...
...
@@ -245,16 +233,16 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
});
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Creat
e"
);
//
Sav
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfgroups
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfgroup 方法:
Sav
e"
);
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
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfgroups
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -264,11 +252,23 @@ mock.onPost(new RegExp(/^\/wfgroups\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
});
});
}
//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
(
mockDatas
[
0
]
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
data
];
});
// FetchDefault
...
...
app_web/src/mock/entity/wfmembers/wfmembers.ts
浏览文件 @
eab99da0
此差异已折叠。
点击以展开。
app_web/src/mock/entity/wfprocess-definitions/wfprocess-definitions.ts
浏览文件 @
eab99da0
...
...
@@ -115,16 +115,16 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})\/select$
return
[
status
,
_items
];
});
//
Sav
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Sav
e"
);
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Creat
e"
);
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
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -134,23 +134,11 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})\/save$
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
table
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
mockDatas
[
0
]
];
});
// Update
...
...
@@ -190,6 +178,22 @@ mock.onPut(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})$/)).rep
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
...
...
@@ -228,33 +232,17 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})\/check
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Creat
e"
);
//
Sav
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Sav
e"
);
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
>
=
[
'definitionkey'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -264,11 +252,23 @@ mock.onPost(new RegExp(/^\/wfprocessdefinitions\/?([a-zA-Z0-9\-\;]{0,35})$/)).re
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.definitionkey, tempValue.definitionkey));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'definitionkey'
]
==
tempValue
[
'definitionkey'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
data
];
});
// FetchDefault
...
...
@@ -323,9 +323,9 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/fetchdefault(\?[\w-./?%&=,]*)*$/
// URI参数传递情况未实现
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Get
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -351,9 +351,9 @@ mock.onGet(new RegExp(/^\/wfprocessdefinitions\/([a-zA-Z0-9\-\;]{1,35})$/)).repl
return
[
status
,
_items
?
_items
:{}];
});
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Remove
"
);
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfprocessdefinitions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfprocessdefinition 方法:
Get
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wfremodels/wfremodels.ts
浏览文件 @
eab99da0
...
...
@@ -115,9 +115,9 @@ mock.onGet(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
return
[
status
,
_items
];
});
//
Upd
ate
mock
.
onP
u
t
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Upd
ate"
);
//
Cre
ate
mock
.
onP
os
t
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Cre
ate"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -134,35 +134,23 @@ mock.onPut(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
});
});
}
//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
.
table
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
mockDatas
[
0
]
];
});
//
Sav
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Sav
e"
);
//
Updat
e
mock
.
onP
ut
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Updat
e"
);
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
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -190,31 +178,21 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply(
console
.
groupEnd
();
return
[
status
,
data
];
});
//
Create
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Create
"
);
//
GetDraft
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/
getdraft
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
GetDraft
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]
);
console
.
table
(
{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
{}
];
});
// CheckKey
...
...
@@ -254,21 +232,43 @@ mock.onPost(new RegExp(/^\/wfremodels\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).re
console
.
groupEnd
();
return
[
status
,
data
];
});
//
GetDraft
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/
getdraft
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
GetDraft
"
);
//
Save
mock
.
on
Post
(
new
RegExp
(
/^
\/
wfremodels
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
(
{}
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}
];
return
[
status
,
data
];
});
// FetchDefault
...
...
@@ -323,9 +323,9 @@ mock.onGet(new RegExp(/^\/wfremodels\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((
// URI参数传递情况未实现
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Get
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -351,9 +351,9 @@ mock.onGet(new RegExp(/^\/wfremodels\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config:
return
[
status
,
_items
?
_items
:{}];
});
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Remove
"
);
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
wfremodels
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfremodel 方法:
Get
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/wfsystems/wfsystems.ts
浏览文件 @
eab99da0
...
...
@@ -115,6 +115,32 @@ mock.onGet(new RegExp(/^\/wfsystems\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
return
[
status
,
_items
];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Create"
);
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
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Update"
);
...
...
@@ -169,16 +195,16 @@ mock.onGet(new RegExp(/^\/wfsystems\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
Save
"
);
//
CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法:
CheckKey
"
);
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
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -207,42 +233,16 @@ mock.onPost(new RegExp(/^\/wfsystems\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((
return
[
status
,
data
];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Create"
);
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
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: CheckKey"
);
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfsystems
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfsystem 方法: Save"
);
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
>
=
[
'pssystemid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
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/wfusers/wfusers.ts
浏览文件 @
eab99da0
...
...
@@ -114,33 +114,17 @@ mock.onGet(new RegExp(/^\/wfusers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
console
.
groupEnd
();
return
[
status
,
_items
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
//
Sav
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Sav
e"
);
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Creat
e"
);
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
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -150,23 +134,11 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((co
});
});
}
//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
.
table
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
mockDatas
[
0
]
];
});
// Update
...
...
@@ -206,17 +178,33 @@ mock.onPut(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: a
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
wfusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// C
reate
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: C
reate
"
);
// C
heckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法: C
heckKey
"
);
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
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -226,23 +214,35 @@ mock.onPost(new RegExp(/^\/wfusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
});
});
}
//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
(
mockDatas
[
0
]
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
data
];
});
//
CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
CheckKey
"
);
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
wfusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wfuser 方法:
Save
"
);
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
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
wfusers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/pages/workflow/wfgroup-mpickup-view/wfgroup-mpickup-view-base.vue
浏览文件 @
eab99da0
...
...
@@ -747,9 +747,18 @@ export default class WFGroupMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof WFGroupMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
/**
...
...
app_web/src/pages/workflow/wfuser-mpickup-view/wfuser-mpickup-view-base.vue
浏览文件 @
eab99da0
...
...
@@ -747,9 +747,18 @@ export default class WFUserMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof WFUserMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
/**
...
...
app_web/src/service/wfgroup/wfgroup-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -53,7 +53,7 @@ export default class WFGroupServiceBase extends EntityService {
}
/**
*
Sav
e接口方法
*
Creat
e接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -61,7 +61,7 @@ export default class WFGroupServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
wfmembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_wfmembers'
),
'undefined'
)){
...
...
@@ -79,8 +79,15 @@ export default class WFGroupServiceBase extends EntityService {
}
masterData
.
wfmembers
=
wfmembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
...
...
@@ -116,6 +123,35 @@ export default class WFGroupServiceBase extends EntityService {
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
/**
* GetDraft接口方法
*
...
...
@@ -147,7 +183,7 @@ export default class WFGroupServiceBase extends EntityService {
}
/**
*
Creat
e接口方法
*
Sav
e接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -155,7 +191,7 @@ export default class WFGroupServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
wfmembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_wfmembers'
),
'undefined'
)){
...
...
@@ -173,43 +209,7 @@ export default class WFGroupServiceBase extends EntityService {
}
masterData
.
wfmembers
=
wfmembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFGroupServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
...
...
app_web/src/service/wfmember/wfmember-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -58,53 +58,6 @@ export default class WFMemberServiceBase extends EntityService {
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
}
if
(
context
.
wfgroup
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
return
res
;
}
/**
* Create接口方法
*
...
...
@@ -152,6 +105,32 @@ export default class WFMemberServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
...
...
@@ -173,7 +152,7 @@ export default class WFMemberServiceBase extends EntityService {
}
/**
*
Save
接口方法
*
Get
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -181,25 +160,19 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
return
res
;
}
/**
*
Update
接口方法
*
GetDraft
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -207,25 +180,46 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
}
if
(
context
.
wfgroup
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfmembers/getdraft`
,
isloading
);
res
.
data
.
wfmember
=
data
.
wfmember
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/checkkey
`
,
data
,
isloading
);
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/checkkey
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfmembers/
${
context
.
wfmember
}
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
*
Get
接口方法
*
Save
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -233,14 +227,20 @@ export default class WFMemberServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFMemberServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
wfuser
&&
context
.
wfmember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
}
if
(
context
.
wfgroup
&&
context
.
wfmember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfgroups/
${
context
.
wfgroup
}
/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfmembers/
${
context
.
wfmember
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfmembers/
${
context
.
wfmember
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
app_web/src/service/wfprocess-definition/wfprocess-definition-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -53,7 +53,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
}
/**
*
Sav
e接口方法
*
Creat
e接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -61,10 +61,17 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/save`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -85,7 +92,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
}
/**
*
Get
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -93,13 +100,13 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
return
res
;
}
/**
*
CheckKey
接口方法
*
Get
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -107,8 +114,8 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/checkkey`
,
data
,
isloading
);
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
return
res
;
}
...
...
@@ -128,7 +135,7 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
}
/**
* C
reate
接口方法
* C
heckKey
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -136,22 +143,13 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions`
,
data
,
isloading
);
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
*
Remo
ve接口方法
*
Sa
ve接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -159,8 +157,10 @@ export default class WFProcessDefinitionServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFProcessDefinitionServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
`
,
isloading
);
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfprocessdefinitions/
${
context
.
wfprocessdefinition
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
app_web/src/service/wfremodel/wfremodel-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -53,7 +53,7 @@ export default class WFREModelServiceBase extends EntityService {
}
/**
*
Upd
ate接口方法
*
Cre
ate接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -61,15 +61,22 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Upd
ate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Cre
ate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfremodels`
,
data
,
isloading
);
return
res
;
}
/**
*
Sav
e接口方法
*
Updat
e接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -77,15 +84,15 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Updat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ost
(
`/wfremodels/
${
context
.
wfremodel
}
/save
`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
p
ut
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
data
,
isloading
);
return
res
;
}
/**
*
Get
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -93,13 +100,13 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
return
res
;
}
/**
*
Create
接口方法
*
Get
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -107,22 +114,13 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfremodels`
,
data
,
isloading
);
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
return
res
;
}
/**
*
CheckKey
接口方法
*
GetDraft
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -130,13 +128,14 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfremodels/
${
context
.
wfremodel
}
/checkkey`
,
data
,
isloading
);
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfremodels/getdraft`
,
isloading
);
res
.
data
.
wfremodel
=
data
.
wfremodel
;
return
res
;
}
/**
*
Remove
接口方法
*
CheckKey
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -144,13 +143,13 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfremodels/
${
context
.
wfremodel
}
`
,
isloading
);
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfremodels/
${
context
.
wfremodel
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
*
GetDraft
接口方法
*
Save
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -158,9 +157,10 @@ export default class WFREModelServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFREModelServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfremodels/getdraft`
,
isloading
);
res
.
data
.
wfremodel
=
data
.
wfremodel
;
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfremodels/
${
context
.
wfremodel
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
app_web/src/service/wfsystem/wfsystem-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -53,7 +53,7 @@ export default class WFSystemServiceBase extends EntityService {
}
/**
*
Remov
e接口方法
*
Creat
e接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -61,8 +61,17 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfsystems`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -83,7 +92,7 @@ export default class WFSystemServiceBase extends EntityService {
}
/**
*
GetDraft
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -91,14 +100,13 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfsystems/getdraft`
,
isloading
);
res
.
data
.
wfsystem
=
data
.
wfsystem
;
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
return
res
;
}
/**
*
Save
接口方法
*
Get
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -106,15 +114,13 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfsystems/
${
context
.
wfsystem
}
/save`
,
data
,
isloading
);
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
return
res
;
}
/**
*
Create
接口方法
*
GetDraft
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -122,17 +128,9 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfsystems`
,
data
,
isloading
);
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfsystems/getdraft`
,
isloading
);
res
.
data
.
wfsystem
=
data
.
wfsystem
;
return
res
;
}
...
...
@@ -151,7 +149,7 @@ export default class WFSystemServiceBase extends EntityService {
}
/**
*
Get
接口方法
*
Save
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -159,8 +157,10 @@ export default class WFSystemServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFSystemServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfsystems/
${
context
.
wfsystem
}
`
,
isloading
);
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfsystems/
${
context
.
wfsystem
}
/save`
,
data
,
isloading
);
return
res
;
}
...
...
app_web/src/service/wfuser/wfuser-service-base.ts
浏览文件 @
eab99da0
...
...
@@ -53,37 +53,7 @@ export default class WFUserServiceBase extends EntityService {
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/getdraft`
,
isloading
);
res
.
data
.
wfuser
=
data
.
wfuser
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
/**
* Save接口方法
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -91,7 +61,7 @@ export default class WFUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
wfmembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_wfmembers'
),
'undefined'
)){
...
...
@@ -109,8 +79,15 @@ export default class WFUserServiceBase extends EntityService {
}
masterData
.
wfmembers
=
wfmembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
...
...
@@ -146,6 +123,20 @@ export default class WFUserServiceBase extends EntityService {
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/wfusers/
${
context
.
wfuser
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
...
...
@@ -162,7 +153,7 @@ export default class WFUserServiceBase extends EntityService {
}
/**
*
Create
接口方法
*
GetDraft
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -170,7 +161,37 @@ export default class WFUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/wfusers/getdraft`
,
isloading
);
res
.
data
.
wfuser
=
data
.
wfuser
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
wfmembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_wfmembers'
),
'undefined'
)){
...
...
@@ -188,29 +209,8 @@ export default class WFUserServiceBase extends EntityService {
}
masterData
.
wfmembers
=
wfmembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFUserServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/wfusers/
${
context
.
wfuser
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_wfmembers'
,
JSON
.
stringify
(
res
.
data
.
wfmembers
));
return
res
;
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFGroupService.java
浏览文件 @
eab99da0
...
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IWFGroupService
extends
IService
<
WFGroup
>{
boolean
save
(
WFGroup
et
)
;
void
saveBatch
(
List
<
WFGroup
>
list
)
;
boolean
update
(
WFGroup
et
)
;
void
updateBatch
(
List
<
WFGroup
>
list
)
;
WFGroup
getDraft
(
WFGroup
et
)
;
boolean
checkKey
(
WFGroup
et
)
;
boolean
create
(
WFGroup
et
)
;
void
createBatch
(
List
<
WFGroup
>
list
)
;
boolean
update
(
WFGroup
et
)
;
void
updateBatch
(
List
<
WFGroup
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFGroup
get
(
String
key
)
;
WFGroup
getDraft
(
WFGroup
et
)
;
boolean
checkKey
(
WFGroup
et
)
;
boolean
save
(
WFGroup
et
)
;
void
saveBatch
(
List
<
WFGroup
>
list
)
;
Page
<
WFGroup
>
searchDefault
(
WFGroupSearchContext
context
)
;
/**
*自定义查询SQL
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFHistoryService.java
浏览文件 @
eab99da0
...
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.workflow.filter.WFHistorySearchContext;
*/
public
interface
IWFHistoryService
{
boolean
checkKey
(
WFHistory
et
)
;
boolean
update
(
WFHistory
et
)
;
void
updateBatch
(
List
<
WFHistory
>
list
)
;
boolean
save
(
WFHistory
et
)
;
void
saveBatch
(
List
<
WFHistory
>
list
)
;
boolean
create
(
WFHistory
et
)
;
void
createBatch
(
List
<
WFHistory
>
list
)
;
WFHistory
get
(
String
key
)
;
boolean
update
(
WFHistory
et
)
;
void
updateBatch
(
List
<
WFHistory
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFHistory
get
(
String
key
)
;
WFHistory
getDraft
(
WFHistory
et
)
;
boolean
checkKey
(
WFHistory
et
)
;
boolean
save
(
WFHistory
et
)
;
void
saveBatch
(
List
<
WFHistory
>
list
)
;
Page
<
WFHistory
>
searchDefault
(
WFHistorySearchContext
context
)
;
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFMemberService.java
浏览文件 @
eab99da0
...
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IWFMemberService
extends
IService
<
WFMember
>{
boolean
checkKey
(
WFMember
et
)
;
WFMember
getDraft
(
WFMember
et
)
;
boolean
create
(
WFMember
et
)
;
void
createBatch
(
List
<
WFMember
>
list
)
;
boolean
update
(
WFMember
et
)
;
void
updateBatch
(
List
<
WFMember
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFMember
get
(
String
key
)
;
WFMember
getDraft
(
WFMember
et
)
;
boolean
checkKey
(
WFMember
et
)
;
boolean
save
(
WFMember
et
)
;
void
saveBatch
(
List
<
WFMember
>
list
)
;
boolean
update
(
WFMember
et
)
;
void
updateBatch
(
List
<
WFMember
>
list
)
;
WFMember
get
(
String
key
)
;
Page
<
WFMember
>
searchDefault
(
WFMemberSearchContext
context
)
;
List
<
WFMember
>
selectByGroupid
(
String
id
)
;
void
removeByGroupid
(
String
id
)
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessDefinitionService.java
浏览文件 @
eab99da0
...
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IWFProcessDefinitionService
extends
IService
<
WFProcessDefinition
>{
boolean
save
(
WFProcessDefinition
et
)
;
void
saveBatch
(
List
<
WFProcessDefinition
>
list
)
;
boolean
update
(
WFProcessDefinition
et
)
;
void
updateBatch
(
List
<
WFProcessDefinition
>
list
)
;
WFProcessDefinition
get
(
String
key
)
;
boolean
checkKey
(
WFProcessDefinition
et
)
;
WFProcessDefinition
getDraft
(
WFProcessDefinition
et
)
;
boolean
create
(
WFProcessDefinition
et
)
;
void
createBatch
(
List
<
WFProcessDefinition
>
list
)
;
boolean
update
(
WFProcessDefinition
et
)
;
void
updateBatch
(
List
<
WFProcessDefinition
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFProcessDefinition
get
(
String
key
)
;
WFProcessDefinition
getDraft
(
WFProcessDefinition
et
)
;
boolean
checkKey
(
WFProcessDefinition
et
)
;
boolean
save
(
WFProcessDefinition
et
)
;
void
saveBatch
(
List
<
WFProcessDefinition
>
list
)
;
Page
<
WFProcessDefinition
>
searchDefault
(
WFProcessDefinitionSearchContext
context
)
;
/**
*自定义查询SQL
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessInstanceService.java
浏览文件 @
eab99da0
...
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.workflow.filter.WFProcessInstanceSearchContext;
*/
public
interface
IWFProcessInstanceService
{
boolean
create
(
WFProcessInstance
et
)
;
void
createBatch
(
List
<
WFProcessInstance
>
list
)
;
boolean
update
(
WFProcessInstance
et
)
;
void
updateBatch
(
List
<
WFProcessInstance
>
list
)
;
boolean
save
(
WFProcessInstance
et
)
;
void
saveBatch
(
List
<
WFProcessInstance
>
list
)
;
WFProcessInstance
getDraft
(
WFProcessInstance
et
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFProcessInstance
get
(
String
key
)
;
WFProcessInstance
getDraft
(
WFProcessInstance
et
)
;
boolean
checkKey
(
WFProcessInstance
et
)
;
boolean
creat
e
(
WFProcessInstance
et
)
;
void
creat
eBatch
(
List
<
WFProcessInstance
>
list
)
;
boolean
sav
e
(
WFProcessInstance
et
)
;
void
sav
eBatch
(
List
<
WFProcessInstance
>
list
)
;
Page
<
WFProcessInstance
>
searchDefault
(
WFProcessInstanceSearchContext
context
)
;
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessNodeService.java
浏览文件 @
eab99da0
...
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.workflow.filter.WFProcessNodeSearchContext;
*/
public
interface
IWFProcessNodeService
{
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
checkKey
(
WFProcessNode
et
)
;
boolean
save
(
WFProcessNode
et
)
;
void
saveBatch
(
List
<
WFProcessNode
>
list
)
;
WFProcessNode
get
(
String
key
)
;
boolean
create
(
WFProcessNode
et
)
;
void
createBatch
(
List
<
WFProcessNode
>
list
)
;
boolean
update
(
WFProcessNode
et
)
;
void
updateBatch
(
List
<
WFProcessNode
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFProcessNode
get
(
String
key
)
;
WFProcessNode
getDraft
(
WFProcessNode
et
)
;
boolean
checkKey
(
WFProcessNode
et
)
;
boolean
save
(
WFProcessNode
et
)
;
void
saveBatch
(
List
<
WFProcessNode
>
list
)
;
Page
<
WFProcessNode
>
searchDefault
(
WFProcessNodeSearchContext
context
)
;
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFREModelService.java
浏览文件 @
eab99da0
...
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.workflow.filter.WFREModelSearchContext;
*/
public
interface
IWFREModelService
{
boolean
update
(
WFREModel
et
)
;
void
updateBatch
(
List
<
WFREModel
>
list
)
;
boolean
save
(
WFREModel
et
)
;
void
saveBatch
(
List
<
WFREModel
>
list
)
;
WFREModel
get
(
String
key
)
;
boolean
create
(
WFREModel
et
)
;
void
createBatch
(
List
<
WFREModel
>
list
)
;
boolean
checkKey
(
WFREModel
et
)
;
boolean
update
(
WFREModel
et
)
;
void
updateBatch
(
List
<
WFREModel
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFREModel
get
(
String
key
)
;
WFREModel
getDraft
(
WFREModel
et
)
;
boolean
checkKey
(
WFREModel
et
)
;
boolean
save
(
WFREModel
et
)
;
void
saveBatch
(
List
<
WFREModel
>
list
)
;
Page
<
WFREModel
>
searchDefault
(
WFREModelSearchContext
context
)
;
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFSystemService.java
浏览文件 @
eab99da0
...
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IWFSystemService
extends
IService
<
WFSystem
>{
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idL
ist
)
;
boolean
create
(
WFSystem
et
)
;
void
createBatch
(
List
<
WFSystem
>
l
ist
)
;
boolean
update
(
WFSystem
et
)
;
void
updateBatch
(
List
<
WFSystem
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFSystem
get
(
String
key
)
;
WFSystem
getDraft
(
WFSystem
et
)
;
boolean
checkKey
(
WFSystem
et
)
;
boolean
save
(
WFSystem
et
)
;
void
saveBatch
(
List
<
WFSystem
>
list
)
;
boolean
create
(
WFSystem
et
)
;
void
createBatch
(
List
<
WFSystem
>
list
)
;
boolean
checkKey
(
WFSystem
et
)
;
WFSystem
get
(
String
key
)
;
Page
<
WFSystem
>
searchDefault
(
WFSystemSearchContext
context
)
;
/**
*自定义查询SQL
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskService.java
浏览文件 @
eab99da0
...
...
@@ -25,13 +25,13 @@ public interface IWFTaskService{
boolean
create
(
WFTask
et
)
;
void
createBatch
(
List
<
WFTask
>
list
)
;
WFTask
getDraft
(
WFTask
et
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
checkKey
(
WFTask
et
)
;
boolean
update
(
WFTask
et
)
;
void
updateBatch
(
List
<
WFTask
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFTask
get
(
String
key
)
;
WFTask
getDraft
(
WFTask
et
)
;
boolean
checkKey
(
WFTask
et
)
;
boolean
save
(
WFTask
et
)
;
void
saveBatch
(
List
<
WFTask
>
list
)
;
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
)
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskWayService.java
浏览文件 @
eab99da0
...
...
@@ -23,15 +23,15 @@ import cn.ibizlab.core.workflow.filter.WFTaskWaySearchContext;
*/
public
interface
IWFTaskWayService
{
boolean
checkKey
(
WFTaskWay
et
)
;
boolean
create
(
WFTaskWay
et
)
;
void
createBatch
(
List
<
WFTaskWay
>
list
)
;
WFTaskWay
getDraft
(
WFTaskWay
et
)
;
WFTaskWay
get
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
update
(
WFTaskWay
et
)
;
void
updateBatch
(
List
<
WFTaskWay
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFTaskWay
get
(
String
key
)
;
WFTaskWay
getDraft
(
WFTaskWay
et
)
;
boolean
checkKey
(
WFTaskWay
et
)
;
boolean
save
(
WFTaskWay
et
)
;
void
saveBatch
(
List
<
WFTaskWay
>
list
)
;
Page
<
WFTaskWay
>
searchDefault
(
WFTaskWaySearchContext
context
)
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFUserService.java
浏览文件 @
eab99da0
...
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
IWFUserService
extends
IService
<
WFUser
>{
boolean
create
(
WFUser
et
)
;
void
createBatch
(
List
<
WFUser
>
list
)
;
boolean
update
(
WFUser
et
)
;
void
updateBatch
(
List
<
WFUser
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
WFUser
get
(
String
key
)
;
WFUser
getDraft
(
WFUser
et
)
;
boolean
checkKey
(
WFUser
et
)
;
boolean
save
(
WFUser
et
)
;
void
saveBatch
(
List
<
WFUser
>
list
)
;
boolean
update
(
WFUser
et
)
;
void
updateBatch
(
List
<
WFUser
>
list
)
;
WFUser
get
(
String
key
)
;
boolean
create
(
WFUser
et
)
;
void
createBatch
(
List
<
WFUser
>
list
)
;
boolean
checkKey
(
WFUser
et
)
;
Page
<
WFUser
>
searchDefault
(
WFUserSearchContext
context
)
;
/**
*自定义查询SQL
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFGroupServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -52,33 +52,17 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Override
@Transactional
public
boolean
save
(
WFGroup
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
WFGroup
et
)
{
if
(
null
==
et
)
{
public
boolean
create
(
WFGroup
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
WFGroup
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
sav
eBatch
(
List
<
WFGroup
>
list
)
{
saveOrUpdat
eBatch
(
list
,
batchSize
);
public
void
creat
eBatch
(
List
<
WFGroup
>
list
)
{
this
.
sav
eBatch
(
list
,
batchSize
);
}
@Override
...
...
@@ -96,30 +80,6 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
updateBatchById
(
list
,
batchSize
);
}
@Override
public
WFGroup
getDraft
(
WFGroup
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFGroup
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
create
(
WFGroup
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFGroup
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
...
...
@@ -147,6 +107,46 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
return
et
;
}
@Override
public
WFGroup
getDraft
(
WFGroup
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFGroup
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
save
(
WFGroup
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
WFGroup
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
WFGroup
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
saveBatch
(
List
<
WFGroup
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
/**
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFHistoryServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -39,39 +39,32 @@ public class WFHistoryServiceImpl implements IWFHistoryService {
@Override
public
boolean
checkKey
(
WFHistory
et
)
{
return
false
;
}
@Override
public
boolean
update
(
WFHistory
et
)
{
public
boolean
create
(
WFHistory
et
)
{
//代码实现
return
true
;
}
public
void
upd
ateBatch
(
List
<
WFHistory
>
list
){
public
void
cre
ateBatch
(
List
<
WFHistory
>
list
){
}
@Override
@Transactional
public
boolean
save
(
WFHistory
et
)
{
public
boolean
update
(
WFHistory
et
)
{
//代码实现
return
true
;
}
@Override
public
void
saveBatch
(
List
<
WFHistory
>
list
)
{
public
void
updateBatch
(
List
<
WFHistory
>
list
){
}
@Override
public
boolean
create
(
WFHistory
et
)
{
//代码实现
public
boolean
remove
(
String
key
)
{
return
true
;
}
public
void
createBatch
(
List
<
WFHistory
>
l
ist
){
public
void
removeBatch
(
Collection
<
String
>
idL
ist
){
}
@Override
...
...
@@ -82,17 +75,24 @@ public class WFHistoryServiceImpl implements IWFHistoryService {
}
@Override
public
boolean
remove
(
String
key
)
{
return
true
;
public
WFHistory
getDraft
(
WFHistory
et
)
{
return
et
;
}
public
void
removeBatch
(
Collection
<
String
>
idList
){
@Override
public
boolean
checkKey
(
WFHistory
et
)
{
return
false
;
}
@Override
@Transactional
public
boolean
save
(
WFHistory
et
)
{
//代码实现
return
true
;
}
@Override
public
WFHistory
getDraft
(
WFHistory
e
t
)
{
return
et
;
public
void
saveBatch
(
List
<
WFHistory
>
lis
t
)
{
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFMemberServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -54,29 +54,35 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
protected
int
batchSize
=
500
;
@Override
public
boolean
checkKey
(
WFMember
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getMemberid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getMemberid
())));
@Transactional
public
boolean
create
(
WFMember
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
return
true
;
}
@Override
public
WFMember
getDraft
(
WFMember
e
t
)
{
fillParentData
(
et
);
return
et
;
public
void
createBatch
(
List
<
WFMember
>
lis
t
)
{
list
.
forEach
(
item
->
fillParentData
(
item
)
);
this
.
saveOrUpdateBatch
(
list
,
batchSize
)
;
}
@Override
@Transactional
public
boolean
cre
ate
(
WFMember
et
)
{
public
boolean
upd
ate
(
WFMember
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"memberid"
,
et
.
getMemberid
()
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
return
true
;
}
@Override
public
void
cre
ateBatch
(
List
<
WFMember
>
list
)
{
public
void
upd
ateBatch
(
List
<
WFMember
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
this
.
saveOrUpdateBatch
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
@Override
...
...
@@ -91,6 +97,29 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
removeByIds
(
idList
);
}
@Override
@Transactional
public
WFMember
get
(
String
key
)
{
WFMember
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFMember
();
et
.
setMemberid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
WFMember
getDraft
(
WFMember
et
)
{
fillParentData
(
et
);
return
et
;
}
@Override
public
boolean
checkKey
(
WFMember
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getMemberid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getMemberid
())));
}
@Override
@Transactional
public
boolean
save
(
WFMember
et
)
{
...
...
@@ -124,35 +153,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
WFMember
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"memberid"
,
et
.
getMemberid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
WFMember
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
WFMember
get
(
String
key
)
{
WFMember
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFMember
();
et
.
setMemberid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
List
<
WFMember
>
selectByGroupid
(
String
id
)
{
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFProcessDefinitionServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -49,33 +49,16 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
@Override
@Transactional
public
boolean
save
(
WFProcessDefinition
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
WFProcessDefinition
et
)
{
if
(
null
==
et
)
{
public
boolean
create
(
WFProcessDefinition
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
WFProcessDefinition
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
return
true
;
}
@Override
public
void
sav
eBatch
(
List
<
WFProcessDefinition
>
list
)
{
saveOrUpdat
eBatch
(
list
,
batchSize
);
public
void
creat
eBatch
(
List
<
WFProcessDefinition
>
list
)
{
this
.
sav
eBatch
(
list
,
batchSize
);
}
@Override
...
...
@@ -92,6 +75,18 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
WFProcessDefinition
get
(
String
key
)
{
...
...
@@ -105,39 +100,44 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
return
et
;
}
@Override
public
boolean
checkKey
(
WFProcessDefinition
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getDefinitionkey
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getDefinitionkey
())));
}
@Override
public
WFProcessDefinition
getDraft
(
WFProcessDefinition
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFProcessDefinition
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getDefinitionkey
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getDefinitionkey
())));
}
@Override
@Transactional
public
boolean
creat
e
(
WFProcessDefinition
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)
))
public
boolean
sav
e
(
WFProcessDefinition
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFProcessDefinition
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
WFProcessDefinition
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
public
boolean
saveBatch
(
Collection
<
WFProcessDefinition
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idL
ist
)
{
removeByIds
(
idList
);
public
void
saveBatch
(
List
<
WFProcessDefinition
>
l
ist
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFProcessInstanceServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -39,30 +39,23 @@ public class WFProcessInstanceServiceImpl implements IWFProcessInstanceService {
@Override
public
boolean
upd
ate
(
WFProcessInstance
et
)
{
public
boolean
cre
ate
(
WFProcessInstance
et
)
{
//代码实现
return
true
;
}
public
void
upd
ateBatch
(
List
<
WFProcessInstance
>
list
){
public
void
cre
ateBatch
(
List
<
WFProcessInstance
>
list
){
}
@Override
@Transactional
public
boolean
save
(
WFProcessInstance
et
)
{
public
boolean
update
(
WFProcessInstance
et
)
{
//代码实现
return
true
;
}
@Override
public
void
saveBatch
(
List
<
WFProcessInstance
>
list
)
{
}
@Override
public
WFProcessInstance
getDraft
(
WFProcessInstance
et
)
{
return
et
;
public
void
updateBatch
(
List
<
WFProcessInstance
>
list
){
}
@Override
...
...
@@ -81,18 +74,25 @@ public class WFProcessInstanceServiceImpl implements IWFProcessInstanceService {
return
et
;
}
@Override
public
WFProcessInstance
getDraft
(
WFProcessInstance
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFProcessInstance
et
)
{
return
false
;
}
@Override
public
boolean
create
(
WFProcessInstance
et
)
{
@Transactional
public
boolean
save
(
WFProcessInstance
et
)
{
//代码实现
return
true
;
}
public
void
createBatch
(
List
<
WFProcessInstance
>
list
){
@Override
public
void
saveBatch
(
List
<
WFProcessInstance
>
list
)
{
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFProcessNodeServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -39,28 +39,32 @@ public class WFProcessNodeServiceImpl implements IWFProcessNodeService {
@Override
public
boolean
remove
(
String
key
)
{
public
boolean
create
(
WFProcessNode
et
)
{
//代码实现
return
true
;
}
public
void
removeBatch
(
Collection
<
String
>
idList
){
}
public
void
createBatch
(
List
<
WFProcessNode
>
list
){
@Override
public
boolean
checkKey
(
WFProcessNode
et
)
{
return
false
;
}
@Override
@Transactional
public
boolean
save
(
WFProcessNode
et
)
{
public
boolean
update
(
WFProcessNode
et
)
{
//代码实现
return
true
;
}
public
void
updateBatch
(
List
<
WFProcessNode
>
list
){
}
@Override
public
void
saveBatch
(
List
<
WFProcessNode
>
list
)
{
public
boolean
remove
(
String
key
)
{
return
true
;
}
public
void
removeBatch
(
Collection
<
String
>
idList
){
}
@Override
...
...
@@ -71,28 +75,24 @@ public class WFProcessNodeServiceImpl implements IWFProcessNodeService {
}
@Override
public
boolean
create
(
WFProcessNode
et
)
{
//代码实现
return
true
;
public
WFProcessNode
getDraft
(
WFProcessNode
et
)
{
return
et
;
}
public
void
createBatch
(
List
<
WFProcessNode
>
list
){
@Override
public
boolean
checkKey
(
WFProcessNode
et
)
{
return
false
;
}
@Override
public
boolean
update
(
WFProcessNode
et
)
{
@Transactional
public
boolean
save
(
WFProcessNode
et
)
{
//代码实现
return
true
;
}
public
void
updateBatch
(
List
<
WFProcessNode
>
list
){
}
@Override
public
WFProcessNode
getDraft
(
WFProcessNode
e
t
)
{
return
et
;
public
void
saveBatch
(
List
<
WFProcessNode
>
lis
t
)
{
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFSystemServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -49,14 +49,16 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
public
boolean
create
(
WFSystem
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idL
ist
)
{
removeByIds
(
idList
);
public
void
createBatch
(
List
<
WFSystem
>
l
ist
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
...
...
@@ -73,11 +75,40 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
WFSystem
get
(
String
key
)
{
WFSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFSystem
();
et
.
setPssystemid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
WFSystem
getDraft
(
WFSystem
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
}
@Override
@Transactional
public
boolean
save
(
WFSystem
et
)
{
...
...
@@ -109,37 +140,6 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
create
(
WFSystem
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFSystem
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
public
boolean
checkKey
(
WFSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
}
@Override
@Transactional
public
WFSystem
get
(
String
key
)
{
WFSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFSystem
();
et
.
setPssystemid
(
key
);
}
else
{
}
return
et
;
}
/**
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFTaskServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -49,31 +49,22 @@ public class WFTaskServiceImpl implements IWFTaskService {
}
@Override
public
WFTask
getDraft
(
WFTask
et
)
{
return
et
;
}
@Override
public
boolean
remove
(
String
key
)
{
public
boolean
update
(
WFTask
et
)
{
//代码实现
return
true
;
}
public
void
removeBatch
(
Collection
<
String
>
idL
ist
){
public
void
updateBatch
(
List
<
WFTask
>
l
ist
){
}
@Override
public
boolean
checkKey
(
WFTask
et
)
{
return
false
;
}
@Override
public
boolean
update
(
WFTask
et
)
{
//代码实现
public
boolean
remove
(
String
key
)
{
return
true
;
}
public
void
updateBatch
(
List
<
WFTask
>
l
ist
){
public
void
removeBatch
(
Collection
<
String
>
idL
ist
){
}
@Override
...
...
@@ -83,6 +74,15 @@ public class WFTaskServiceImpl implements IWFTaskService {
return
et
;
}
@Override
public
WFTask
getDraft
(
WFTask
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFTask
et
)
{
return
false
;
}
@Override
@Transactional
public
boolean
save
(
WFTask
et
)
{
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFTaskWayServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -38,10 +38,6 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
public
class
WFTaskWayServiceImpl
implements
IWFTaskWayService
{
@Override
public
boolean
checkKey
(
WFTaskWay
et
)
{
return
false
;
}
@Override
public
boolean
create
(
WFTaskWay
et
)
{
//代码实现
...
...
@@ -53,15 +49,13 @@ public class WFTaskWayServiceImpl implements IWFTaskWayService {
}
@Override
public
WFTaskWay
getDraft
(
WFTaskWay
et
)
{
return
et
;
public
boolean
update
(
WFTaskWay
et
)
{
//代码实现
return
true
;
}
@Override
public
WFTaskWay
get
(
String
key
)
{
WFTaskWay
et
=
new
WFTaskWay
();
et
.
setSequenceflowid
(
key
);
return
et
;
public
void
updateBatch
(
List
<
WFTaskWay
>
list
){
}
@Override
...
...
@@ -74,15 +68,21 @@ public class WFTaskWayServiceImpl implements IWFTaskWayService {
}
@Override
public
boolean
update
(
WFTaskWay
et
)
{
//代码实现
return
true
;
public
WFTaskWay
get
(
String
key
)
{
WFTaskWay
et
=
new
WFTaskWay
();
et
.
setSequenceflowid
(
key
);
return
et
;
}
public
void
updateBatch
(
List
<
WFTaskWay
>
list
){
@Override
public
WFTaskWay
getDraft
(
WFTaskWay
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFTaskWay
et
)
{
return
false
;
}
@Override
@Transactional
public
boolean
save
(
WFTaskWay
et
)
{
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
浏览文件 @
eab99da0
...
...
@@ -50,6 +50,34 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
protected
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
WFUser
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFUser
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
WFUser
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getId
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
WFUser
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
...
...
@@ -62,11 +90,28 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
removeByIds
(
idList
);
}
@Override
@Transactional
public
WFUser
get
(
String
key
)
{
WFUser
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFUser
();
et
.
setId
(
key
);
}
else
{
}
return
et
;
}
@Override
public
WFUser
getDraft
(
WFUser
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
WFUser
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
boolean
save
(
WFUser
et
)
{
...
...
@@ -98,51 +143,6 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
update
(
WFUser
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getId
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
WFUser
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
WFUser
get
(
String
key
)
{
WFUser
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFUser
();
et
.
setId
(
key
);
}
else
{
}
return
et
;
}
@Override
@Transactional
public
boolean
create
(
WFUser
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFUser
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
public
boolean
checkKey
(
WFUser
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
/**
...
...
ibzwf-core/src/main/resources/permission/systemResource.json
浏览文件 @
eab99da0
...
...
@@ -8,7 +8,7 @@
"delogicname"
:
"流程模型"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft
"
,
"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"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -16,7 +16,7 @@
"delogicname"
:
"成员"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"C
heckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"C
reate"
,
"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"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -24,7 +24,7 @@
"delogicname"
:
"角色/用户组"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"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"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -32,7 +32,7 @@
"delogicname"
:
"用户"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey
"
,
"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"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -40,7 +40,7 @@
"delogicname"
:
"流程定义"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remo
ve"
,
"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"
:
"Save"
,
"name"
:
"Sa
ve"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
@@ -48,7 +48,7 @@
"delogicname"
:
"系统"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"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"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
],
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFGroupResource.java
浏览文件 @
eab99da0
...
...
@@ -47,18 +47,22 @@ public class WFGroupResource {
@Lazy
public
WFGroupMapping
wfgroupMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')"
)
@ApiOperation
(
value
=
"保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"保存角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
save
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')"
)
@ApiOperation
(
value
=
"新建角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"新建角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups"
)
@Transactional
public
ResponseEntity
<
WFGroupDTO
>
create
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
wfgroupdto
);
wfgroupService
.
create
(
domain
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-
Sav
e-all')"
)
@ApiOperation
(
value
=
"批量
保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量保存
角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/
save
batch"
)
public
ResponseEntity
<
Boolean
>
sav
eBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
wfgroupService
.
sav
eBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
新建角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量新建
角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/batch"
)
public
ResponseEntity
<
Boolean
>
creat
eBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
wfgroupService
.
creat
eBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
...
...
@@ -82,37 +86,6 @@ public class WFGroupResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取角色/用户组草稿"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/getdraft"
)
public
ResponseEntity
<
WFGroupDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupMapping
.
toDto
(
wfgroupService
.
getDraft
(
new
WFGroup
())));
}
@ApiOperation
(
value
=
"检查角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"检查角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
checkKey
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')"
)
@ApiOperation
(
value
=
"新建角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"新建角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups"
)
@Transactional
public
ResponseEntity
<
WFGroupDTO
>
create
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
WFGroup
domain
=
wfgroupMapping
.
toDomain
(
wfgroupdto
);
wfgroupService
.
create
(
domain
);
WFGroupDTO
dto
=
wfgroupMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Create-all')"
)
@ApiOperation
(
value
=
"批量新建角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量新建角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
wfgroupService
.
createBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Remove-all')"
)
@ApiOperation
(
value
=
"删除角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"删除角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfgroups/{wfgroup_id}"
)
...
...
@@ -138,7 +111,34 @@ public class WFGroupResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取角色/用户组草稿"
,
tags
=
{
"角色/用户组"
},
notes
=
"获取角色/用户组草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/getdraft"
)
public
ResponseEntity
<
WFGroupDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupMapping
.
toDto
(
wfgroupService
.
getDraft
(
new
WFGroup
())));
}
@ApiOperation
(
value
=
"检查角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"检查角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
checkKey
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')"
)
@ApiOperation
(
value
=
"保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"保存角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFGroupDTO
wfgroupdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfgroupService
.
save
(
wfgroupMapping
.
toDomain
(
wfgroupdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-Save-all')"
)
@ApiOperation
(
value
=
"批量保存角色/用户组"
,
tags
=
{
"角色/用户组"
},
notes
=
"批量保存角色/用户组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
WFGroupDTO
>
wfgroupdtos
)
{
wfgroupService
.
saveBatch
(
wfgroupMapping
.
toDomain
(
wfgroupdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-searchDefault-all') and hasPermission(#context,'ibzwf-WFGroup-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"角色/用户组"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfgroups/fetchdefault"
)
public
ResponseEntity
<
List
<
WFGroupDTO
>>
fetchDefault
(
WFGroupSearchContext
context
)
{
...
...
@@ -151,7 +151,7 @@ public class WFGroupResource {
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFGroup-searchDefault-all')
and hasPermission(#context,'ibzwf-WFGroup-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"角色/用户组"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfgroups/searchdefault"
)
public
ResponseEntity
<
Page
<
WFGroupDTO
>>
searchDefault
(
@RequestBody
WFGroupSearchContext
context
)
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFMemberResource.java
浏览文件 @
eab99da0
此差异已折叠。
点击以展开。
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFProcessDefinitionResource.java
浏览文件 @
eab99da0
此差异已折叠。
点击以展开。
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFREModelResource.java
浏览文件 @
eab99da0
...
...
@@ -47,6 +47,23 @@ public class WFREModelResource {
@Lazy
public
WFREModelMapping
wfremodelMapping
;
@ApiOperation
(
value
=
"新建流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"新建流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels"
)
@Transactional
public
ResponseEntity
<
WFREModelDTO
>
create
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
wfremodeldto
);
wfremodelService
.
create
(
domain
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"批量新建流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量新建流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldtos
)
{
wfremodelService
.
createBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"更新流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"更新流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/wfremodels/{wfremodel_id}"
)
@Transactional
...
...
@@ -65,16 +82,17 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"保存流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
save
(
wfremodelMapping
.
toDomain
(
wfremodeldto
)));
@ApiOperation
(
value
=
"删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"删除流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/{wfremodel_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
remove
(
wfremodel_id
));
}
@ApiOperation
(
value
=
"批量
保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量保存
流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save
batch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldto
s
)
{
wfremodelService
.
saveBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
)
);
@ApiOperation
(
value
=
"批量
删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量删除
流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/
batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
wfremodelService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
...
...
@@ -86,21 +104,10 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"新建流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"新建流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels"
)
@Transactional
public
ResponseEntity
<
WFREModelDTO
>
create
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
WFREModel
domain
=
wfremodelMapping
.
toDomain
(
wfremodeldto
);
wfremodelService
.
create
(
domain
);
WFREModelDTO
dto
=
wfremodelMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"批量新建流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量新建流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldtos
)
{
wfremodelService
.
createBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
@ApiOperation
(
value
=
"获取流程模型草稿"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/getdraft"
)
public
ResponseEntity
<
WFREModelDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelMapping
.
toDto
(
wfremodelService
.
getDraft
(
new
WFREModel
())));
}
@ApiOperation
(
value
=
"检查流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"检查流程模型"
)
...
...
@@ -109,27 +116,20 @@ public class WFREModelResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
checkKey
(
wfremodelMapping
.
toDomain
(
wfremodeldto
)));
}
@ApiOperation
(
value
=
"删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"删除流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/{wfremodel_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfremodel_id"
)
String
wfremodel_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
remove
(
wfremodel_id
));
@ApiOperation
(
value
=
"保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"保存流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFREModelDTO
wfremodeldto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelService
.
save
(
wfremodelMapping
.
toDomain
(
wfremodeldto
)));
}
@ApiOperation
(
value
=
"批量
删除流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量删除
流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfremodels/
batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
wfremodelService
.
removeBatch
(
ids
);
@ApiOperation
(
value
=
"批量
保存流程模型"
,
tags
=
{
"流程模型"
},
notes
=
"批量保存
流程模型"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/save
batch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
WFREModelDTO
>
wfremodeldto
s
)
{
wfremodelService
.
saveBatch
(
wfremodelMapping
.
toDomain
(
wfremodeldtos
)
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取流程模型草稿"
,
tags
=
{
"流程模型"
},
notes
=
"获取流程模型草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/getdraft"
)
public
ResponseEntity
<
WFREModelDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfremodelMapping
.
toDto
(
wfremodelService
.
getDraft
(
new
WFREModel
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-searchDefault-all') and hasPermission(#context,'ibzwf-WFREModel-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"流程模型"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfremodels/fetchdefault"
)
public
ResponseEntity
<
List
<
WFREModelDTO
>>
fetchDefault
(
WFREModelSearchContext
context
)
{
...
...
@@ -142,7 +142,7 @@ public class WFREModelResource {
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFREModel-searchDefault-all')
and hasPermission(#context,'ibzwf-WFREModel-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"流程模型"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfremodels/searchdefault"
)
public
ResponseEntity
<
Page
<
WFREModelDTO
>>
searchDefault
(
@RequestBody
WFREModelSearchContext
context
)
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFSystemResource.java
浏览文件 @
eab99da0
...
...
@@ -47,19 +47,22 @@ public class WFSystemResource {
@Lazy
public
WFSystemMapping
wfsystemMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-
Remov
e-all')"
)
@ApiOperation
(
value
=
"
删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除
系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/{wfsystem_id}
"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-
Creat
e-all')"
)
@ApiOperation
(
value
=
"
新建系统"
,
tags
=
{
"系统"
},
notes
=
"新建
系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems
"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
remove
(
wfsystem_id
));
public
ResponseEntity
<
WFSystemDTO
>
create
(
@RequestBody
WFSystemDTO
wfsystemdto
)
{
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
wfsystemdto
);
wfsystemService
.
create
(
domain
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-
Remov
e-all')"
)
@ApiOperation
(
value
=
"批量
删除系统"
,
tags
=
{
"系统"
},
notes
=
"批量删除
系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
wfsystemService
.
removeBatch
(
ids
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
新建系统"
,
tags
=
{
"系统"
},
notes
=
"批量新建
系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFSystemDTO
>
wfsystemdto
s
)
{
wfsystemService
.
createBatch
(
wfsystemMapping
.
toDomain
(
wfsystemdtos
)
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
...
...
@@ -83,12 +86,43 @@ public class WFSystemResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')"
)
@ApiOperation
(
value
=
"删除系统"
,
tags
=
{
"系统"
},
notes
=
"删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/{wfsystem_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
remove
(
wfsystem_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除系统"
,
tags
=
{
"系统"
},
notes
=
"批量删除系统"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfsystems/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
wfsystemService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/{wfsystem_id}"
)
public
ResponseEntity
<
WFSystemDTO
>
get
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
WFSystem
domain
=
wfsystemService
.
get
(
wfsystem_id
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取系统草稿"
,
tags
=
{
"系统"
},
notes
=
"获取系统草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/getdraft"
)
public
ResponseEntity
<
WFSystemDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemMapping
.
toDto
(
wfsystemService
.
getDraft
(
new
WFSystem
())));
}
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
WFSystemDTO
wfsystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
checkKey
(
wfsystemMapping
.
toDomain
(
wfsystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Save-all')"
)
@ApiOperation
(
value
=
"保存系统"
,
tags
=
{
"系统"
},
notes
=
"保存系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/save"
)
...
...
@@ -104,41 +138,7 @@ public class WFSystemResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')"
)
@ApiOperation
(
value
=
"新建系统"
,
tags
=
{
"系统"
},
notes
=
"新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems"
)
@Transactional
public
ResponseEntity
<
WFSystemDTO
>
create
(
@RequestBody
WFSystemDTO
wfsystemdto
)
{
WFSystem
domain
=
wfsystemMapping
.
toDomain
(
wfsystemdto
);
wfsystemService
.
create
(
domain
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Create-all')"
)
@ApiOperation
(
value
=
"批量新建系统"
,
tags
=
{
"系统"
},
notes
=
"批量新建系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFSystemDTO
>
wfsystemdtos
)
{
wfsystemService
.
createBatch
(
wfsystemMapping
.
toDomain
(
wfsystemdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"检查系统"
,
tags
=
{
"系统"
},
notes
=
"检查系统"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
WFSystemDTO
wfsystemdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfsystemService
.
checkKey
(
wfsystemMapping
.
toDomain
(
wfsystemdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-Get-all')"
)
@ApiOperation
(
value
=
"获取系统"
,
tags
=
{
"系统"
},
notes
=
"获取系统"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/{wfsystem_id}"
)
public
ResponseEntity
<
WFSystemDTO
>
get
(
@PathVariable
(
"wfsystem_id"
)
String
wfsystem_id
)
{
WFSystem
domain
=
wfsystemService
.
get
(
wfsystem_id
);
WFSystemDTO
dto
=
wfsystemMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-searchDefault-all') and hasPermission(#context,'ibzwf-WFSystem-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfsystems/fetchdefault"
)
public
ResponseEntity
<
List
<
WFSystemDTO
>>
fetchDefault
(
WFSystemSearchContext
context
)
{
...
...
@@ -151,7 +151,7 @@ public class WFSystemResource {
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFSystem-searchDefault-all')
and hasPermission(#context,'ibzwf-WFSystem-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfsystems/searchdefault"
)
public
ResponseEntity
<
Page
<
WFSystemDTO
>>
searchDefault
(
@RequestBody
WFSystemSearchContext
context
)
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFUserResource.java
浏览文件 @
eab99da0
...
...
@@ -47,40 +47,22 @@ public class WFUserResource {
@Lazy
public
WFUserMapping
wfuserMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-
Remov
e-all')"
)
@ApiOperation
(
value
=
"
删除用户"
,
tags
=
{
"用户"
},
notes
=
"删除
用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/{wfuser_id}
"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-
Creat
e-all')"
)
@ApiOperation
(
value
=
"
新建用户"
,
tags
=
{
"用户"
},
notes
=
"新建
用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers
"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
remove
(
wfuser_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除用户"
,
tags
=
{
"用户"
},
notes
=
"批量删除用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
wfuserService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取用户草稿"
,
tags
=
{
"用户"
},
notes
=
"获取用户草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/getdraft"
)
public
ResponseEntity
<
WFUserDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserMapping
.
toDto
(
wfuserService
.
getDraft
(
new
WFUser
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Save-all')"
)
@ApiOperation
(
value
=
"保存用户"
,
tags
=
{
"用户"
},
notes
=
"保存用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFUserDTO
wfuserdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
save
(
wfuserMapping
.
toDomain
(
wfuserdto
)));
public
ResponseEntity
<
WFUserDTO
>
create
(
@RequestBody
WFUserDTO
wfuserdto
)
{
WFUser
domain
=
wfuserMapping
.
toDomain
(
wfuserdto
);
wfuserService
.
create
(
domain
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-
Sav
e-all')"
)
@ApiOperation
(
value
=
"批量
保存用户"
,
tags
=
{
"用户"
},
notes
=
"批量保存
用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/
save
batch"
)
public
ResponseEntity
<
Boolean
>
sav
eBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
wfuserService
.
sav
eBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
新建用户"
,
tags
=
{
"用户"
},
notes
=
"批量新建
用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/batch"
)
public
ResponseEntity
<
Boolean
>
creat
eBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
wfuserService
.
creat
eBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
...
...
@@ -104,6 +86,22 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')"
)
@ApiOperation
(
value
=
"删除用户"
,
tags
=
{
"用户"
},
notes
=
"删除用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/{wfuser_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"wfuser_id"
)
String
wfuser_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
remove
(
wfuser_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除用户"
,
tags
=
{
"用户"
},
notes
=
"批量删除用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/wfusers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
wfuserService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Get-all')"
)
@ApiOperation
(
value
=
"获取用户"
,
tags
=
{
"用户"
},
notes
=
"获取用户"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/{wfuser_id}"
)
...
...
@@ -113,23 +111,10 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')"
)
@ApiOperation
(
value
=
"新建用户"
,
tags
=
{
"用户"
},
notes
=
"新建用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers"
)
@Transactional
public
ResponseEntity
<
WFUserDTO
>
create
(
@RequestBody
WFUserDTO
wfuserdto
)
{
WFUser
domain
=
wfuserMapping
.
toDomain
(
wfuserdto
);
wfuserService
.
create
(
domain
);
WFUserDTO
dto
=
wfuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Create-all')"
)
@ApiOperation
(
value
=
"批量新建用户"
,
tags
=
{
"用户"
},
notes
=
"批量新建用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
wfuserService
.
createBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
@ApiOperation
(
value
=
"获取用户草稿"
,
tags
=
{
"用户"
},
notes
=
"获取用户草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/getdraft"
)
public
ResponseEntity
<
WFUserDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserMapping
.
toDto
(
wfuserService
.
getDraft
(
new
WFUser
())));
}
@ApiOperation
(
value
=
"检查用户"
,
tags
=
{
"用户"
},
notes
=
"检查用户"
)
...
...
@@ -138,7 +123,22 @@ public class WFUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
checkKey
(
wfuserMapping
.
toDomain
(
wfuserdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Save-all')"
)
@ApiOperation
(
value
=
"保存用户"
,
tags
=
{
"用户"
},
notes
=
"保存用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
WFUserDTO
wfuserdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wfuserService
.
save
(
wfuserMapping
.
toDomain
(
wfuserdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-Save-all')"
)
@ApiOperation
(
value
=
"批量保存用户"
,
tags
=
{
"用户"
},
notes
=
"批量保存用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
WFUserDTO
>
wfuserdtos
)
{
wfuserService
.
saveBatch
(
wfuserMapping
.
toDomain
(
wfuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-searchDefault-all') and hasPermission(#context,'ibzwf-WFUser-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"用户"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wfusers/fetchdefault"
)
public
ResponseEntity
<
List
<
WFUserDTO
>>
fetchDefault
(
WFUserSearchContext
context
)
{
...
...
@@ -151,7 +151,7 @@ public class WFUserResource {
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzwf-WFUser-searchDefault-all')
and hasPermission(#context,'ibzwf-WFUser-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"用户"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wfusers/searchdefault"
)
public
ResponseEntity
<
Page
<
WFUserDTO
>>
searchDefault
(
@RequestBody
WFUserSearchContext
context
)
{
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
eab99da0
package
cn
.
ibizlab
.
util
.
security
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
lombok.SneakyThrows
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.filter.QueryWrapperContext
;
import
cn.ibizlab.util.helper.DEFieldCacheMap
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.security.access.PermissionEvaluator
;
...
...
@@ -11,7 +14,10 @@ import org.springframework.security.core.GrantedAuthority;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
java.io.Serializable
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.util.*
;
import
java.util.function.Consumer
;
/**
* spring security 权限管理类
...
...
@@ -23,44 +29,144 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Value
(
"${ibiz.enablePermissionValid:false}"
)
boolean
enablePermissionValid
;
//是否开启权限校验
/**
*
实体行为
鉴权
* @param authentication
* @param entity
* @param action
*
服务接口
鉴权
* @param authentication
用户
* @param entity
实体
* @param action
操作
* @return
*/
@Override
@SneakyThrows
public
boolean
hasPermission
(
Authentication
authentication
,
Object
entity
,
Object
action
)
{
//未开启权限校验、超级管理员则不进行权限检查
if
(
AuthenticationUser
.
getAuthenticationUser
().
getSuperuser
()==
1
||
!
enablePermissionValid
)
if
(!
enablePermissionValid
)
return
true
;
Object
principal
=
authentication
.
getPrincipal
();
if
(
ObjectUtils
.
isEmpty
(
principal
))
return
false
;
AuthenticationUser
authenticationUser
=
(
AuthenticationUser
)
authentication
.
getPrincipal
();
if
(
authenticationUser
.
getSuperuser
()==
1
)
return
true
;
String
strAction
=
String
.
valueOf
(
action
);
Set
<
String
>
userAuthorities
=
getAuthorities
(
authentication
,
strAction
);
if
(
userAuthorities
.
size
()==
0
)
return
false
;
//拥有全部数据访问权限时,则跳过权限检查
if
(
isAllData
(
strAction
,
userAuthorities
)){
return
true
;
}
if
(
entity
instanceof
ArrayList
){
List
<
EntityBase
>
entities
=
(
List
<
EntityBase
>)
entity
;
for
(
EntityBase
entityBase:
entities
){
boolean
result
=
actionValid
(
entityBase
,
strAction
,
userAuthorities
);
boolean
result
=
actionValid
(
entityBase
,
strAction
,
userAuthorities
,
authenticationUser
);
if
(!
result
){
return
false
;
}
}
}
else
if
(
entity
instanceof
QueryWrapperContext
){
QueryWrapperContext
queryWrapperContext
=
(
QueryWrapperContext
)
entity
;
setPermissionCondToSearchContext
(
getEntity
(
queryWrapperContext
),
queryWrapperContext
,
userAuthorities
,
authenticationUser
);
}
else
{
EntityBase
entityBase
=
(
EntityBase
)
entity
;
return
actionValid
(
entityBase
,
strAction
,
userAuthorities
);
return
actionValid
(
entityBase
,
strAction
,
userAuthorities
,
authenticationUser
);
}
return
true
;
}
/**
* 获取实体信息
* @param qc
* @return
*/
@SneakyThrows
private
EntityBase
getEntity
(
QueryWrapperContext
qc
){
EntityBase
entity
=
null
;
Type
type
=
qc
.
getClass
().
getGenericSuperclass
();
if
(
type
instanceof
ParameterizedType
){
ParameterizedType
parameterizedType
=
(
ParameterizedType
)
qc
.
getClass
().
getGenericSuperclass
();
Type
[]
typeArr
=
parameterizedType
.
getActualTypeArguments
();
if
(
typeArr
.
length
>
0
){
Class
<
EntityBase
>
entityClass
=
(
Class
)
typeArr
[
0
];
return
entityClass
.
newInstance
();
}
}
return
entity
;
}
/**
* 在searchContext中拼接权限条件
* @param entity 实体
* @param qc 查询上下文
* @param userAuthorities 用户权限
* @param authenticationUser 当前用户
*/
@SneakyThrows
private
void
setPermissionCondToSearchContext
(
EntityBase
entity
,
QueryWrapperContext
qc
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
if
(
entity
==
null
)
return
;
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
createManField
=
permissionField
.
get
(
"createmanfield"
);
Map
<
String
,
Set
<
String
>>
userInfo
=
authenticationUser
.
getOrgInfo
();
Set
<
String
>
orgParent
=
userInfo
.
get
(
"parentorg"
);
Set
<
String
>
orgChild
=
userInfo
.
get
(
"suborg"
);
Set
<
String
>
orgDeptParent
=
userInfo
.
get
(
"parentdept"
);
Set
<
String
>
orgDeptChild
=
userInfo
.
get
(
"subdept"
);
Set
<
String
>
userOrg
=
new
HashSet
<>();
Set
<
String
>
userOrgDept
=
new
HashSet
<>();
Set
<
String
>
userCreateMan
=
new
HashSet
<>();
for
(
String
authority:
userAuthorities
){
if
(
authority
.
endsWith
(
"curorg"
)){
//本单位
userOrg
.
add
(
authenticationUser
.
getOrgid
());
}
else
if
(
authority
.
endsWith
(
"porg"
)){
//上级单位
userOrg
.
addAll
(
orgParent
);
}
else
if
(
authority
.
endsWith
(
"sorg"
)){
//下级单位
userOrg
.
addAll
(
orgChild
);
}
else
if
(
authority
.
endsWith
(
"curorgdept"
)){
//本部门
userOrgDept
.
add
(
authenticationUser
.
getMdeptid
());
}
else
if
(
authority
.
endsWith
(
"porgdept"
)){
//上级部门
userOrgDept
.
addAll
(
orgDeptParent
);
}
else
if
(
authority
.
endsWith
(
"sorgdept"
)){
//下级部门
userOrgDept
.
addAll
(
orgDeptChild
);
}
else
if
(
authority
.
endsWith
(
"createman"
)){
userCreateMan
.
add
(
authority
);
}
}
if
(
userOrg
.
size
()==
0
&&
userOrgDept
.
size
()==
0
&&
userCreateMan
.
size
()==
0
){
qc
.
getSelectCond
().
apply
(
"1<>1"
);
}
else
{
Consumer
<
QueryWrapper
>
consumer
=
qw
->
{
if
(
userOrg
.
size
()>
0
){
Consumer
<
QueryWrapper
>
org
=
orgQw
->
{
orgQw
.
in
(
orgField
,
userOrg
);
};
qw
.
or
(
org
);
}
if
(
userOrgDept
.
size
()>
0
){
Consumer
<
QueryWrapper
>
dept
=
deptQw
->
{
deptQw
.
in
(
orgDeptField
,
userOrgDept
);
};
qw
.
or
(
dept
);
}
if
(
userCreateMan
.
size
()>
0
){
Consumer
<
QueryWrapper
>
createMan
=
createManQw
->
{
createManQw
.
eq
(
createManField
,
authenticationUser
.
getUserid
());
};
qw
.
or
(
createMan
);
}
};
qc
.
getSelectCond
().
and
(
consumer
);
}
}
@Override
public
boolean
hasPermission
(
Authentication
authentication
,
Serializable
id
,
String
action
,
Object
params
)
{
...
...
@@ -106,13 +212,12 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
* @param userAuthorities
* @return
*/
private
boolean
actionValid
(
EntityBase
entity
,
String
action
,
Set
<
String
>
userAuthorities
){
private
boolean
actionValid
(
EntityBase
entity
,
String
action
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
createManField
=
permissionField
.
get
(
"createmanfield"
);
AuthenticationUser
authenticationUser
=
AuthenticationUser
.
getAuthenticationUser
();
Map
<
String
,
Set
<
String
>>
userInfo
=
authenticationUser
.
getOrgInfo
();
Set
<
String
>
orgParent
=
userInfo
.
get
(
"parentorg"
);
Set
<
String
>
orgChild
=
userInfo
.
get
(
"suborg"
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录