From d44b855ffdda21a5abf8e00bc3381310882f9375 Mon Sep 17 00:00:00 2001
From: 唐耀东 <18861537@qq.com>
Date: 星期四, 12 五月 2022 09:45:36 +0800
Subject: [PATCH] 提交代码

---
 ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
index 656fc9a..4df9028 100644
--- a/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
+++ b/ruoyi-oa/src/main/java/com/ruoyi/oa/service/impl/SgConstructionBatchServiceImpl.java
@@ -50,16 +50,14 @@
         Map<String, Object> params = bo.getParams();
         LambdaQueryWrapper<SgConstructionBatch> lqw = Wrappers.lambdaQuery();
         lqw.like(StringUtils.isNotBlank(bo.getBatch()), SgConstructionBatch::getBatch, bo.getBatch());
-        lqw.eq(bo.getStartDate() != null, SgConstructionBatch::getStartDate, bo.getStartDate());
-        lqw.eq(bo.getEndDate() != null, SgConstructionBatch::getEndDate, bo.getEndDate());
-        lqw.eq(bo.getUserId() != null, SgConstructionBatch::getUserId, bo.getUserId());
+        lqw.eq(SgConstructionBatch::getSchoolId, bo.getSchoolId());
         return lqw;
     }
 
     @Override
     public Boolean insertByBo(SgConstructionBatchBo bo) {
         List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>()
-            .eq(SgConstructionBatch::getBatch, bo.getBatch()));
+            .eq(SgConstructionBatch::getBatch, bo.getBatch()).eq(SgConstructionBatch::getSchoolId, bo.getSchoolId()));
         if (list.size() > 0) {
             throw new ServiceException("鏂藉伐鎵规閲嶅", HttpStatus.HTTP_PARTIAL);
         }
@@ -75,7 +73,9 @@
     @Override
     public Boolean updateByBo(SgConstructionBatchBo bo) {
         List<SgConstructionBatch> list = baseMapper.selectList(new LambdaQueryWrapper<SgConstructionBatch>()
-            .eq(SgConstructionBatch::getBatch, bo.getBatch()).ne(SgConstructionBatch::getId, bo.getId()));
+            .eq(SgConstructionBatch::getBatch, bo.getBatch())
+            .ne(SgConstructionBatch::getId, bo.getId())
+            .eq(SgConstructionBatch::getSchoolId, bo.getSchoolId()));
         if (list.size() > 0) {
             throw new ServiceException("鏂藉伐鎵规閲嶅", HttpStatus.HTTP_PARTIAL);
         }

--
Gitblit v1.9.1