| | |
| | | * 查询手册管理列表 |
| | | */ |
| | | @ApiOperation("查询手册管理列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:manual:list')") |
| | | //@PreAuthorize("@ss.hasPermi('oa:manual:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<BsManualVo> list(@Validated(QueryGroup.class) BsManualBo bo) { |
| | | return iBsManualService.queryPageList(bo); |
| | |
| | | * 导出手册管理列表 |
| | | */ |
| | | @ApiOperation("导出手册管理列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:manual:export')") |
| | | //@PreAuthorize("@ss.hasPermi('oa:manual:export')") |
| | | @Log(title = "手册管理", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public void export(@Validated BsManualBo bo, HttpServletResponse response) { |
| | |
| | | * 获取手册管理详细信息 |
| | | */ |
| | | @ApiOperation("获取手册管理详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:manual:query')") |
| | | //@PreAuthorize("@ss.hasPermi('oa:manual:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<BsManualVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | |
| | | * 查询模板管理列表 |
| | | */ |
| | | @ApiOperation("查询模板管理列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:template:list')") |
| | | //@PreAuthorize("@ss.hasPermi('oa:template:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<BsTemplateVo> list(@Validated(QueryGroup.class) BsTemplateBo bo) { |
| | | return iBsTemplateService.queryPageList(bo); |
| | |
| | | * 获取模板管理详细信息 |
| | | */ |
| | | @ApiOperation("获取模板管理详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:template:query')") |
| | | //@PreAuthorize("@ss.hasPermi('oa:template:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<BsTemplateVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("规章制度重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>().eq(BsRules::getVersionCode, bo.getVersionCode())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsRules add = BeanUtil.toBean(bo, BsRules.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("规章制度重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() |
| | | .eq(BsRules::getVersionCode, bo.getVersionCode()) |
| | | .ne(BsRules::getId, bo.getId())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsRules> vList = baseMapper.selectList(new LambdaQueryWrapper<BsRules>() |
| | | // .eq(BsRules::getVersionCode, bo.getVersionCode()) |
| | | // .ne(BsRules::getId, bo.getId())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsRules update = BeanUtil.toBean(bo, BsRules.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("模板重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsTemplate> vList = baseMapper.selectList(new LambdaQueryWrapper<BsTemplate>().eq(BsTemplate::getVersionCode, bo.getVersionCode())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsTemplate> vList = baseMapper.selectList(new LambdaQueryWrapper<BsTemplate>().eq(BsTemplate::getVersionCode, bo.getVersionCode())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsTemplate add = BeanUtil.toBean(bo, BsTemplate.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("模板重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsTemplate> vList = baseMapper.selectList(new LambdaQueryWrapper<BsTemplate>() |
| | | .eq(BsTemplate::getVersionCode, bo.getVersionCode()) |
| | | .ne(BsTemplate::getId, bo.getId())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsTemplate> vList = baseMapper.selectList(new LambdaQueryWrapper<BsTemplate>() |
| | | // .eq(BsTemplate::getVersionCode, bo.getVersionCode()) |
| | | // .ne(BsTemplate::getId, bo.getId())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsTemplate update = BeanUtil.toBean(bo, BsTemplate.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |