5a4cefe994aaf554c4f4c5d94c325e0f3d4be358..83187f51aef5692354bd88ed166a748e32cc78fb
2022-08-22 唐耀东
规章制度去掉发布版本验证
83187f 对比 | 目录
2022-08-18 唐耀东
配置工具修改
4fc7f3 对比 | 目录
6个文件已修改
61 ■■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/ExternaController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsManualController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsTemplateController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/DevEquipmentServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/ExternaController.java
@@ -68,6 +68,8 @@
        List<SysDictData> dict3 = dictDataService.list(new QueryWrapper<SysDictData>().lambda().eq(SysDictData::getDictType, "DICT103").orderByAsc(SysDictData::getDictSort));
        // 采集周期
        List<SysDictData> dict7 = dictDataService.list(new QueryWrapper<SysDictData>().lambda().eq(SysDictData::getDictType, "DICT107").orderByAsc(SysDictData::getDictSort));
        //在用状态
        List<SysDictData> dict4 = dictDataService.list(new QueryWrapper<SysDictData>().lambda().eq(SysDictData::getDictType, "DICT104").orderByAsc(SysDictData::getDictSort));
        // 外设单元
        List<DevPeripheralUnit> peripheralUnit = iDevPeripheralUnitService.list(new QueryWrapper<DevPeripheralUnit>());
        //外设厂商
@@ -80,6 +82,7 @@
        map.put("DICT101", dict1);
        map.put("DICT102", dict2);
        map.put("DICT103", dict3);
        map.put("DICT104", dict4);
        map.put("DICT107", dict7);
        map.put("peripheralUnit", peripheralUnit);
        map.put("peripheralFirm", peripheralFirm);
ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsManualController.java
@@ -47,7 +47,7 @@
     * 查询手册管理列表
     */
    @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);
@@ -57,7 +57,7 @@
     * 导出手册管理列表
     */
    @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) {
@@ -69,7 +69,7 @@
     * 获取手册管理详细信息
     */
    @ApiOperation("获取手册管理详细信息")
    @PreAuthorize("@ss.hasPermi('oa:manual:query')")
    //@PreAuthorize("@ss.hasPermi('oa:manual:query')")
    @GetMapping("/{id}")
    public AjaxResult<BsManualVo> getInfo(@ApiParam("主键")
                                                  @NotNull(message = "主键不能为空")
ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/BsTemplateController.java
@@ -47,7 +47,7 @@
     * 查询模板管理列表
     */
    @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);
@@ -69,7 +69,7 @@
     * 获取模板管理详细信息
     */
    @ApiOperation("获取模板管理详细信息")
    @PreAuthorize("@ss.hasPermi('oa:template:query')")
    //@PreAuthorize("@ss.hasPermi('oa:template:query')")
    @GetMapping("/{id}")
    public AjaxResult<BsTemplateVo> getInfo(@ApiParam("主键")
                                                  @NotNull(message = "主键不能为空")
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsRulesServiceImpl.java
@@ -58,10 +58,10 @@
        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);
@@ -79,12 +79,12 @@
        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);
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java
@@ -59,10 +59,10 @@
        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);
@@ -80,12 +80,12 @@
        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);
ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/DevEquipmentServiceImpl.java
@@ -189,6 +189,10 @@
        if(StringUtils.isNotBlank(bo.getEdition())){
            po.setEdition(bo.getEdition());
        }
        if(StringUtils.isNotBlank(bo.getUseStatus()))
        {
            po.setUseStatus(bo.getUseStatus());
        }
//        if (StringUtils.isEmpty(bo.getNetworkId())) {
//            po.setNetworkId(bo.getNetworkId());
//        }
@@ -218,6 +222,10 @@
        if (StringUtils.isNotBlank(bo.getRemarks())) {
            po.setRemarks(bo.getRemarks());
        }
        if(StringUtils.isNotBlank(bo.getUseStatus()))
        {
            po.setUseStatus(bo.getUseStatus());
        }
        baseMapper.updateById(po);
    }
}