Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
张雷
/
skboot-zhongye
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
a8f11427
由
张雷
编写于
2024-10-08 12:14:06 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
危险作业人流程修改
1 个父辈
3021dd21
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
13 行增加
和
13 行删除
sk-module-biz/src/main/java/com/skua/modules/emergency/controller/DangerousOperationController.java
sk-module-biz/src/main/java/com/skua/modules/emergency/controller/DangerousOperationController.java
查看文件 @
a8f1142
...
...
@@ -10,6 +10,8 @@ import com.skua.core.util.ConvertUtils;
import
com.skua.modules.emergency.entity.DangerousOperation
;
import
com.skua.modules.emergency.service.IDangerousOperationService
;
import
com.skua.modules.flow.business.service.FlowBusinessService
;
import
com.skua.modules.flow.business.service.IFlowService
;
import
com.skua.modules.flow.core.constant.ProcessConstant
;
import
com.skua.modules.flow.core.entity.FlowAssemblyEntity
;
import
com.skua.modules.system.vo.UserCertificate
;
import
com.skua.tool.util.BeanExtUtils
;
...
...
@@ -34,7 +36,8 @@ import java.util.stream.Collectors;
public
class
DangerousOperationController
{
@Autowired
private
IDangerousOperationService
dangerousOperationService
;
@Autowired
private
IFlowService
flowService
;
@Autowired
private
FlowBusinessService
flowBusinessService
;
/**
...
...
@@ -222,24 +225,21 @@ public class DangerousOperationController {
return
Result
.
ok
(
"删除成功!"
);
}
//
@PostMapping
(
value
=
"/complete-task-choose-user-pass"
)
public
Result
<?>
completeTaskChooseUserPass
(
@RequestBody
DangerousOperation
dangerousOperation
)
throws
Exception
{
Result
<?>
result
=
new
Result
();
FlowAssemblyEntity
flowAssemblyEntity
=
BeanExtUtils
.
bean2Bean
(
dangerousOperation
,
FlowAssemblyEntity
.
class
);
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
isEmpty
(
flowAssemblyEntity
.
getAssemblyKey
()))
{
//AssemblyKey对应参数用户id
flowAssemblyEntity
.
setAssemblyKey
(
""
);
}
String
activeResult
=
this
.
flowBusinessService
.
completeTaskChooseUserPass
(
flowAssemblyEntity
);
if
(
"noChooseUser"
.
equals
(
activeResult
))
{
result
.
error500
(
"未指定下一节点用户!"
);
}
else
if
(
"fail"
.
equals
(
activeResult
))
{
result
.
error500
(
"程序异常,流程审批失败!"
);
}
else
{
//流程执行id
String
executionId
=
dangerousOperation
.
getFlow
().
getExecutionId
();
DangerousOperation
dangerOperation
=
BeanExtUtils
.
bean2Bean
(
dangerousOperation
,
DangerousOperation
.
class
);
dangerousOperationService
.
updateById
(
dangerOperation
);
//流程进入下一节点,并行网关设置判定条件
Map
<
String
,
Object
>
mapVariable
=
new
HashMap
<
String
,
Object
>();
mapVariable
.
put
(
"dangerDeal"
,
"taskUser_"
+
dangerousOperation
.
getOperationUser
());
flowService
.
configureVariables
(
executionId
,
mapVariable
);
//动态设置流程接修人
flowBusinessService
.
completeTask
(
ProcessConstant
.
PASS_KEY
,
dangerousOperation
.
getFlow
());
result
.
success
(
"成功"
);
}
return
result
;
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论