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
926ec4ec
Commit
926ec4ec
authored
Dec 03, 2025
by
王志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 子工单分批流转逻辑处理
parent
aad7e88e
Pipeline
#86484
passed with stages
in 1 minute 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
33 deletions
+25
-33
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+1
-0
ChangeSubFlowBiz.java
...netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
+24
-23
TestController.java
...se/mail/yanxuan/change/web/controller/TestController.java
+0
-10
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
926ec4ec
...
@@ -404,6 +404,7 @@ public class ChangeFlowBiz {
...
@@ -404,6 +404,7 @@ public class ChangeFlowBiz {
.
changeExecUserEmail
(
execUserEmail
)
.
changeExecUserEmail
(
execUserEmail
)
.
changeExecDepartment
(
execDepartment
)
.
changeExecDepartment
(
execDepartment
)
.
changeCommander
(
changeRecord
.
getChangeCommander
())
.
changeCommander
(
changeRecord
.
getChangeCommander
())
.
changeConfirmResultTime
(
changeRecord
.
getChangeConfirmResultTime
())
.
createTime
(
DateUtils
.
getCurrentTime
())
.
createTime
(
DateUtils
.
getCurrentTime
())
.
updateTime
(
DateUtils
.
getCurrentTime
())
.
updateTime
(
DateUtils
.
getCurrentTime
())
.
build
();
.
build
();
...
...
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
View file @
926ec4ec
...
@@ -87,26 +87,26 @@ public class ChangeSubFlowBiz {
...
@@ -87,26 +87,26 @@ public class ChangeSubFlowBiz {
private
final
SupplierSendService
sendSupplierEmail
;
private
final
SupplierSendService
sendSupplierEmail
;
public
String
createAndSubmit
(
@Valid
ChangeSubFlowCreateReq
changeSubFlowCreateReq
)
{
//
public String createAndSubmit(@Valid ChangeSubFlowCreateReq changeSubFlowCreateReq) {
String
uid
=
RequestLocalBean
.
getUid
();
//
String uid = RequestLocalBean.getUid();
String
name
=
RequestLocalBean
.
getName
();
//
String name = RequestLocalBean.getName();
Map
<
String
,
Object
>
content
=
new
HashMap
<>(
10
);
//
Map<String, Object> content = new HashMap<>(10);
content
.
put
(
"createUserName"
,
uid
);
//
content.put("createUserName", uid);
content
.
put
(
"createUser"
,
uid
);
//
content.put("createUser", uid);
content
.
put
(
"createTime"
,
System
.
currentTimeMillis
());
//
content.put("createTime", System.currentTimeMillis());
content
.
put
(
"updateTime"
,
System
.
currentTimeMillis
());
//
content.put("updateTime", System.currentTimeMillis());
content
.
put
(
CommonConstants
.
FLOW_OPERATION_KEY
,
FlowOperationTypeEnum
.
PASS
.
getValue
());
//
content.put(CommonConstants.FLOW_OPERATION_KEY, FlowOperationTypeEnum.PASS.getValue());
String
flowName
=
""
;
//
String flowName = "";
// 组装工单创建数据
//
// 组装工单创建数据
FlowCreateReqDTO
flowCreateReqDTO
=
buildFlowCreateReqDTO
(
ChangeFlowEnum
.
CHANGE_SUB_FLOW
.
getTopoId
(),
uid
,
//
FlowCreateReqDTO flowCreateReqDTO = buildFlowCreateReqDTO(ChangeFlowEnum.CHANGE_SUB_FLOW.getTopoId(), uid,
JSON
.
toJSONString
(
content
),
FlowxOperationEnum
.
CREATE
.
getName
(),
name
,
flowName
);
//
JSON.toJSONString(content), FlowxOperationEnum.CREATE.getName(), name, flowName);
// 创建工单
//
// 创建工单
String
subFlowId
=
flowService
.
createFlow
(
flowCreateReqDTO
);
//
String subFlowId = flowService.createFlow(flowCreateReqDTO);
//
ChangeExecRecord
execRecord
=
new
ChangeExecRecord
();
//
ChangeExecRecord execRecord = new ChangeExecRecord();
changeSubFlowService
.
createSubFlow
(
execRecord
);
//
changeSubFlowService.createSubFlow(execRecord);
return
""
;
//
return "";
}
//
}
private
FlowCreateReqDTO
buildFlowCreateReqDTO
(
String
topoId
,
String
uid
,
String
content
,
String
operateResult
,
private
FlowCreateReqDTO
buildFlowCreateReqDTO
(
String
topoId
,
String
uid
,
String
content
,
String
operateResult
,
String
name
,
String
flowName
)
{
String
name
,
String
flowName
)
{
...
@@ -463,21 +463,22 @@ public class ChangeSubFlowBiz {
...
@@ -463,21 +463,22 @@ public class ChangeSubFlowBiz {
* 处理子单延期(DELAY)
* 处理子单延期(DELAY)
*/
*/
private
String
handleSubFlowDelay
(
ChangeSubFlowRecord
subFlowRecord
,
ChangeSubFlowSubmitReq
req
)
{
private
String
handleSubFlowDelay
(
ChangeSubFlowRecord
subFlowRecord
,
ChangeSubFlowSubmitReq
req
)
{
//
1.
验证延期时间
// 验证延期时间
Long
changeConfirmResultTime
=
req
.
getChangeConfirmResultTime
();
Long
changeConfirmResultTime
=
req
.
getChangeConfirmResultTime
();
Long
tomorrowSpecificTime
=
DateUtils
.
getTomorrowSpecificTime
(
"00:00:00"
);
Long
tomorrowSpecificTime
=
DateUtils
.
getTomorrowSpecificTime
(
"00:00:00"
);
if
(
changeConfirmResultTime
==
null
||
changeConfirmResultTime
<
tomorrowSpecificTime
)
{
if
(
changeConfirmResultTime
==
null
||
changeConfirmResultTime
<
tomorrowSpecificTime
)
{
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
BAD_REQUEST
,
"时间不可晚于下次执行时间"
);
throw
ExceptionFactory
.
createBiz
(
ResponseCode
.
BAD_REQUEST
,
"时间不可晚于下次执行时间"
);
}
}
//
2.
更新子单延期时间,不流转工单
// 更新子单延期时间,不流转工单
subFlowRecord
.
setChangeConfirmResultTime
(
changeConfirmResultTime
);
subFlowRecord
.
setChangeConfirmResultTime
(
changeConfirmResultTime
);
subFlowRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
subFlowRecord
.
setUpdateTime
(
DateUtils
.
getCurrentTime
());
changeSubFlowRecordService
.
update
(
subFlowRecord
);
changeSubFlowRecordService
.
update
(
subFlowRecord
);
// todo:延期需要重新发邮件,改变执行邮件状态
log
.
info
(
"[handleSubFlowDelay] 子单延期,subFlowId:{}, delayTime:{}"
,
subFlowRecord
.
getSubFlowId
(),
changeConfirmResultTime
);
log
.
info
(
"[handleSubFlowDelay] 子单延期,subFlowId:{}, delayTime:{}"
,
subFlowRecord
.
getSubFlowId
(),
changeConfirmResultTime
);
// 延期不流转工单,返回null
return
null
;
return
null
;
}
}
...
...
yanxuan-qc-change-system-web/src/main/java/com/netease/mail/yanxuan/change/web/controller/TestController.java
View file @
926ec4ec
...
@@ -95,16 +95,6 @@ public class TestController {
...
@@ -95,16 +95,6 @@ public class TestController {
}
}
/**
/**
* 发起变更执行工单
*
* @return
*/
@PostMapping
(
"/create"
)
public
AjaxResult
<
String
>
createAndSubmit
(
@RequestBody
@Valid
ChangeSubFlowCreateReq
changeSubFlowCreateReq
)
{
return
AjaxResult
.
success
(
changeSubFlowBiz
.
createAndSubmit
(
changeSubFlowCreateReq
));
}
/**
* 查询topo实际节点信息
* 查询topo实际节点信息
*
*
* @param flowId 工单ID
* @param flowId 工单ID
...
...
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