Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
14ca1ef8
提交
14ca1ef8
编写于
8月 31, 2021
作者:
test_0805_001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
统一代办
上级
470fa947
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
175 行增加
和
0 行删除
+175
-0
WFTaskExService.java
...lab/core/workflow/extensions/service/WFTaskExService.java
+81
-0
WFCoreMapper.java
...in/java/cn/ibizlab/core/workflow/mapper/WFCoreMapper.java
+3
-0
WFCoreMapper.xml
...rc/main/resources/mapper/workflow/wfcore/WFCoreMapper.xml
+91
-0
未找到文件。
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/extensions/service/WFTaskExService.java
0 → 100644
浏览文件 @
14ca1ef8
package
cn
.
ibizlab
.
core
.
workflow
.
extensions
.
service
;
import
cn.ibizlab.core.workflow.domain.WFTask
;
import
cn.ibizlab.core.workflow.filter.WFTaskSearchContext
;
import
cn.ibizlab.core.workflow.mapper.WFCoreMapper
;
import
cn.ibizlab.core.workflow.service.impl.WFTaskServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
/**
* 实体[工作流任务] 无存储服务对象接口实现 自定义
*/
@Slf4j
@Primary
@Service
public
class
WFTaskExService
extends
WFTaskServiceImpl
{
@Autowired
private
WFCoreMapper
wfCoreMapper
;
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFTask
>
pages
=
wfCoreMapper
.
searchMyTask
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 已办任务
*/
@Override
public
Page
<
WFTask
>
searchDoneTask
(
WFTaskSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFTask
>
pages
=
wfCoreMapper
.
searchDoneTask
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 办结任务
*/
@Override
public
Page
<
WFTask
>
searchFinishTask
(
WFTaskSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFTask
>
pages
=
wfCoreMapper
.
searchFinishTask
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 待办任务
*/
@Override
public
Page
<
WFTask
>
searchTodoTask
(
WFTaskSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFTask
>
pages
=
wfCoreMapper
.
searchMyTask
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 待阅任务
*/
@Override
public
Page
<
WFTask
>
searchToreadTask
(
WFTaskSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFTask
>
pages
=
wfCoreMapper
.
searchUnReadTask
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFTask
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFCoreMapper.java
浏览文件 @
14ca1ef8
...
...
@@ -32,4 +32,7 @@ public interface WFCoreMapper {
Page
<
WFTask
>
searchMyAllTask
(
IPage
page
,
@Param
(
"srf"
)
WFTaskSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFTask
>
wrapper
)
;
Page
<
WFTask
>
searchDoneTask
(
IPage
page
,
@Param
(
"srf"
)
WFTaskSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFTask
>
wrapper
)
;
Page
<
WFTask
>
searchFinishTask
(
IPage
page
,
@Param
(
"srf"
)
WFTaskSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFTask
>
wrapper
)
;
}
ibzwf-core/src/main/resources/mapper/workflow/wfcore/WFCoreMapper.xml
浏览文件 @
14ca1ef8
...
...
@@ -232,4 +232,95 @@
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<select
id=
"searchDoneTask"
parameterType=
"cn.ibizlab.core.workflow.filter.WFTaskSearchContext"
resultType=
"cn.ibizlab.core.workflow.domain.WFTask"
>
<![CDATA[
SELECT
T1.TaskId AS Id,
T1.DefinitionId AS ProcessDefinitionId,
T1.DefinitionName AS ProcessDefinitionName,
T1.DefinitionKey AS ProcessDefinitionKey,
T1.InstanceId AS ProcessInstanceId,
T1.TaskName AS NAME,
T1.TaskDefinitionKey,
T1.BusinessKey AS ProcessInstanceBusinessKey,
T1.Description,
T1.CreateTime,
T1.BusinessKey2 AS ProcessInstanceBusinessKey2
FROM
(
SELECT DISTINCT
RES.ID_ AS TaskId,
RES.PROC_DEF_ID_ AS DefinitionId,
ARP.NAME_ AS DefinitionName,
ARP.KEY_ AS DefinitionKey,
RES.PROC_INST_ID_ AS InstanceId,
RES.NAME_ AS TaskName,
RES.TASK_DEF_KEY_ AS TaskDefinitionKey,
RES.CATEGORY_ AS BusinessKey,
RES.DESCRIPTION_ AS Description,
RES.START_TIME_ AS CreateTime ,
HPI.BUSINESS_KEY_ AS BusinessKey2
FROM
ACT_HI_TASKINST RES
INNER JOIN ACT_HI_PROCINST HPI ON RES.PROC_INST_ID_ = HPI.ID_
INNER JOIN ACT_RE_PROCDEF ARP ON RES.PROC_DEF_ID_ = arp.ID_
WHERE
(RES.END_TIME_ IS NOT NULL
AND HPI.END_TIME_ IS NULL
AND RES.ASSIGNEE_ IS NULL
AND EXISTS ( SELECT LINK.ID_ FROM ACT_HI_IDENTITYLINK LINK WHERE LINK.TASK_ID_ = RES.ID_ AND ( LINK.USER_ID_ = #{srf.sessioncontext.srfpersonid} ) )
) OR HPI.START_USER_ID_ = #{srf.sessioncontext.srfuserid} ) t1
]]>
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<select
id=
"searchFinishTask"
parameterType=
"cn.ibizlab.core.workflow.filter.WFTaskSearchContext"
resultType=
"cn.ibizlab.core.workflow.domain.WFTask"
>
<![CDATA[
SELECT
T1.TaskId AS Id,
T1.DefinitionId AS ProcessDefinitionId,
T1.DefinitionName AS ProcessDefinitionName,
T1.DefinitionKey AS ProcessDefinitionKey,
T1.InstanceId AS ProcessInstanceId,
T1.TaskName AS NAME,
T1.TaskDefinitionKey,
T1.BusinessKey AS ProcessInstanceBusinessKey,
T1.Description,
T1.CreateTime,
T1.BusinessKey2 AS ProcessInstanceBusinessKey2
FROM
(
SELECT DISTINCT
RES.ID_ AS TaskId,
RES.PROC_DEF_ID_ AS DefinitionId,
ARP.NAME_ AS DefinitionName,
ARP.KEY_ AS DefinitionKey,
RES.PROC_INST_ID_ AS InstanceId,
RES.NAME_ AS TaskName,
RES.TASK_DEF_KEY_ AS TaskDefinitionKey,
RES.CATEGORY_ AS BusinessKey,
RES.DESCRIPTION_ AS Description,
RES.START_TIME_ AS CreateTime,
HPI.BUSINESS_KEY_ AS BusinessKey2
FROM
ACT_HI_TASKINST RES
INNER JOIN ACT_HI_PROCINST HPI ON RES.PROC_INST_ID_ = HPI.ID_
INNER JOIN ACT_RE_PROCDEF ARP ON RES.PROC_DEF_ID_ = ARP.ID_
WHERE
(RES.END_TIME_ IS NOT NULL
AND HPI.END_TIME_ IS NOT NULL
AND RES.ASSIGNEE_ IS NULL
AND EXISTS ( SELECT LINK.ID_ FROM ACT_HI_IDENTITYLINK LINK WHERE LINK.TASK_ID_ = RES.ID_ AND ( LINK.USER_ID_ = #{srf.sessioncontext.srfpersonid} ) )
) OR (HPI.START_USER_ID_ = #{srf.sessioncontext.srfuserid} )
AND RES.END_TIME_ IS NOT NULL
AND HPI.END_TIME_ IS NOT NULL
AND RES.ASSIGNEE_ IS NULL) T1
]]>
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
</mapper>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录