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
0f85eac1
Commit
0f85eac1
authored
Nov 26, 2025
by
王志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 变更行动工单列表
parent
4d2346a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
22 deletions
+29
-22
ChangeSubFlowBiz.java
...netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
+29
-22
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeSubFlowBiz.java
View file @
0f85eac1
...
@@ -341,37 +341,18 @@ public class ChangeSubFlowBiz {
...
@@ -341,37 +341,18 @@ public class ChangeSubFlowBiz {
log
.
info
(
"[querySubFlowList] page:{}, pageSize:{}, queryReq:{}"
,
page
,
pageSize
,
JSON
.
toJSONString
(
queryReq
));
log
.
info
(
"[querySubFlowList] page:{}, pageSize:{}, queryReq:{}"
,
page
,
pageSize
,
JSON
.
toJSONString
(
queryReq
));
// 根据主单条件(flowId, itemId, supplier, onlyMyFollowed)查询主单,获取 changeRecordIds
// 根据主单条件(flowId, itemId, supplier, onlyMyFollowed)查询主单,获取 changeRecordIds
List
<
Long
>
changeRecordIds
=
null
;
if
(
queryReq
.
getFlowId
()
!=
null
||
StringUtils
.
isNotBlank
(
queryReq
.
getItemId
())
if
(
queryReq
.
getFlowId
()
!=
null
||
StringUtils
.
isNotBlank
(
queryReq
.
getItemId
())
||
StringUtils
.
isNotBlank
(
queryReq
.
getSupplier
())
||
queryReq
.
getOnlyMyFollowed
())
{
||
StringUtils
.
isNotBlank
(
queryReq
.
getSupplier
())
||
queryReq
.
getOnlyMyFollowed
())
{
// 构建主单查询条件
List
<
Long
>
flowRecordIds
=
fileterFlowRecordIds
(
queryReq
);
ChangeFlowListQueryReq
mainQueryReq
=
new
ChangeFlowListQueryReq
();
if
(
CollectionUtils
.
isEmpty
(
flowRecordIds
))
{
mainQueryReq
.
setFlowId
(
queryReq
.
getFlowId
());
mainQueryReq
.
setItemId
(
queryReq
.
getItemId
());
mainQueryReq
.
setSupplier
(
queryReq
.
getSupplier
());
mainQueryReq
.
setOnlyMyFollowed
(
queryReq
.
getOnlyMyFollowed
());
String
currentUser
=
RequestLocalBean
.
getUid
();
// 数据可见范围:变更负责人=当前用户的变更工单所关联的全部变更行动工单
if
(
queryReq
.
getOnlyMyFollowed
())
{
if
(
StringUtils
.
isNotBlank
(
currentUser
))
{
mainQueryReq
.
setChangeCommander
(
currentUser
);
}
}
// 查询主单(不分页,只获取ID)
List
<
ChangeRecord
>
changeRecords
=
changeRecordMapper
.
selectByCondition
(
mainQueryReq
);
// 如果主单查询结果为空,直接返回
// 如果主单查询结果为空,直接返回
if
(
CollectionUtils
.
isEmpty
(
changeRecords
))
{
PageVO
pageVO
=
buildPageVo
(
0L
,
pageSize
,
page
);
PageVO
pageVO
=
buildPageVo
(
0L
,
pageSize
,
page
);
ChangeSubFlowListVO
result
=
new
ChangeSubFlowListVO
();
ChangeSubFlowListVO
result
=
new
ChangeSubFlowListVO
();
result
.
setPageVo
(
pageVO
);
result
.
setPageVo
(
pageVO
);
result
.
setChangeSubFlowList
(
new
ArrayList
<>());
result
.
setChangeSubFlowList
(
new
ArrayList
<>());
return
result
;
return
result
;
}
}
queryReq
.
setChangeRecordIds
(
flowRecordIds
);
changeRecordIds
=
changeRecords
.
stream
().
map
(
ChangeRecord:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
}
}
// 根据行动项条件(changeExecUser, changeExecDepartment)查询执行项,获取 subFlowRecordId,然后查询子单获取 subFlowId 列表
// 根据行动项条件(changeExecUser, changeExecDepartment)查询执行项,获取 subFlowRecordId,然后查询子单获取 subFlowId 列表
...
@@ -566,6 +547,32 @@ public class ChangeSubFlowBiz {
...
@@ -566,6 +547,32 @@ public class ChangeSubFlowBiz {
return
result
;
return
result
;
}
}
private
List
<
Long
>
fileterFlowRecordIds
(
ChangeSubFlowListQueryReq
queryReq
)
{
// 构建主单查询条件
ChangeFlowListQueryReq
mainQueryReq
=
new
ChangeFlowListQueryReq
();
mainQueryReq
.
setFlowId
(
queryReq
.
getFlowId
());
mainQueryReq
.
setItemId
(
queryReq
.
getItemId
());
mainQueryReq
.
setSupplier
(
queryReq
.
getSupplier
());
mainQueryReq
.
setOnlyMyFollowed
(
queryReq
.
getOnlyMyFollowed
());
String
currentUser
=
RequestLocalBean
.
getUid
();
// 数据可见范围:变更负责人=当前用户的变更工单所关联的全部变更行动工单
if
(
queryReq
.
getOnlyMyFollowed
())
{
if
(
StringUtils
.
isNotBlank
(
currentUser
))
{
mainQueryReq
.
setChangeCommander
(
currentUser
);
}
}
// 查询主单(不分页,只获取ID)
List
<
ChangeRecord
>
changeRecords
=
changeRecordMapper
.
selectByCondition
(
mainQueryReq
);
if
(
CollectionUtils
.
isEmpty
(
changeRecords
))
{
return
new
ArrayList
<>();
}
return
changeRecords
.
stream
().
map
(
ChangeRecord:
:
getId
).
distinct
().
collect
(
Collectors
.
toList
());
}
/**
/**
* 构建分页信息
* 构建分页信息
*
*
...
...
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