| | |
| | | { |
| | | return ResultData.error("模板名称不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(sysUser.getDepartmentId())) |
| | | { |
| | | return ResultData.error("部门id不能为空 请分配部门id"); |
| | | } |
| | | |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | int num=iReplyTemplateService.countNum(entity.getName(),ids); |
| | | |
| | | if(num>0) |
| | | { |
| | | return ResultData.error("部门里办事名称重复!"); |
| | | } |
| | | |
| | | entity.setId(null); |
| | | entity.setDepartmentId(sysUser.getDepartmentId()); |
| | | entity.setCreateUserId(sysUser.getUserId()+""); |
| | |
| | | { |
| | | return ResultData.error("模板不存在!"); |
| | | } |
| | | entity.setName(entity.getName()+"(副本)"); |
| | | entity.setId(null); |
| | | return toAjax(iReplyTemplateService.insertConfig(entity)); |
| | | } |