Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
8ad04ed1
提交
8ad04ed1
编写于
8月 31, 2021
作者:
test_0805_001
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
14ca1ef8
09ff6899
变更
8
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
139 行增加
和
1 行删除
+139
-1
wftasks.ts
app_web/src/mock/entity/wftasks/wftasks.ts
+38
-0
wftask-service-base.ts
app_web/src/service/wftask/wftask-service-base.ts
+28
-0
WFTaskExService.java
...a/cn/ibizlab/core/extensions/service/WFTaskExService.java
+31
-0
IWFTaskService.java
...java/cn/ibizlab/core/workflow/service/IWFTaskService.java
+2
-0
WFTaskServiceImpl.java
...ibizlab/core/workflow/service/impl/WFTaskServiceImpl.java
+16
-0
init_h2.sql
ibzwf-core/src/main/resources/liquibase/config/init_h2.sql
+6
-0
systemResource.json
ibzwf-core/src/main/resources/permission/systemResource.json
+1
-1
WFTaskResource.java
...api/src/main/java/cn/ibizlab/api/rest/WFTaskResource.java
+17
-0
未找到文件。
app_web/src/mock/entity/wftasks/wftasks.ts
浏览文件 @
8ad04ed1
...
...
@@ -243,6 +243,44 @@ mock.onPut(new RegExp(/^\/wftasks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: a
return
[
status
,
data
];
});
// UserCustom
mock
.
onPost
(
new
RegExp
(
/^
\/
wftasks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
usercustom$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wftask 方法: UserCustom"
);
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
(
/^
\/
wftasks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
usercustom$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
wftasks
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:wftask 方法: FetchDefault"
);
...
...
app_web/src/service/wftask/wftask-service-base.ts
浏览文件 @
8ad04ed1
...
...
@@ -155,6 +155,34 @@ export default class WFTaskServiceBase extends EntityService {
return
res
;
}
/**
* UserCustom接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFTaskServiceBase
*/
public
async
UserCustom
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/wftasks/
${
context
.
wftask
}
/usercustom`
,
data
,
isloading
);
return
res
;
}
/**
* UserCustomBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof WFTaskServiceBase
*/
public
async
UserCustomBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/wftasks/usercustombatch`
,
tempData
,
isloading
);
}
/**
* FetchDefault接口方法
*
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/extensions/service/WFTaskExService.java
0 → 100644
浏览文件 @
8ad04ed1
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.workflow.service.impl.WFTaskServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.workflow.domain.WFTask
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[工作流任务] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"WFTaskExService"
)
public
class
WFTaskExService
extends
WFTaskServiceImpl
{
/**
* [UserCustom:用户自定义] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public
WFTask
userCustom
(
WFTask
et
)
{
return
super
.
userCustom
(
et
);
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskService.java
浏览文件 @
8ad04ed1
...
...
@@ -35,6 +35,8 @@ public interface IWFTaskService {
boolean
checkKey
(
WFTask
et
);
boolean
save
(
WFTask
et
);
void
saveBatch
(
List
<
WFTask
>
list
);
WFTask
userCustom
(
WFTask
et
);
boolean
userCustomBatch
(
List
<
WFTask
>
etList
);
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchDoneTask
(
WFTaskSearchContext
context
);
Page
<
WFTask
>
searchFinishTask
(
WFTaskSearchContext
context
);
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFTaskServiceImpl.java
浏览文件 @
8ad04ed1
...
...
@@ -94,6 +94,22 @@ public class WFTaskServiceImpl implements IWFTaskService {
public
void
saveBatch
(
List
<
WFTask
>
list
)
{
}
@Override
@Transactional
public
WFTask
userCustom
(
WFTask
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
userCustomBatch
(
List
<
WFTask
>
etList
)
{
for
(
WFTask
et
:
etList
)
{
userCustom
(
et
);
}
return
true
;
}
...
...
ibzwf-core/src/main/resources/liquibase/config/init_h2.sql
0 → 100644
浏览文件 @
8ad04ed1
create
schema
if
not
exists
a_A_5d9d78509
;
set
schema
a_A_5d9d78509
;
ibzwf-core/src/main/resources/permission/systemResource.json
浏览文件 @
8ad04ed1
...
...
@@ -48,7 +48,7 @@
"delogicname"
:
"工作流任务"
,
"sysmoudle"
:{
"id"
:
"WORKFLOW"
,
"name"
:
"workflow"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
},{
"id"
:
"DoneTask"
,
"name"
:
"已办任务"
},{
"id"
:
"FinishTask"
,
"name"
:
"办结任务"
},{
"id"
:
"TodoTask"
,
"name"
:
"待办任务"
},{
"id"
:
"ToreadTask"
,
"name"
:
"待阅任务"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}
,{
"id"
:
"UserCustom"
,
"name"
:
"用户自定义"
,
"type"
:
"USERCUSTOM"
}
],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/rest/WFTaskResource.java
浏览文件 @
8ad04ed1
...
...
@@ -129,6 +129,23 @@ public class WFTaskResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"用户自定义"
,
tags
=
{
"工作流任务"
},
notes
=
"用户自定义"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wftasks/{wftask_id}/usercustom"
)
public
ResponseEntity
<
WFTaskDTO
>
userCustom
(
@PathVariable
(
"wftask_id"
)
String
wftask_id
,
@RequestBody
WFTaskDTO
wftaskdto
)
{
WFTask
domain
=
wftaskMapping
.
toDomain
(
wftaskdto
);
domain
.
setId
(
wftask_id
);
domain
=
wftaskService
.
userCustom
(
domain
);
wftaskdto
=
wftaskMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
wftaskdto
);
}
@ApiOperation
(
value
=
"批量处理[用户自定义]"
,
tags
=
{
"工作流任务"
},
notes
=
"批量处理[用户自定义]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/wftasks/usercustombatch"
)
public
ResponseEntity
<
Boolean
>
userCustomBatch
(
@RequestBody
List
<
WFTaskDTO
>
wftaskdtos
)
{
List
<
WFTask
>
domains
=
wftaskMapping
.
toDomain
(
wftaskdtos
);
boolean
result
=
wftaskService
.
userCustomBatch
(
domains
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"工作流任务"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/wftasks/fetchdefault"
)
public
ResponseEntity
<
List
<
WFTaskDTO
>>
fetchDefault
(
WFTaskSearchContext
context
)
{
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录