fix npe
This commit is contained in:
parent
035575b45d
commit
5c83bfa1da
|
@ -2808,14 +2808,19 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
||||||
if (params.get("provideDept") != null) {
|
if (params.get("provideDept") != null) {
|
||||||
Map<String, Object> lcDept = sysDeptDao.selectLCDeptByUcsDeptName(params.get("provideDept").toString());
|
Map<String, Object> lcDept = sysDeptDao.selectLCDeptByUcsDeptName(params.get("provideDept").toString());
|
||||||
|
|
||||||
if (lcDept.isEmpty()
|
try {
|
||||||
|| lcDept.get("lc_name") == null
|
if (lcDept.isEmpty()
|
||||||
|| (lcDept.get("lc_name") != null && org.apache.commons.lang3.StringUtils.isBlank(lcDept.get("lc_name").toString()))
|
|| lcDept.get("lc_name") == null
|
||||||
) {
|
|| (lcDept.get("lc_name") != null && org.apache.commons.lang3.StringUtils.isBlank(lcDept.get("lc_name").toString()))
|
||||||
logger.error("未查询到{}对应的浪潮系统部门", params.get("provideDept").toString());
|
) {
|
||||||
|
logger.error("未查询到{}对应的浪潮系统部门", params.get("provideDept").toString());
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
sb.append(" AND apply.\"resourceDeptName\" = ").append(lcDept.get("lc_name").toString());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("", e);
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
sb.append(" AND apply.\"resourceDeptName\" = ").append(lcDept.get("lc_name").toString());
|
|
||||||
}
|
}
|
||||||
if (params.get("region") != null) {
|
if (params.get("region") != null) {
|
||||||
List<String> deptNames = sysDeptDao.selectLCDeptByRegion((Long) params.get("region"));
|
List<String> deptNames = sysDeptDao.selectLCDeptByRegion((Long) params.get("region"));
|
||||||
|
|
Loading…
Reference in New Issue