| | |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids= PermissionUtil.getPermission(sysUser); |
| | | if(ids==null || ids.size()<1) |
| | | { |
| | | return getDataTable("您没有权限查看该数据"); |
| | | } |
| | | List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids); |
| | | int num=iReplyTemplateService.countNum(Name,ids); |
| | | return getDataTable(list,num); |
| | |
| | | return ResultData.error("模板名称不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(sysUser.getDepartmentId())) |
| | | if(StringUtils.isEmpty(entity.getDepartmentId())) |
| | | { |
| | | return ResultData.error("部门id不能为空 请分配部门id"); |
| | | } |
| | | |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | List<String> ids=iOrganizationChartService.getIds(entity.getDepartmentId()); |
| | | int num=iReplyTemplateService.countNum(entity.getName(),ids); |
| | | |
| | | if(num>0) |
| | |
| | | } |
| | | |
| | | entity.setId(null); |
| | | entity.setDepartmentId(sysUser.getDepartmentId()); |
| | | entity.setDepartmentId(entity.getDepartmentId()); |
| | | entity.setCreateUserId(sysUser.getUserId()+""); |
| | | |
| | | return toAjax(iReplyTemplateService.insertConfig(entity)); |