|
@@ -232,58 +232,14 @@ public class ReimburseApplyServiceImpl extends ServiceImpl<ReimburseApplyMapper,
|
|
throw new Exception("用户ID:" + userId + ",未查询到所属公司");
|
|
throw new Exception("用户ID:" + userId + ",未查询到所属公司");
|
|
}
|
|
}
|
|
List<String> list = new ArrayList<>();
|
|
List<String> list = new ArrayList<>();
|
|
-
|
|
|
|
String companyId = company.getString("companyId");
|
|
String companyId = company.getString("companyId");
|
|
if ("6608ed13c0dd42de93c790dbdf124234".equals(companyId)) {
|
|
if ("6608ed13c0dd42de93c790dbdf124234".equals(companyId)) {
|
|
//广州汇创思拓数字科技有限公司(华南) 直接返回 何田田
|
|
//广州汇创思拓数字科技有限公司(华南) 直接返回 何田田
|
|
list.add("1cd4c769eabb4de98fed306de2a3bbbd");
|
|
list.add("1cd4c769eabb4de98fed306de2a3bbbd");
|
|
-// if (!Check.isNull(welfareUserId)) {
|
|
|
|
-// list.add(welfareUserId);
|
|
|
|
-// }
|
|
|
|
} else if ("4b10089775c040119e139087517aed88".equals(companyId)) {
|
|
} else if ("4b10089775c040119e139087517aed88".equals(companyId)) {
|
|
//上海汇创思拓数字科技有限公司 直接返回 吴婵
|
|
//上海汇创思拓数字科技有限公司 直接返回 吴婵
|
|
list.add("183dce577efb49b386369473368cf251");
|
|
list.add("183dce577efb49b386369473368cf251");
|
|
-// if (!Check.isNull(welfareUserId)) {
|
|
|
|
-// list.add(welfareUserId);
|
|
|
|
-// }
|
|
|
|
- } else if ("d57fecdcf7a94d009736d9c850731582".equals(companyId)) {
|
|
|
|
- //北京汇创思拓数字科技有限公司
|
|
|
|
- String user = baseMapper.selectFinalLeaders(userId, companyId);
|
|
|
|
- if (userId.equals(user)) {
|
|
|
|
- list.add(userId);
|
|
|
|
- } else {
|
|
|
|
- //查询部门
|
|
|
|
- List<SysDepart> departs = sysDepartService.queryUserDeparts(userId);
|
|
|
|
- if (!departs.isEmpty()) {
|
|
|
|
- String orgCode = departs.get(0).getOrgCode();
|
|
|
|
- JSONObject object = sysDepartService.queryAllParentIdByOrgCode(orgCode);
|
|
|
|
- JSONObject map = object.getJSONObject(orgCode).getJSONObject("parentMap");
|
|
|
|
- JSONObject leader = new JSONObject();
|
|
|
|
- //查询审核人员信息
|
|
|
|
- List<JSONObject> leaders = baseMapper.selectLeaders(companyId);
|
|
|
|
- for (JSONObject obj : leaders) {
|
|
|
|
- String departName = obj.getString("depart_name");
|
|
|
|
- if (map.toJSONString().contains(departName)) {
|
|
|
|
- leader = obj;
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- if (leader.isEmpty()) {
|
|
|
|
- return Collections.emptyList();
|
|
|
|
- }
|
|
|
|
- //第一审核人
|
|
|
|
- list.add(leader.getString("first_id"));
|
|
|
|
- //第二审核人
|
|
|
|
- list.add(leader.getString("second_id"));
|
|
|
|
- //终极审核人
|
|
|
|
- list.add(leader.getString("final_id"));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-// if (!Check.isNull(welfareUserId)) {
|
|
|
|
-// list.add(welfareUserId);
|
|
|
|
-// }
|
|
|
|
- } else if ("3f362f527a804e8a9db6552ea12f7574".equals(companyId)) {
|
|
|
|
- //北京汇创思拓数字科技有限公司
|
|
|
|
|
|
+ } else {
|
|
String user = baseMapper.selectFinalLeaders(userId, companyId);
|
|
String user = baseMapper.selectFinalLeaders(userId, companyId);
|
|
if (userId.equals(user)) {
|
|
if (userId.equals(user)) {
|
|
list.add(userId);
|
|
list.add(userId);
|
|
@@ -321,9 +277,6 @@ public class ReimburseApplyServiceImpl extends ServiceImpl<ReimburseApplyMapper,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-// if (!Check.isNull(welfareUserId)) {
|
|
|
|
-// list.add(welfareUserId);
|
|
|
|
-// }
|
|
|
|
}
|
|
}
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
@@ -486,20 +439,14 @@ public class ReimburseApplyServiceImpl extends ServiceImpl<ReimburseApplyMapper,
|
|
} else if ("4b10089775c040119e139087517aed88".equals(companyId)) {
|
|
} else if ("4b10089775c040119e139087517aed88".equals(companyId)) {
|
|
//上海汇创思拓数字科技有限公司 直接返回 吴婵
|
|
//上海汇创思拓数字科技有限公司 直接返回 吴婵
|
|
return "183dce577efb49b386369473368cf251";
|
|
return "183dce577efb49b386369473368cf251";
|
|
- } else if ("d57fecdcf7a94d009736d9c850731582".equals(companyId)) {
|
|
|
|
- //北京汇创思拓数字科技有限公司
|
|
|
|
- return getCompanyLeader(userId, companyId);
|
|
|
|
- } else if ("3f362f527a804e8a9db6552ea12f7574".equals(companyId)) {
|
|
|
|
- //石家庄汇创思拓数字科技有限公司
|
|
|
|
|
|
+ } else {
|
|
return getCompanyLeader(userId, companyId);
|
|
return getCompanyLeader(userId, companyId);
|
|
}
|
|
}
|
|
- return null;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
// 获取公司审核人ID
|
|
// 获取公司审核人ID
|
|
private String getCompanyLeader(String userId, String companyId) {
|
|
private String getCompanyLeader(String userId, String companyId) {
|
|
String leaderId = "";
|
|
String leaderId = "";
|
|
-
|
|
|
|
String user = baseMapper.selectFinalLeaders(userId, companyId);
|
|
String user = baseMapper.selectFinalLeaders(userId, companyId);
|
|
if (userId.equals(user)) {
|
|
if (userId.equals(user)) {
|
|
return userId;
|
|
return userId;
|