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
67741dc8
Commit
67741dc8
authored
Jan 11, 2023
by
“zcwang”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 导出发起人改为和详情一致
parent
e0ba949c
Pipeline
#44728
passed with stages
in 2 minutes 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
ChangeFlowExportCallback.java
...yanxuan/change/biz/callback/ChangeFlowExportCallback.java
+19
-4
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/callback/ChangeFlowExportCallback.java
View file @
67741dc8
...
@@ -126,13 +126,21 @@ public class ChangeFlowExportCallback implements DesCallbackService {
...
@@ -126,13 +126,21 @@ public class ChangeFlowExportCallback implements DesCallbackService {
if
(
CollectionUtils
.
isEmpty
(
changeRecords
))
{
if
(
CollectionUtils
.
isEmpty
(
changeRecords
))
{
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
// 过滤不为供应商的创建人
// 过滤不为供应商的创建人
List
<
String
>
creatorList
=
changeRecords
.
stream
()
List
<
String
>
creatorList
=
changeRecords
.
stream
()
.
filter
(
c
->
!
CreateSourceEnum
.
TONG_ZHOU
.
getType
().
equals
(
c
.
getCreateSource
()))
.
filter
(
c
->
!
CreateSourceEnum
.
TONG_ZHOU
.
getType
().
equals
(
c
.
getCreateSource
()))
.
map
(
ChangeRecord:
:
getCreator
).
collect
(
Collectors
.
toList
());
.
map
(
ChangeRecord:
:
getCreator
).
collect
(
Collectors
.
toList
());
HashMap
<
String
,
List
<
SecondaryDepartments
>>
orgMap
=
null
;
List
<
String
>
allQueryDepartmentList
=
new
ArrayList
<>()
;
if
(
CollectionUtils
.
isNotEmpty
(
creatorList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
creatorList
))
{
allQueryDepartmentList
.
addAll
(
creatorList
);
}
List
<
String
>
changeCommanderList
=
changeRecords
.
stream
().
map
(
ChangeRecord:
:
getChangeCommander
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
changeCommanderList
))
{
allQueryDepartmentList
.
addAll
(
changeCommanderList
);
}
HashMap
<
String
,
List
<
SecondaryDepartments
>>
orgMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
allQueryDepartmentList
))
{
// 查询创建人部门名
// 查询创建人部门名
IusDepartmentReq
iusDepartmentReq
=
new
IusDepartmentReq
();
IusDepartmentReq
iusDepartmentReq
=
new
IusDepartmentReq
();
iusDepartmentReq
.
setUids
(
new
ArrayList
<>(
creatorList
));
iusDepartmentReq
.
setUids
(
new
ArrayList
<>(
creatorList
));
...
@@ -362,7 +370,6 @@ public class ChangeFlowExportCallback implements DesCallbackService {
...
@@ -362,7 +370,6 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO
.
setChangeCreator
(
record
.
getCreateSupplier
());
changeFlowExcelDTO
.
setChangeCreator
(
record
.
getCreateSupplier
());
}
else
{
}
else
{
List
<
SecondaryDepartments
>
creator
=
orgMap
.
get
(
record
.
getCreator
());
List
<
SecondaryDepartments
>
creator
=
orgMap
.
get
(
record
.
getCreator
());
// 供应商查询不到数据,不会覆盖,展示供应商id
if
(!
CollectionUtils
.
isEmpty
(
creator
))
{
if
(!
CollectionUtils
.
isEmpty
(
creator
))
{
Optional
<
SecondaryDepartments
>
anyOrg
=
creator
.
stream
().
filter
(
o
->
o
.
getOrgPosLevel
()
==
97
).
findAny
();
Optional
<
SecondaryDepartments
>
anyOrg
=
creator
.
stream
().
filter
(
o
->
o
.
getOrgPosLevel
()
==
97
).
findAny
();
String
orgName
=
"无三级部门"
;
String
orgName
=
"无三级部门"
;
...
@@ -378,7 +385,15 @@ public class ChangeFlowExportCallback implements DesCallbackService {
...
@@ -378,7 +385,15 @@ public class ChangeFlowExportCallback implements DesCallbackService {
changeFlowExcelDTO
.
setChangeType
(
parentChangeType
.
getTypeName
()
+
">"
+
sonChangeType
.
getTypeName
());
changeFlowExcelDTO
.
setChangeType
(
parentChangeType
.
getTypeName
()
+
">"
+
sonChangeType
.
getTypeName
());
changeFlowExcelDTO
.
setChangeLevel
(
ChangeLevelEnum
.
getByType
(
record
.
getChangeLevel
()));
changeFlowExcelDTO
.
setChangeLevel
(
ChangeLevelEnum
.
getByType
(
record
.
getChangeLevel
()));
changeFlowExcelDTO
.
setChangeDepartment
(
record
.
getChangeDepartment
());
changeFlowExcelDTO
.
setChangeDepartment
(
record
.
getChangeDepartment
());
changeFlowExcelDTO
.
setChangeCommander
(
record
.
getChangeCommander
());
List
<
SecondaryDepartments
>
commander
=
orgMap
.
get
(
record
.
getChangeCommander
());
if
(!
CollectionUtils
.
isEmpty
(
commander
))
{
Optional
<
SecondaryDepartments
>
anyOrg
=
commander
.
stream
().
filter
(
o
->
o
.
getOrgPosLevel
()
==
97
).
findAny
();
String
orgName
=
"无三级部门"
;
if
(
anyOrg
.
isPresent
())
{
orgName
=
anyOrg
.
get
().
getOrgPosName
();
}
changeFlowExcelDTO
.
setChangeCommander
(
commander
.
get
(
0
).
getUserName
()
+
"("
+
orgName
+
")"
);
}
changeFlowExcelDTO
.
setChangeReason
(
record
.
getChangeReason
());
changeFlowExcelDTO
.
setChangeReason
(
record
.
getChangeReason
());
changeFlowExcelDTO
.
setChangeContent
(
record
.
getChangeContent
());
changeFlowExcelDTO
.
setChangeContent
(
record
.
getChangeContent
());
changeFlowExcelDTO
.
setChangeRiskDesc
(
record
.
getChangeRiskDesc
());
changeFlowExcelDTO
.
setChangeRiskDesc
(
record
.
getChangeRiskDesc
());
...
...
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