diff --git a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java index 3485d09f..6bd2d812 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java +++ b/renren-admin/src/main/java/io/renren/common/controller/AbilityCenterControllerV3.java @@ -282,14 +282,14 @@ public class AbilityCenterControllerV3 { SysDeptDTO applyUserDeptDTO = sysDeptService.get(user.getDeptId()); // 发起人的部门 Integer applyUserDeptType = applyUserDeptDTO.getType(); // 发起人 Integer resourceDeptType = sysDeptDTO.getType(); // 资源所属部门 - if (applyUserDeptType == 2) { + if (applyUserDeptType != null && applyUserDeptType == 2) { cityApply = Boolean.TRUE; // 市级部门发起申请 } - if (resourceDeptType == 2) { + if (resourceDeptType != null && resourceDeptType == 2) { cityApplyCity = Boolean.TRUE; // 市区申请市区 } SysDeptDTO userDept = sysDeptService.get(user.getDeptId()); - if (!cityApply && !userDept.getDistrict().equals(sysDeptDTO.getDistrict())) { // 非市申请且发起人与资源所属区县不一致 + if (!cityApply && !userDept.getDistrict().equals(sysDeptDTO.getDistrict()) && userDept.getDistrict() != null) { // 非市申请且发起人与资源所属区县不一致 crossRegion = Boolean.TRUE; // 跨区 } }