bug修改,多主管部门推送人员信息报错

limingyu-20240401-app登录曹实业判断修改
liujun 2024-03-20 14:20:38 +08:00
parent 794b5df30b
commit 18c07c68ea
1 changed files with 16 additions and 6 deletions

View File

@ -100,12 +100,22 @@ public class XgfUserServiceImpl implements XgfUserService {
}
/* 主管部门 */
condition.clear();
condition.put("DEPARTMENT_ID", x.get("MAIN_DEPARTMENT_ID"));
regDepartmentEntity = departmentService.getCorpDepartment(condition);
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
if (regDepartmentEntity.size() > 0) {
x.put("MAIN_DEPARTMENT_NAME", regDepartmentEntity.get("NAME"));
// 2024-03-20 liu jun :为了兼容新老数据这里做特殊处理
if (x.get("MAIN_DEPARTMENT_ID") != null && StringUtils.isNotBlank(x.get("MAIN_DEPARTMENT_ID").toString())) {
if (x.getString("MAIN_DEPARTMENT_ID").contains(",")) {
String[] mainDepartmentIds = x.getString("MAIN_DEPARTMENT_ID").split(",");
for (String mainDepartmentId : mainDepartmentIds) {
condition.clear();
condition.put("DEPARTMENT_ID", mainDepartmentId);
regDepartmentEntity = departmentService.getCorpDepartment(condition);
if (regDepartmentEntity != null && regDepartmentEntity.size() > 0) {
x.put("MAIN_DEPARTMENT_NAME", x.getString("MAIN_DEPARTMENT_NAME") + "," + regDepartmentEntity.get("NAME"));
break;
}
}
}
} else {
throw new RuntimeException("主管部门ID不能为空");
}
entity = new PageData();
entity.putAll(x);