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
胡园园
yanxuan-qc-change-system
Commits
40ab686f
Commit
40ab686f
authored
Dec 13, 2022
by
穆龙飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify:增加部门信息
parent
7bbe706a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
ChangeFlowBiz.java
...om/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
+16
-11
No files found.
yanxuan-qc-change-system-biz/src/main/java/com/netease/mail/yanxuan/change/biz/biz/ChangeFlowBiz.java
View file @
40ab686f
...
@@ -889,27 +889,32 @@ public class ChangeFlowBiz {
...
@@ -889,27 +889,32 @@ public class ChangeFlowBiz {
Set
<
String
>
commanderList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCommander
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
commanderList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCommander
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
creatorList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCreator
).
collect
(
Collectors
.
toSet
());
Set
<
String
>
creatorList
=
list
.
stream
().
map
(
ChangeFlowVO:
:
getChangeCreator
).
collect
(
Collectors
.
toSet
());
commanderList
.
addAll
(
creatorList
);
commanderList
.
addAll
(
creatorList
);
AjaxResponse
<
List
<
IusUserInfoRsp
>>
userListInfo
=
iusRpcService
.
queryUserListInfo
(
UserQueryDTO
.
builder
().
uids
(
new
ArrayList
<>(
commanderList
)).
build
());
IusDepartmentReq
iusDepartmentReq
=
new
IusDepartmentReq
();
log
.
info
(
"query user: {} info: {}"
,
commanderList
,
JSON
.
toJSONString
(
userListInfo
));
iusDepartmentReq
.
setUids
(
new
ArrayList
<>(
commanderList
));
List
<
IusUserInfoRsp
>
data
=
userListInfo
.
getData
();
HashMap
<
String
,
List
<
SecondaryDepartments
>>
orgMap
=
iusService
.
queryDepartment
(
iusDepartmentReq
);
//AjaxResponse<List<IusUserInfoRsp>> userListInfo = iusRpcService.queryUserListInfo(UserQueryDTO.builder().uids(new ArrayList<>(commanderList)).build());
log
.
info
(
"query user: {} info: {}"
,
commanderList
,
JSON
.
toJSONString
(
orgMap
));
//List<IusUserInfoRsp> data = userListInfo.getData();
list
.
forEach
(
i
->
{
list
.
forEach
(
i
->
{
Optional
<
IusUserInfoRsp
>
commander
=
data
.
stream
().
filter
(
u
->
u
.
getUid
().
equals
(
i
.
getChangeCommander
())).
findAny
();
List
<
SecondaryDepartments
>
commander
=
orgMap
.
get
(
i
.
getChangeCommander
());
Optional
<
IusUserInfoRsp
>
creator
=
data
.
stream
().
filter
(
u
->
u
.
getUid
().
equals
(
i
.
getChangeCreator
())).
findAny
();
List
<
SecondaryDepartments
>
creator
=
orgMap
.
get
(
i
.
getChangeCreator
());
if
(
commander
.
isPresent
())
{
//Optional<IusUserInfoRsp> commander = data.stream().filter(u -> u.getUid().equals(i.getChangeCommander())).findAny();
Optional
<
OrgPosDTO
>
anyOrg
=
commander
.
get
().
getOrgPosList
().
stream
().
filter
(
o
->
o
.
getLevel
()
==
3
).
findAny
();
//Optional<IusUserInfoRsp> creator = data.stream().filter(u -> u.getUid().equals(i.getChangeCreator())).findAny();
if
(!
CollectionUtils
.
isEmpty
(
commander
))
{
Optional
<
SecondaryDepartments
>
anyOrg
=
commander
.
stream
().
filter
(
o
->
o
.
getOrgPosLevel
()
==
3
).
findAny
();
String
orgName
=
"无三级部门"
;
String
orgName
=
"无三级部门"
;
if
(
anyOrg
.
isPresent
())
{
if
(
anyOrg
.
isPresent
())
{
orgName
=
anyOrg
.
get
().
getOrgPosName
();
orgName
=
anyOrg
.
get
().
getOrgPosName
();
}
}
i
.
setChangeCommander
(
commander
.
get
(
).
get
Name
()
+
"("
+
orgName
+
")"
);
i
.
setChangeCommander
(
commander
.
get
(
0
).
getUser
Name
()
+
"("
+
orgName
+
")"
);
}
}
if
(
creator
.
isPresent
(
))
{
if
(
!
CollectionUtils
.
isEmpty
(
creator
))
{
Optional
<
OrgPosDTO
>
anyOrg
=
creator
.
get
().
getOrgPosList
().
stream
().
filter
(
o
->
o
.
get
Level
()
==
3
).
findAny
();
Optional
<
SecondaryDepartments
>
anyOrg
=
creator
.
stream
().
filter
(
o
->
o
.
getOrgPos
Level
()
==
3
).
findAny
();
String
orgName
=
"无三级部门"
;
String
orgName
=
"无三级部门"
;
if
(
anyOrg
.
isPresent
())
{
if
(
anyOrg
.
isPresent
())
{
orgName
=
anyOrg
.
get
().
getOrgPosName
();
orgName
=
anyOrg
.
get
().
getOrgPosName
();
}
}
i
.
setChangeCreator
(
commander
.
get
(
).
get
Name
()
+
"("
+
orgName
+
")"
);
i
.
setChangeCreator
(
commander
.
get
(
0
).
getUser
Name
()
+
"("
+
orgName
+
")"
);
}
}
});
});
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
...
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