This commit is contained in:
wangliwen 2022-10-31 12:52:18 +08:00
parent a16c129c51
commit 2af6dfc830
1 changed files with 8 additions and 3 deletions

View File

@ -51,6 +51,7 @@ import io.renren.modules.sys.dao.SysRegionDao;
import io.renren.modules.sys.dto.SysDeptDTO;
import io.renren.modules.sys.dto.SysUserDTO;
import io.renren.modules.sys.entity.SysDeptEntity;
import io.renren.modules.sys.enums.SuperAdminEnum;
import io.renren.modules.sys.service.SysDeptService;
import io.renren.modules.sys.service.SysUserService;
import lombok.SneakyThrows;
@ -2078,7 +2079,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object selectApplyDeptDetailTypeCountList(Map params) {
UserDetail user = SecurityUser.getUser();
if (user.getDeptId() != null) {
if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) {
logger.info("管理员区域");
} else if (user.getDeptId() != null) {
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
@ -2260,9 +2263,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Override
public Object selectDeptDetailTypeCountList(Map params) {
UserDetail user = SecurityUser.getUser();
if (user.getDeptId() != null) {
if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) {
logger.info("管理员区域");
} else if (user.getDeptId() != null) {
SysDeptDTO sysDeptDTO = deptService.get(user.getDeptId());
params.put("region", sysDeptDTO.getDistrict()); // 区域管理员只出本部门区域
params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域
logger.error("区域管理员只出本部门区域:{}", sysDeptDTO.getDistrict());
}
if (params.containsKey("deptId") && org.apache.commons.lang3.StringUtils.isNotEmpty(params.get("deptId").toString())) {