Commit e1003b1e by ilal

提交

parent eed56c24
......@@ -1780,14 +1780,20 @@ 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();
if(gw > 0) {
ZzglBmgwM buid = ZzglBmgwM.builder().id(gw).build().selectById();
List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
.eq(ZzglBmgwM::getOrgCode, orgCode).list();
.eq(ZzglBmgwM::getOrgCode, orgCode).eq(ZzglBmgwM::getType, 0).list();
// 获取该员工的上级部门id 的数组list
ZzglBmgwM.getUpDepts(list, gw, zzglBmgwMs);
ZzglBmgwM.getUpDepts(list, buid.getUpId(), zzglBmgwMs);
List<Integer> leaderList = new ArrayList<Integer>();
for (Integer zzglId : list) {
for (ZzglBmgwM zzglBmgwM : zzglBmgwMs) {
......@@ -1798,7 +1804,7 @@ public class YgglController {
}
}
List<YgglMainEmp> ygglMainEmps = empNumsConfirm(orgCode, leaderList);
List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
// List<LoginerChargeDto> loginerChargeDtos = new ArrayList<LoginerChargeDto>();
for (YgglMainEmp m : ygglMainEmps) {
if (m.getHeadUrl() == null) {
m.setHeadUrl(CommonEnum.NULL_STR.getDesc());
......@@ -1808,6 +1814,9 @@ public class YgglController {
Collections.reverse(loginerChargeDtos);
return ResultUtil.data(loginerChargeDtos);
}
return ResultUtil.data(loginerChargeDtos);
}
// 根据传来的empNum获取该人员信息,没有则传全部
public List<YgglMainEmp> empNumsConfirm(Integer orgCode, List<Integer> empNumList) {
......
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