Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zrch-risk-39
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
zrch-risk-39
Commits
d2c7dbb3
提交
d2c7dbb3
authored
4月 15, 2026
作者:
kxjia
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://47.97.51.208/root/zrch-risk-39
上级
231f2ed0
5eefe9fc
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
258 行增加
和
12 行删除
+258
-12
IFlowTaskService.java
.../org/jeecg/modules/flowable/service/IFlowTaskService.java
+4
-2
FlowDefinitionServiceImpl.java
...ules/flowable/service/impl/FlowDefinitionServiceImpl.java
+6
-2
FlowTaskServiceImpl.java
...cg/modules/flowable/service/impl/FlowTaskServiceImpl.java
+246
-6
PageTitleconfigController.java
...odules/stm/page/controller/PageTitleconfigController.java
+2
-2
没有找到文件。
zrch-risk-server-39/jeecg-module-system/jeecg-module-flowable/src/main/java/org/jeecg/modules/flowable/service/IFlowTaskService.java
浏览文件 @
d2c7dbb3
...
...
@@ -7,6 +7,7 @@ import org.jeecg.modules.flowable.domain.dto.FlowViewerDto;
import
org.jeecg.modules.flowable.domain.vo.FlowTaskVo
;
import
java.io.InputStream
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -180,6 +181,7 @@ public interface IFlowTaskService {
public
Result
<
List
<
String
>>
todoListAll
();
public
void
saveMyTaskFlow
(
String
thistaskId
,
Task
nextTask
,
String
userType
,
String
approvalId
,
String
messageTaskName
);
public
void
saveMyTaskFlowHis
(
Task
task
,
String
userType
,
String
approvalId
,
Date
cdate
,
String
loginUserid
,
String
taskType
,
String
OptionType
);
}
}
zrch-risk-server-39/jeecg-module-system/jeecg-module-flowable/src/main/java/org/jeecg/modules/flowable/service/impl/FlowDefinitionServiceImpl.java
浏览文件 @
d2c7dbb3
...
...
@@ -471,7 +471,11 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
}
String
userType
=
"user"
;
String
approvalId
=
sysUser
.
getId
();
flowTaskService
.
saveMyTaskFlowHis
(
task
,
userType
,
approvalId
,
cdate
,
sysUser
.
getId
(),
ProcessConstants
.
TASK_TYPE_START
,
OptionType
);
/**
MyTaskFlowHis taskFlowHis=new MyTaskFlowHis();
taskFlowHis.setTaskId(task.getId());
taskFlowHis.setProcDefId(task.getProcessDefinitionId());
...
...
@@ -488,8 +492,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
taskFlowHis.setFormTableName(flowForm.getFormTableName());
}
String
userType
=
"user"
;
String
approvalId
=
sysUser
.
getId
();
if(userType.equals("user")) {
taskFlowHis.setUid(approvalId);
...
...
@@ -509,6 +512,7 @@ public class FlowDefinitionServiceImpl extends FlowServiceFactory implements IFl
taskFlowHis.setFlowName(flowname);
myTaskFlowHisService.save(taskFlowHis);
*/
...
...
zrch-risk-server-39/jeecg-module-system/jeecg-module-flowable/src/main/java/org/jeecg/modules/flowable/service/impl/FlowTaskServiceImpl.java
浏览文件 @
d2c7dbb3
...
...
@@ -200,6 +200,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
}
this
.
saveMyTaskFlowHis
(
task
,
userType
,
approvalId
,
cdate
,
loginUser
.
getId
(),
ProcessConstants
.
TASK_TYPE_HAND
,
OptionType
);
/**
MyTaskFlowHis taskFlowHis=new MyTaskFlowHis();
taskFlowHis.setTaskId(task.getId());
taskFlowHis.setProcDefId(task.getProcessDefinitionId());
...
...
@@ -235,6 +239,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskFlowHis.setFlowName(flowname);
myTaskFlowHisService.save(taskFlowHis);
*/
Task
nextTask
=
taskService
.
createTaskQuery
()
...
...
@@ -249,8 +254,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskService
.
addCandidateGroup
(
nextTask
.
getId
(),
approvalId
);
}
this
.
saveMyTaskFlow
(
task
.
getId
(),
nextTask
,
userType
,
approvalId
,
"待"
+
OptionType
);
/**
// 处理表单数据
// Map<String, Object> formData = processFormData(task);
...
...
@@ -327,6 +334,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
sysDeployFormService.updateBisTabUid(flowFormben);
}
*/
...
...
@@ -379,6 +387,12 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
@Override
public
void
taskReject
(
FlowTaskVo
flowTaskVo
)
{
Date
cdate
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
curdate
=
sdf
.
format
(
cdate
);
//Long userId = SecurityUtils.getLoginUser().getUser().getUserId();
SysUser
loginUser
=
iFlowThirdService
.
getLoginUser
();
if
(
taskService
.
createTaskQuery
().
taskId
(
flowTaskVo
.
getTaskId
()).
singleResult
().
isSuspended
())
{
throw
new
CustomException
(
"任务处于挂起状态!"
);
...
...
@@ -546,9 +560,15 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
approvalId
=
formValues
.
get
(
"approval"
).
toString
();
}
String
OptionType
=
ProcessConstants
.
OPTION_TYPE_REJECT
;
//写入待办
this
.
saveMyTaskFlow
(
task
.
getId
(),
newTask
,
userType
,
approvalId
,
OptionType
+
"待处理"
);
this
.
saveMyTaskFlowHis
(
task
,
userType
,
approvalId
,
cdate
,
loginUser
.
getId
(),
ProcessConstants
.
TASK_TYPE_HAND
,
OptionType
);
//有了以上信息,可以向相关表写入 相关信息了
/**
MyTaskFlow taskFlow=new MyTaskFlow();
taskFlow.setTaskId(newTask.getId());
taskFlow.setProcDefId(newTask.getProcessDefinitionId());
...
...
@@ -569,6 +589,7 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
taskFlow.setTaskDefinitionKey(newTask.getTaskDefinitionKey());
myTaskFlowService.save(taskFlow);
*/
}
catch
(
FlowableObjectNotFoundException
e
)
{
throw
new
CustomException
(
"未找到流程实例,流程可能已发生变化"
);
...
...
@@ -872,10 +893,10 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
// 2. 核心操作:直接将任务的指派人改为目标用户
// 此时,任务的所有权彻底转移
taskService
.
setAssignee
(
flowTaskVo
.
getTaskId
(),
targetUserId
);
flowTaskVo
.
getInstanceId
();
Date
date
=
new
Date
();
Date
c
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
curdate
=
sdf
.
format
(
date
);
String
curdate
=
sdf
.
format
(
c
date
);
// 3. (可选) 添加一条评论或日志,记录这次转办动作
//taskService.addComment(flowTaskVo.getTaskId(), null, originalUserId + " 将任务转办给 " + targetUserId);
...
...
@@ -901,6 +922,16 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
FlowForm
sysForm
=
flowFormService
.
getById
(
formId
);
// 假设有这个方法
// 写入 待办
String
userType
=
"user"
;
String
OptionType
=
ProcessConstants
.
OPTION_TYPE_ASSIGN
;
//写入待办
this
.
saveMyTaskFlow
(
flowTaskVo
.
getTaskId
(),
task
,
userType
,
targetUserId
,
OptionType
+
"待处理"
);
this
.
saveMyTaskFlowHis
(
task
,
userType
,
loginUser
.
getId
(),
cdate
,
loginUser
.
getId
(),
ProcessConstants
.
TASK_TYPE_HAND
,
OptionType
);
/**
MyTask myTask = new MyTask();
myTask.setUid(targetUserId);
myTask.setTp(5);
...
...
@@ -961,6 +992,8 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
sysDeployFormService.updateBisTabUid(flowFormben);
}
*/
...
...
@@ -2654,13 +2687,25 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
// 为任务添加一个“阅读者”身份链接
taskService
.
addUserIdentityLink
(
flowTaskVo
.
getTaskId
(),
targetUserId
,
"reader"
);
Date
date
=
new
Date
();
Date
c
date
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
curdate
=
sdf
.
format
(
date
);
String
curdate
=
sdf
.
format
(
c
date
);
// 3. (可选) 添加一条评论或日志,记录这次转办动作
//taskService.addComment(flowTaskVo.getTaskId(), null, originalUserId + " 将任务转办给 " + targetUserId);
taskService
.
addComment
(
flowTaskVo
.
getTaskId
(),
flowTaskVo
.
getInstanceId
(),
curdate
+
loginUser
.
getRealname
()
+
" 将任务转阅给 "
+
targetuser
.
getRealname
());
//写入待办
Task
task
=
taskService
.
createTaskQuery
().
taskId
(
flowTaskVo
.
getTaskId
()).
singleResult
();
String
userType
=
"user"
;
String
OptionType
=
ProcessConstants
.
OPTION_TYPE_READ
;
this
.
saveMyTaskFlow
(
flowTaskVo
.
getTaskId
(),
task
,
userType
,
targetUserId
,
OptionType
+
"待查看"
);
this
.
saveMyTaskFlowHis
(
task
,
userType
,
loginUser
.
getId
(),
cdate
,
loginUser
.
getId
(),
ProcessConstants
.
TASK_TYPE_HAND
,
OptionType
);
}
...
...
@@ -2795,5 +2840,200 @@ public class FlowTaskServiceImpl extends FlowServiceFactory implements IFlowTask
@Override
public
void
saveMyTaskFlow
(
String
thistaskId
,
Task
nextTask
,
String
userType
,
String
approvalId
,
String
messageTaskName
){
//此方法为写入待办
// 根据流程定义ID查询流程定义对象
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionId
(
nextTask
.
getProcessDefinitionId
())
.
singleResult
();
String
deploymentId
=
""
;
String
flowname
=
""
;
if
(
processDefinition
!=
null
)
{
// 获取部署ID - 这就是你想要的deployId
deploymentId
=
processDefinition
.
getDeploymentId
();
flowname
=
processDefinition
.
getName
();
}
// 获取流程变量
Map
<
String
,
Object
>
formValues
=
getProcessVariables
(
thistaskId
);
String
zdmc
=
""
;
String
zdval
=
""
;
String
tasktitle
=
""
;
if
(
formValues
.
get
(
"dataName"
)==
null
){
if
(
formValues
.
get
(
"_value"
)!=
null
)
{
Map
zdv
=
(
Map
)
formValues
.
get
(
"_value"
);
zdmc
=
(
String
)
zdv
.
get
(
"dataName"
);
zdval
=
zdv
.
get
(
"dataId"
).
toString
();
tasktitle
=
(
String
)
zdv
.
get
(
"tasktitle"
);
}
}
else
{
zdmc
=(
String
)
formValues
.
get
(
"dataName"
);
zdval
=
formValues
.
get
(
"dataId"
).
toString
();
tasktitle
=(
String
)
formValues
.
get
(
"tasktitle"
);
}
Long
formId
=
Long
.
parseLong
(
nextTask
.
getFormKey
());
FlowForm
sysForm
=
flowFormService
.
getById
(
formId
);
// 假设有这个方法
MyTask
myTask
=
new
MyTask
();
if
(
userType
.
equals
(
"user"
))
{
myTask
.
setUid
(
approvalId
);
}
else
{
myTask
.
setRoleid
(
approvalId
);
}
myTask
.
setTp
(
5
);
myTask
.
setTarget
(
nextTask
.
getName
());
if
(
zdval
!=
null
&&!
zdval
.
equals
(
""
)){
myTask
.
setTargetId
(
zdval
);
//zdval
}
myTask
.
setStTime
(
new
Date
());
myTask
.
setTaskName
(
messageTaskName
);
myTask
.
setName
(
nextTask
.
getName
());
myTask
.
setSta
(
0
);
myTask
.
setPriority
(
"M"
);
myTask
.
setDes
(
""
);
//myTask.setLinkAddr("/project/plan/StPlanManList?"+zdmc+"="+zdval);
if
(
sysForm
!=
null
){
if
(
sysForm
.
getFormTp
().
equals
(
"2"
)){
myTask
.
setLinkAddr
(
sysForm
.
getFormListurl
());
}
else
{
myTask
.
setLinkAddr
(
"/flowable/task/todo/index"
);
}
}
myTaskService
.
save
(
myTask
);
//有了以上信息,可以向相关表写入 相关信息了
MyTaskFlow
taskFlow
=
new
MyTaskFlow
();
taskFlow
.
setTaskId
(
nextTask
.
getId
());
taskFlow
.
setProcDefId
(
nextTask
.
getProcessDefinitionId
());
taskFlow
.
setProcInsId
(
nextTask
.
getProcessInstanceId
());
taskFlow
.
setExecutionId
(
nextTask
.
getExecutionId
());
if
(
zdval
!=
null
&&!
zdval
.
equals
(
""
)){
taskFlow
.
setTargetId
(
zdval
);
}
taskFlow
.
setDeployId
(
deploymentId
);
taskFlow
.
setFormTableName
(
sysForm
.
getFormTableName
());
if
(
userType
.
equals
(
"user"
))
{
taskFlow
.
setUid
(
approvalId
);
}
else
{
taskFlow
.
setRoleid
(
approvalId
);
}
taskFlow
.
setTaskDefinitionKey
(
nextTask
.
getTaskDefinitionKey
());
myTaskFlowService
.
save
(
taskFlow
);
String
tabname
=
sysForm
.
getFormTableName
();
if
(
tabname
!=
null
&&!
tabname
.
equals
(
""
)&&
zdmc
!=
null
&&!
zdmc
.
equals
(
""
)&&
zdval
!=
null
&&!
zdval
.
equals
(
""
)){
String
formContent
=
zdmc
+
"="
+
zdval
;
FlowForm
flowFormben
=
new
FlowForm
();
flowFormben
.
setFormTableName
(
tabname
);
flowFormben
.
setFormContent
(
formContent
);
flowFormben
.
setFormTp
(
approvalId
);
sysDeployFormService
.
updateBisTabUid
(
flowFormben
);
}
}
@Override
public
void
saveMyTaskFlowHis
(
Task
task
,
String
userType
,
String
approvalId
,
Date
cdate
,
String
loginUserid
,
String
taskType
,
String
OptionType
){
//此方法为写入履历
// 根据流程定义ID查询流程定义对象
ProcessDefinition
processDefinition
=
repositoryService
.
createProcessDefinitionQuery
()
.
processDefinitionId
(
task
.
getProcessDefinitionId
())
.
singleResult
();
String
DeployId
=
""
;
String
flowname
=
""
;
if
(
processDefinition
!=
null
)
{
// 获取部署ID - 这就是你想要的deployId
DeployId
=
processDefinition
.
getDeploymentId
();
flowname
=
processDefinition
.
getName
();
}
// 获取流程变量
Map
<
String
,
Object
>
formValues
=
getProcessVariables
(
task
.
getId
());
String
zdmc
=
""
;
String
zdval
=
""
;
String
tasktitle
=
""
;
if
(
formValues
.
get
(
"dataName"
)==
null
){
if
(
formValues
.
get
(
"_value"
)!=
null
)
{
Map
zdv
=
(
Map
)
formValues
.
get
(
"_value"
);
zdmc
=
(
String
)
zdv
.
get
(
"dataName"
);
zdval
=
zdv
.
get
(
"dataId"
).
toString
();
tasktitle
=
(
String
)
zdv
.
get
(
"tasktitle"
);
}
}
else
{
zdmc
=(
String
)
formValues
.
get
(
"dataName"
);
zdval
=
formValues
.
get
(
"dataId"
).
toString
();
tasktitle
=(
String
)
formValues
.
get
(
"tasktitle"
);
}
MyTaskFlowHis
taskFlowHis
=
new
MyTaskFlowHis
();
taskFlowHis
.
setTaskId
(
task
.
getId
());
taskFlowHis
.
setProcDefId
(
task
.
getProcessDefinitionId
());
taskFlowHis
.
setProcInsId
(
task
.
getProcessInstanceId
());
taskFlowHis
.
setExecutionId
(
task
.
getExecutionId
());
if
(
zdval
!=
null
&&!
zdval
.
equals
(
""
)){
taskFlowHis
.
setTargetId
(
zdval
);
}
taskFlowHis
.
setDeployId
(
DeployId
);
Long
tformId
=
Long
.
parseLong
(
task
.
getFormKey
());
FlowForm
tsysForm
=
flowFormService
.
getById
(
tformId
);
// 假设有这个方法
if
(
tsysForm
!=
null
&&
tsysForm
.
getFormTableName
()!=
null
){
taskFlowHis
.
setFormTableName
(
tsysForm
.
getFormTableName
());
}
if
(
userType
.
equals
(
"user"
))
{
taskFlowHis
.
setUid
(
approvalId
);
}
else
{
taskFlowHis
.
setRoleid
(
approvalId
);
}
taskFlowHis
.
setTaskDefinitionKey
(
task
.
getTaskDefinitionKey
());
taskFlowHis
.
setOptionTime
(
cdate
);
taskFlowHis
.
setOptionId
(
loginUserid
);
taskFlowHis
.
setOptionType
(
OptionType
);
//审核 转办 转阅
taskFlowHis
.
setTaskType
(
taskType
);
//发起 参与
taskFlowHis
.
setTaskName
(
task
.
getName
());
taskFlowHis
.
setTaskTitle
(
tasktitle
);
taskFlowHis
.
setFlowName
(
flowname
);
myTaskFlowHisService
.
save
(
taskFlowHis
);
}
}
zrch-risk-server-39/jeecg-module-system/jeecg-module-stm/src/main/java/org/jeecg/modules/stm/page/controller/PageTitleconfigController.java
浏览文件 @
d2c7dbb3
...
...
@@ -114,8 +114,8 @@ public class PageTitleconfigController extends JeecgController<PageTitleconfig,
wrapper
.
or
().
in
(
"roleid"
,
Arrays
.
asList
(
finalRoleids
.
split
(
","
)));
}
})
.
orderByDesc
(
"
priority
"
)
.
orderByDesc
(
"
st_time
"
);
.
orderByDesc
(
"
st_time
"
)
.
orderByDesc
(
"
priority
"
);
queryWrapper
.
last
(
"limit 5"
);
List
<
MyTask
>
list
=
myTaskService
.
list
(
queryWrapper
);
return
Result
.
OK
(
list
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论