|
@@ -2,6 +2,7 @@ package com.qunzhixinxi.hnqz.admin.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.lang.tree.Tree;
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
@@ -698,7 +699,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
return baseMapper.getUserVosPage(page, userDTO, new DataScope());
|
|
|
} else if (SecurityUtils.getRoles().contains(2) || SecurityUtils.getRoles().contains(35)) {
|
|
|
// 人数据权限
|
|
|
- List<Integer> bcRoles = Stream.of(2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 19, 31, 35, 37, 38, 39, 40, 41, 42, 43).collect(Collectors.toList());
|
|
|
+ List<Integer> bcRoles = Stream.of(2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 19, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47).collect(Collectors.toList());
|
|
|
if (CollUtil.isNotEmpty(userDTO.getRole())) {
|
|
|
Collection<Integer> intersection = CollUtil.intersectionDistinct(bcRoles, userDTO.getRole());
|
|
|
if (CollUtil.isEmpty(intersection)) {
|
|
@@ -718,7 +719,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
return baseMapper.getUserVosPage(page, userDTO, new DataScope());
|
|
|
} else if (SecurityUtils.getRoles().contains(35)) {
|
|
|
// BC总负责人数据权限
|
|
|
- List<Integer> bcRoles = Stream.of(3, 4, 5, 6, 7, 9, 10, 11, 13, 19, 31, 35, 37, 38, 39, 40, 41, 42, 43).collect(Collectors.toList());
|
|
|
+ List<Integer> bcRoles = Stream.of(3, 4, 5, 6, 7, 9, 10, 11, 13, 19, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47).collect(Collectors.toList());
|
|
|
if (CollUtil.isNotEmpty(userDTO.getRole())) {
|
|
|
Collection<Integer> intersection = CollUtil.intersectionDistinct(bcRoles, userDTO.getRole());
|
|
|
if (CollUtil.isEmpty(intersection)) {
|
|
@@ -729,6 +730,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
userDTO.setRole(bcRoles);
|
|
|
}
|
|
|
return baseMapper.getUserVosPage(page, userDTO, new DataScope());
|
|
|
+ } else if (SecurityUtils.getRoles().contains(47)) {
|
|
|
+ userDTO.setRole(ListUtil.of(5, 6));
|
|
|
+ return baseMapper.getUserVosPage(page, userDTO, new DataScope());
|
|
|
}
|
|
|
Integer deptId = userDTO.getDeptId();
|
|
|
userDTO.setDeptId(SecurityUtils.getUser().getDeptId());
|