Commit e1003b1e by ilal

提交

parent eed56c24
...@@ -1780,33 +1780,42 @@ public class YgglController { ...@@ -1780,33 +1780,42 @@ public class YgglController {
@ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "70.获取登录人和上级主管的empNum和名称", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) { public Result<List<LoginerChargeDto>> loginerChargers(@CurrentUser UserBean userBean) {
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer gw = empNumConfirm(orgCode, empNum).getBmgwId(); Integer gw = empNumConfirm(orgCode, empNum).getBmgwId();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper) if(gw > 0) {
.eq(ZzglBmgwM::getOrgCode, orgCode).list(); ZzglBmgwM buid = ZzglBmgwM.builder().id(gw).build().selectById();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM.getUpDepts(list, gw, zzglBmgwMs); List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
List<Integer> leaderList = new ArrayList<Integer>(); .eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();
for (Integer zzglId : list) { // 获取该员工的上级部门id 的数组list
for (ZzglBmgwM zzglBmgwM : zzglBmgwMs) { ZzglBmgwM.getUpDepts(list, buid.getUpId(), zzglBmgwMs);
if (zzglId.equals(zzglBmgwM.getId()) && zzglBmgwM.getLeader() != null) { List<Integer> leaderList = new ArrayList<Integer>();
for (Integer zzglId : list) {
leaderList.add(zzglBmgwM.getLeader()); for (ZzglBmgwM zzglBmgwM : zzglBmgwMs) {
if (zzglId.equals(zzglBmgwM.getId()) && zzglBmgwM.getLeader() != null) {
leaderList.add(zzglBmgwM.getLeader());
}
} }
} }
} List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList); // List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>(); for (YgglMainEmp m : ygglMainEmps) {
for (YgglMainEmp m : ygglMainEmps) { if (m.getHeadUrl() == null) {
if (m.getHeadUrl() == null) { m.setHeadUrl(CommonEnum.NULL_STR.getDesc());
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); return ResultUtil.data(loginerChargeDtos);
} }
// 根据传来的empNum获取该人员信息,没有则传全部 // 根据传来的empNum获取该人员信息,没有则传全部
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment