Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
e1003b1e
Commit
e1003b1e
authored
Jul 31, 2020
by
ilal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
eed56c24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
+27
-18
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+27
-18
No files found.
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
e1003b1e
...
...
@@ -1780,33 +1780,42 @@ public class YgglController {
@ApiOperation
(
value
=
"70.获取登录人和上级主管的empNum和名称"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
70
)
public
Result
<
List
<
LoginerChargeDto
>>
loginerChargers
(
@CurrentUser
UserBean
userBean
)
{
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
Integer
orgCode
=
userBean
.
getOrgCode
();
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
gw
=
empNumConfirm
(
orgCode
,
empNum
).
getBmgwId
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
list
();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
gw
,
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
if
(
gw
>
0
)
{
ZzglBmgwM
buid
=
ZzglBmgwM
.
builder
().
id
(
gw
).
build
().
selectById
();
List
<
ZzglBmgwM
>
zzglBmgwMs
=
new
LambdaQueryChainWrapper
<
ZzglBmgwM
>(
zzglBmgwMMapper
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getType
,
0
).
list
();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM
.
getUpDepts
(
list
,
buid
.
getUpId
(),
zzglBmgwMs
);
List
<
Integer
>
leaderList
=
new
ArrayList
<
Integer
>();
for
(
Integer
zzglId
:
list
)
{
for
(
ZzglBmgwM
zzglBmgwM
:
zzglBmgwMs
)
{
if
(
zzglId
.
equals
(
zzglBmgwM
.
getId
())
&&
zzglBmgwM
.
getLeader
()
!=
null
)
{
leaderList
.
add
(
zzglBmgwM
.
getLeader
());
}
}
}
}
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
List
<
LoginerChargeDto
>
loginerChargeDtos
=
new
ArrayList
<
LoginerChargeDto
>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
m
.
setHeadUrl
(
CommonEnum
.
NULL_STR
.
getDesc
());
List
<
YgglMainEmp
>
ygglMainEmps
=
empNumsConfirm
(
orgCode
,
leaderList
);
// List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for
(
YgglMainEmp
m
:
ygglMainEmps
)
{
if
(
m
.
getHeadUrl
()
==
null
)
{
m
.
setHeadUrl
(
CommonEnum
.
NULL_STR
.
getDesc
());
}
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
}
loginerChargeDtos
.
add
(
new
LoginerChargeDto
(
m
.
getEmpNum
(),
m
.
getName
(),
m
.
getHeadUrl
()));
Collections
.
reverse
(
loginerChargeDtos
);
return
ResultUtil
.
data
(
loginerChargeDtos
);
}
Collections
.
reverse
(
loginerChargeDtos
);
return
ResultUtil
.
data
(
loginerChargeDtos
);
}
// 根据传来的empNum获取该人员信息,没有则传全部
...
...
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