| | |
| | | Page<SysUser> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<SysUser> list ; |
| | | if (isDivisionHead!=null&&!isDivisionHead.equals("")) |
| | | int num; |
| | | if (isDivisionHead!=null&&!isDivisionHead.equals("")){ |
| | | list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids,isDivisionHead); |
| | | else |
| | | num=IUserService.selectNum("2",keyword,ids,isDivisionHead); |
| | | } |
| | | else{ |
| | | list = IUserService.selectConfigList(pageParam,pageSize,"2",keyword,ids,null); |
| | | int num=IUserService.selectNum("2",keyword,ids,null); |
| | | num=IUserService.selectNum("2",keyword,ids,null); |
| | | } |
| | | return getDataTable(list,num); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 新增用户 |
| | | * |
| | | * @param config 参数配置信息 |
| | | * @param config 参数配置信息- |
| | | * @return 结果 |
| | | */ |
| | | @ApiOperation("新增导办用户接口") |
| | |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | user.setRoleIds("13"); |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | user.setDataPermission(config.getMoreDepartmentIds()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | user.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | user.setRoleIds("2"); |
| | | } |
| | | user.setUserType("2"); |
| | |
| | | user.setDepartmentIds(config.getDepartmentIds()); |
| | | user.setDepartmentIdStr(config.getDepartmentIdStr()); |
| | | user.setMoreDepartmentIds(config.getMoreDepartmentIds()); |
| | | user.setDataPermission(config.getMoreDepartmentIds()); |
| | | user.setMattersIds(config.getMattersIds()); |
| | | user.setMasterNames(config.getMasterNames()); |
| | | user.setMattersNames(config.getMattersNames()); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | user.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(user)); |
| | | } |
| | |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setRoleIds("13"); |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getMoreDepartmentIds()); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | config.setRoleIds("2"); |
| | | } |
| | | config.setCreateBy(sysUser.getUserId()); |
| | | config.setCreateTime(LocalDateTime.now()); |
| | | config.setUpdateTime(LocalDateTime.now()); |
| | | config.setUserId(Snowflake.getId()+""); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | config.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | config.setIsDivisionHead(config.getIsDivisionHead()); |
| | | return toAjax(IUserService.insertConfig(config)); |
| | | } |
| | |
| | | //是否是部门领导(1是 2不是) |
| | | if(StringUtils.equals("1",config.getIsDivisionHead())) |
| | | { |
| | | config.setDataPermission(config.getMoreDepartmentIds()); |
| | | config.setRoleIds("13"); |
| | | if (config.getMoreDepartmentIds()!=null&&config.getMoreDepartmentIds().indexOf(",")>0) |
| | | config.setDataPermission(config.getMoreDepartmentIds().substring(config.getMoreDepartmentIds().indexOf(",")+1)); |
| | | else |
| | | { |
| | | config.setDataPermission("0"); |
| | | } |
| | | |
| | | config.setRoleIds("13"); |
| | | } |
| | | else |
| | | { |
| | | if(StringUtils.isEmpty(config.getDataPermission())) { |
| | | config.setDataPermission(config.getDepartmentId()); |
| | | } |
| | | config.setRoleIds("2"); |
| | | } |
| | | |