From d1bcbbefab4da603c275ed61d0018a46dbc67d1e Mon Sep 17 00:00:00 2001 From: 唐耀东 <18861537@qq.com> Date: 星期三, 12 十月 2022 16:31:51 +0800 Subject: [PATCH] 施工交付增加其他录入交付功能 --- ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java index 96476f8..740455a 100644 --- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java +++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/BsTemplateServiceImpl.java @@ -8,6 +8,7 @@ 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.DevEquipment; import org.springframework.stereotype.Service; import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -50,6 +51,7 @@ private LambdaQueryWrapper<BsTemplate> buildQueryWrapper(BsTemplateBo bo) { Map<String, Object> params = bo.getParams(); LambdaQueryWrapper<BsTemplate> lqw = Wrappers.lambdaQuery(); + lqw.like(bo.getTemplateName() != null, BsTemplate::getTemplateName, bo.getTemplateName()); return lqw; } @@ -59,10 +61,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 +82,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); -- Gitblit v1.9.1