| | |
| | | { |
| | | Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<ReplyTemplateEntity> list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids); |
| | | List<ReplyTemplateEntity> list; |
| | | if (sysUser.getUserType().equals("2")){ |
| | | list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids,sysUser.getUserId());} |
| | | else { |
| | | list = iReplyTemplateService.selectConfigList(pageParam,pageSize,Name,ids,null); |
| | | } |
| | | 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)); |