Commit f9d684af authored by tangwei's avatar tangwei

修改知识库录入权限

parent aa227316
......@@ -83,6 +83,7 @@ public class RemoteData {
//组装部门信息为Map
Map<Long, DepartmentModel> departmentMap = new HashMap<>();
if(agencyUserModel.getCompanyDepartments()!=null){
for (List<DepartmentModel> departments : agencyUserModel.getCompanyDepartments().values()) {
if (ValidationUtil.isEmpty(departments)) {
continue;
......@@ -95,6 +96,7 @@ public class RemoteData {
}
}
}
}
//组装单位信息为Map
Map<Long, CompanyModel> companyMap = new HashMap(Bean.listToMap(agencyUserModel.getCompanys(), "sequenceNbr", CompanyModel.class));
......@@ -103,7 +105,7 @@ public class RemoteData {
List<RoleModel> roleModels = rolesMap.get(orgKey);
for (RoleModel roleModel : roleModels) {
String orgCode = null;
if (departmentMap.containsKey(orgKey)) {
if (departmentMap!=null&&departmentMap.containsKey(orgKey)) {
orgCode = departmentMap.get(orgKey).getOrgCode();
} else if (companyMap.containsKey(orgKey)) {
orgCode = companyMap.get(orgKey).getOrgCode();
......
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