Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-qc-change-system
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yx-qc-change-flow
yanxuan-qc-change-system
Commits
e5f1d1ed
Commit
e5f1d1ed
authored
Dec 15, 2025
by
王志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 子单变更节点同步主单
parent
91e55714
Pipeline
#86912
passed with stages
in 1 minute 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+5
-5
ChangeSubFlowBiz.java
...netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
+3
-3
FlowTransitionType.java
...l/yanxuan/change/common/constants/FlowTransitionType.java
+8
-7
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
e5f1d1ed
...
...
@@ -738,7 +738,7 @@ public class ChangeFlowBiz {
log
.
info
(
"[NEW_CHANGE_FLOW_ADMIN_APPROVE] 重要变更,需要质量部负责人审批"
);
}
else
{
// 一般变更:跳过质量部负责人审批,下一个审批人为变更负责人
adminApproveParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_SKIP
_QUALITY_APPROVE
);
adminApproveParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_SKIP
);
nextApproverForAdmin
=
changeRecord
.
getChangeCommander
();
nextStatusForAdmin
=
ChangeStatusEnum
.
WAIT_EXEC_CHANGE_PLAN
;
log
.
info
(
"[NEW_CHANGE_FLOW_ADMIN_APPROVE] 一般变更,跳过质量部负责人审批,下一个审批人为变更负责人:{}"
,
nextApproverForAdmin
);
...
...
@@ -859,7 +859,7 @@ public class ChangeFlowBiz {
// 工单流转:使用 paramMap 方式,type=2 表示回退
Map
<
String
,
Object
>
content
=
buildFlowContent
(
FlowOperationTypeEnum
.
REFUSE
);
Map
<
String
,
Object
>
cancelParamMap
=
new
HashMap
<>();
cancelParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
REJECTED
);
cancelParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
CANCEL
);
String
nextNodeId
=
flowService
.
submitFlowWithParamMap
(
String
.
valueOf
(
flowId
),
flowDataDTO
,
uid
,
ChangeFlowEnum
.
NEW_CHANGE_FLOW
.
getTopoId
(),
JSON
.
toJSONString
(
content
),
cancelParamMap
,
FlowxOperationEnum
.
CANCEL
.
getName
(),
"取消变更"
,
changeRecord
.
getCreateTime
());
...
...
@@ -1831,7 +1831,7 @@ public class ChangeFlowBiz {
}
Map
<
String
,
Object
>
rejectParamMap
=
new
HashMap
<>();
rejectParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_BACK
_TO_CONFIRM_PLAN
);
rejectParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_BACK
);
nextNodeId
=
flowService
.
submitFlowWithParamMap
(
flowId
.
toString
(),
flowDataDTO
,
uid
,
ChangeFlowEnum
.
NEW_CHANGE_FLOW
.
getTopoId
(),
JSON
.
toJSONString
(
content
),
rejectParamMap
,
...
...
@@ -2029,9 +2029,9 @@ public class ChangeFlowBiz {
String
currentUid
=
RequestLocalBean
.
getUid
();
Map
<
String
,
Object
>
subFlowContent
=
buildFlowContent
(
currentUid
);
// 使用 paramMap 流转子单工单(type=
2 回
到初始节点)
// 使用 paramMap 流转子单工单(type=
3 回退
到初始节点)
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
REJECTED
);
paramMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
BACK
);
String
operateDesc
=
String
.
format
(
"变更工单,%s审批不通过,驳回行动工单"
,
rejectNodeName
);
String
startNodeId
=
flowService
.
submitFlowWithParamMap
(
subFlowId
,
subFlowDataDTO
,
...
...
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
View file @
e5f1d1ed
...
...
@@ -256,7 +256,7 @@ public class ChangeSubFlowBiz {
}
else
{
// 不需要审批:直接跳到审批变更方案节点,审批人保持为行动人自己
log
.
info
(
"[CHANGE_SUB_FLOW_START] 部门[{}]不需要审批,自动跳过审批"
,
expectedDepartment
);
paramMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
REJECTED
);
paramMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
SKIP
);
// 提交到审批变更方案节点
nextNodeId
=
flowService
.
submitFlowWithParamMap
(
subFlowId
,
flowDataDTO
,
uid
,
...
...
@@ -295,7 +295,7 @@ public class ChangeSubFlowBiz {
// 使用paramMap控制流转方向(通过/不通过)
Map
<
String
,
Object
>
approveParamMap
=
new
HashMap
<>();
approveParamMap
.
put
(
"type"
,
approved
?
FlowTransitionType
.
TYPE_APPROVED
:
FlowTransitionType
.
TYPE_
REJECTED
);
approveParamMap
.
put
(
"type"
,
approved
?
FlowTransitionType
.
TYPE_APPROVED
:
FlowTransitionType
.
TYPE_
BACK
);
String
remark
=
approved
?
"审批通过"
:
"审批不通过"
;
String
approveNodeId
=
flowService
.
submitFlowWithParamMap
(
subFlowId
,
flowDataDTO
,
uid
,
...
...
@@ -357,7 +357,7 @@ public class ChangeSubFlowBiz {
}
subFlowRecord
.
setRejectReason
(
execRejectReason
);
log
.
info
(
"[CHANGE_SUB_FLOW_EXE] 审批不通过,subFlowId:{}, rejectReason:{}"
,
subFlowId
,
execRejectReason
);
execParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
REJECTED
);
execParamMap
.
put
(
"type"
,
FlowTransitionType
.
TYPE_
BACK
);
// 提交到确认行动方案节点
execNodeId
=
flowService
.
submitFlowWithParamMap
(
subFlowId
,
flowDataDTO
,
uid
,
...
...
yanxuan-qc-change-system-common/src/main/java/com/netease/mail/yanxuan/change/common/constants/FlowTransitionType.java
View file @
e5f1d1ed
...
...
@@ -3,6 +3,7 @@ package com.netease.mail.yanxuan.change.common.constants;
/**
* 工单流转类型常量
* 用于 paramMap 中的 type 参数,控制 topo 图的流转方向
* 统一规则:1=通过,2=取消,3=回退,4=跳过
*
* @Author AI Assistant
* @Date 2025/01/04
...
...
@@ -10,24 +11,24 @@ package com.netease.mail.yanxuan.change.common.constants;
public
class
FlowTransitionType
{
/**
* 类型1:
审批通过/前进到下一节点/需要审批
* 类型1:
通过/前进到下一节点
*/
public
static
final
Integer
TYPE_APPROVED
=
1
;
/**
* 类型2:
审批不通过/回退/不需要审批(跳过)
* 类型2:
取消
*/
public
static
final
Integer
TYPE_
REJECTED
=
2
;
public
static
final
Integer
TYPE_
CANCEL
=
2
;
/**
* 类型3:回退
到确认变更方案节点(主单审批不通过专用)
* 类型3:回退
*/
public
static
final
Integer
TYPE_BACK
_TO_CONFIRM_PLAN
=
3
;
public
static
final
Integer
TYPE_BACK
=
3
;
/**
* 类型4:跳过
质量部负责人审批,直接到执行变更方案节点(一般变更专用)
* 类型4:跳过
*/
public
static
final
Integer
TYPE_SKIP
_QUALITY_APPROVE
=
4
;
public
static
final
Integer
TYPE_SKIP
=
4
;
private
FlowTransitionType
()
{
// 工具类,禁止实例化
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment