| | |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.oa.domain.BsRules; |
| | | import com.ruoyi.oa.domain.BsTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | |
| | | private LambdaQueryWrapper<BsManual> buildQueryWrapper(BsManualBo bo) { |
| | | Map<String, Object> params = bo.getParams(); |
| | | LambdaQueryWrapper<BsManual> lqw = Wrappers.lambdaQuery(); |
| | | lqw.like(bo.getManual() != null, BsManual::getManual, bo.getManual()); |
| | | return lqw; |
| | | } |
| | | |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("手册重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsManual> vList = baseMapper.selectList(new LambdaQueryWrapper<BsManual>().eq(BsManual::getVersionCode, bo.getVersionCode())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsManual> vList = baseMapper.selectList(new LambdaQueryWrapper<BsManual>().eq(BsManual::getVersionCode, bo.getVersionCode())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsManual add = BeanUtil.toBean(bo, BsManual.class); |
| | | validEntityBeforeSave(add); |
| | | boolean flag = save(add); |
| | |
| | | if (list.size() > 0) { |
| | | throw new ServiceException("手册重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | List<BsManual> vList = baseMapper.selectList(new LambdaQueryWrapper<BsManual>() |
| | | .eq(BsManual::getVersionCode, bo.getVersionCode()) |
| | | .ne(BsManual::getId, bo.getId())); |
| | | if (vList.size() > 0) { |
| | | throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | // List<BsManual> vList = baseMapper.selectList(new LambdaQueryWrapper<BsManual>() |
| | | // .eq(BsManual::getVersionCode, bo.getVersionCode()) |
| | | // .ne(BsManual::getId, bo.getId())); |
| | | // if (vList.size() > 0) { |
| | | // throw new ServiceException("发布版本重复", HttpStatus.HTTP_PARTIAL); |
| | | // } |
| | | BsManual update = BeanUtil.toBean(bo, BsManual.class); |
| | | validEntityBeforeSave(update); |
| | | return updateById(update); |