Commit e1003b1e by ilal

提交

parent eed56c24
......@@ -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获取该人员信息,没有则传全部
......
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