涉密人员统计

master
20918 11 months ago
parent 14ef16902a
commit e514dcba96

@ -11,6 +11,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysPost;
import com.ruoyi.system.domain.SysUserRole;
import com.ruoyi.system.service.ISysDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysPostService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysRoleService;
@ -98,12 +99,16 @@ public class SysUsernumController extends BaseController {
{ {
List<SysUser> sysUsers = userService.selectUserList(user); List<SysUser> sysUsers = userService.selectUserList(user);
List<SysUser> list = new ArrayList<>(); List<SysUser> list = new ArrayList<>();
List<SysRole> sysRoles = new ArrayList<>();
for (SysUser User : sysUsers){ for (SysUser User : sysUsers){
if (User.getDeptId().equals(deptId)){ if (User.getDeptId().equals(deptId)){
List<SysRole> sysRoles = roleService.selectRolesByUserId(User.getUserId()); List<SysUserRole> sysUserRoles = userService.selectUserRoleByUserId(User.getUserId());
mmap.put("sysRoles", sysRoles); for (SysUserRole UserRole : sysUserRoles){
SysRole sysRole = roleService.selectRoleById(UserRole.getRoleId());
sysRoles.add(sysRole);
}
User.setRoles(sysRoles);
list.add(User); list.add(User);
} }
} }
mmap.put("list", list); mmap.put("list", list);

Loading…
Cancel
Save