Browse Source

学时审核

change 3 years ago
parent
commit
822ef0825d

+ 7 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTypeServiceImpl.java

@@ -10,6 +10,7 @@ import com.zhongzheng.modules.course.bo.CourseEducationTierAddBo;
 import com.zhongzheng.modules.course.domain.CourseEducationTier;
 import com.zhongzheng.modules.course.service.ICourseEducationTierService;
 import com.zhongzheng.modules.course.vo.CourseEducationTierVo;
+import com.zhongzheng.modules.pay.domain.PayAisle;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -25,6 +26,7 @@ import com.zhongzheng.modules.course.vo.CourseEducationTypeVo;
 import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
 import org.springframework.util.StringUtils;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -119,9 +121,12 @@ public class CourseEducationTypeServiceImpl extends ServiceImpl<CourseEducationT
         if (CollectionUtils.isEmpty(list)){
             lqw.clear();
             lqw.like(StrUtil.isNotBlank(bo.getEducationName()), CourseEducationType::getEducationName, bo.getEducationName());
-            lqw.eq(bo.getStatus() != null, CourseEducationType::getStatus, 1);
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, CourseEducationType::getStatus, status);
             List<CourseEducationType> list1 = this.list(lqw);
-            if (CollectionUtils.isNotEmpty(list)){
+            if (CollectionUtils.isNotEmpty(list1)){
                 throw new IllegalArgumentException("教育类型名称重复");
             }
         }

+ 23 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayAisleServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.domain.CourseEducationType;
 import com.zhongzheng.modules.user.domain.SchoolProject;
@@ -18,6 +19,7 @@ import com.zhongzheng.modules.pay.mapper.PayAisleMapper;
 import com.zhongzheng.modules.pay.vo.PayAisleVo;
 import com.zhongzheng.modules.pay.service.IPayAisleService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -72,9 +74,12 @@ public class PayAisleServiceImpl extends ServiceImpl<PayAisleMapper, PayAisle> i
         PayAisle add = BeanUtil.toBean(bo, PayAisle.class);
         LambdaQueryWrapper<PayAisle> lqw = Wrappers.lambdaQuery();
         lqw.eq(StrUtil.isNotBlank(bo.getPayWay()), PayAisle::getPayWay, bo.getPayWay());
-        lqw.in(bo.getStatus() != null, PayAisle::getStatus, 1,0);
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayAisle::getStatus, status);
         List<PayAisle> list = this.list(lqw);
-        if (list.size() > 0){
+        if (CollectionUtils.isNotEmpty(list)){
             throw new RuntimeException("重复支付通道名字");
         }
         validEntityBeforeSave(add);
@@ -84,6 +89,22 @@ public class PayAisleServiceImpl extends ServiceImpl<PayAisleMapper, PayAisle> i
     @Override
     public Boolean updateByEditBo(PayAisleEditBo bo) {
         PayAisle update = BeanUtil.toBean(bo, PayAisle.class);
+        LambdaQueryWrapper<PayAisle> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getPayWay()), PayAisle::getPayWay, bo.getPayWay());
+        lqw.like(bo.getAisleId()!= null, PayAisle::getAisleId, bo.getAisleId());
+        List<PayAisle> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getPayWay()), PayAisle::getPayWay, bo.getPayWay());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayAisle::getStatus, status);
+            List<PayAisle> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复支付通道名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 28 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayCostServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
 import org.springframework.stereotype.Service;
@@ -17,6 +18,7 @@ import com.zhongzheng.modules.pay.mapper.PayCostMapper;
 import com.zhongzheng.modules.pay.vo.PayCostVo;
 import com.zhongzheng.modules.pay.service.IPayCostService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -69,6 +71,16 @@ public class PayCostServiceImpl extends ServiceImpl<PayCostMapper, PayCost> impl
     @Override
     public Boolean insertByAddBo(PayCostAddBo bo) {
         PayCost add = BeanUtil.toBean(bo, PayCost.class);
+        LambdaQueryWrapper<PayCost> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getCostName()), PayCost::getCostName, bo.getCostName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayCost::getStatus, status);
+        List<PayCost> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复费用类型名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -78,6 +90,22 @@ public class PayCostServiceImpl extends ServiceImpl<PayCostMapper, PayCost> impl
     @Override
     public Boolean updateByEditBo(PayCostEditBo bo) {
         PayCost update = BeanUtil.toBean(bo, PayCost.class);
+        LambdaQueryWrapper<PayCost> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getCostName()), PayCost::getCostName, bo.getCostName());
+        lqw.like(bo.getCostId()!= null, PayCost::getCostId, bo.getCostId());
+        List<PayCost> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getCostName()), PayCost::getCostName, bo.getCostName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayCost::getStatus, status);
+            List<PayCost> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复费用类型名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 28 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayNatureServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
 import com.zhongzheng.modules.pay.domain.PayCost;
@@ -18,6 +19,7 @@ import com.zhongzheng.modules.pay.mapper.PayNatureMapper;
 import com.zhongzheng.modules.pay.vo.PayNatureVo;
 import com.zhongzheng.modules.pay.service.IPayNatureService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -70,6 +72,16 @@ public class PayNatureServiceImpl extends ServiceImpl<PayNatureMapper, PayNature
     @Override
     public Boolean insertByAddBo(PayNatureAddBo bo) {
         PayNature add = BeanUtil.toBean(bo, PayNature.class);
+        LambdaQueryWrapper<PayNature> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getNatureName()), PayNature::getNatureName, bo.getNatureName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayNature::getStatus, status);
+        List<PayNature> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复收费性质名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -79,6 +91,22 @@ public class PayNatureServiceImpl extends ServiceImpl<PayNatureMapper, PayNature
     @Override
     public Boolean updateByEditBo(PayNatureEditBo bo) {
         PayNature update = BeanUtil.toBean(bo, PayNature.class);
+        LambdaQueryWrapper<PayNature> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getNatureName()), PayNature::getNatureName, bo.getNatureName());
+        lqw.like(bo.getNatureId()!= null, PayNature::getNatureId, bo.getNatureId());
+        List<PayNature> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getNatureName()), PayNature::getNatureName, bo.getNatureName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayNature::getStatus, status);
+            List<PayNature> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复收费性质名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayPayeeAisleServiceImpl.java

@@ -2,7 +2,9 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.pay.domain.PayNature;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -16,6 +18,7 @@ import com.zhongzheng.modules.pay.mapper.PayPayeeAisleMapper;
 import com.zhongzheng.modules.pay.vo.PayPayeeAisleVo;
 import com.zhongzheng.modules.pay.service.IPayPayeeAisleService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -66,6 +69,16 @@ public class PayPayeeAisleServiceImpl extends ServiceImpl<PayPayeeAisleMapper, P
     @Override
     public Boolean insertByAddBo(PayPayeeAisleAddBo bo) {
         PayPayeeAisle add = BeanUtil.toBean(bo, PayPayeeAisle.class);
+        LambdaQueryWrapper<PayPayeeAisle> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getPayeeAccount()), PayPayeeAisle::getPayeeAccount, bo.getPayeeAccount());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayPayeeAisle::getStatus, status);
+        List<PayPayeeAisle> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复收款方账户名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -75,6 +88,22 @@ public class PayPayeeAisleServiceImpl extends ServiceImpl<PayPayeeAisleMapper, P
     @Override
     public Boolean updateByEditBo(PayPayeeAisleEditBo bo) {
         PayPayeeAisle update = BeanUtil.toBean(bo, PayPayeeAisle.class);
+        LambdaQueryWrapper<PayPayeeAisle> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getPayeeAccount()), PayPayeeAisle::getPayeeAccount, bo.getPayeeAccount());
+        lqw.like(bo.getAccountId()!= null, PayPayeeAisle::getAccountId, bo.getAccountId());
+        List<PayPayeeAisle> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getPayeeAccount()), PayPayeeAisle::getPayeeAccount, bo.getPayeeAccount());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayPayeeAisle::getStatus, status);
+            List<PayPayeeAisle> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复收款方账户名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 30 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayPayeeServiceImpl.java

@@ -2,8 +2,10 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
+import com.zhongzheng.modules.pay.domain.PayNature;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -17,6 +19,7 @@ import com.zhongzheng.modules.pay.mapper.PayPayeeMapper;
 import com.zhongzheng.modules.pay.vo.PayPayeeVo;
 import com.zhongzheng.modules.pay.service.IPayPayeeService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -69,7 +72,17 @@ public class PayPayeeServiceImpl extends ServiceImpl<PayPayeeMapper, PayPayee> i
     @Override
     public Boolean insertByAddBo(PayPayeeAddBo bo) {
         PayPayee add = BeanUtil.toBean(bo, PayPayee.class);
-        validEntityBeforeSave(add);
+        LambdaQueryWrapper<PayPayee> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getPayeeName()), PayPayee::getPayeeName, bo.getPayeeName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayPayee::getStatus, status);
+        List<PayPayee> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复收款方名字");
+        }
+            validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
         return this.save(add);
@@ -78,6 +91,22 @@ public class PayPayeeServiceImpl extends ServiceImpl<PayPayeeMapper, PayPayee> i
     @Override
     public Boolean updateByEditBo(PayPayeeEditBo bo) {
         PayPayee update = BeanUtil.toBean(bo, PayPayee.class);
+        LambdaQueryWrapper<PayPayee> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getPayeeName()), PayPayee::getPayeeName, bo.getPayeeName());
+        lqw.like(bo.getPayeeId()!= null, PayPayee::getPayeeId, bo.getPayeeId());
+        List<PayPayee> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getPayeeName()), PayPayee::getPayeeName, bo.getPayeeName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayPayee::getStatus, status);
+            List<PayPayee> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复收费性质名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayServeServiceImpl.java

@@ -2,8 +2,10 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
+import com.zhongzheng.modules.pay.domain.PayNature;
 import com.zhongzheng.modules.pay.domain.PayPayee;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -18,6 +20,7 @@ import com.zhongzheng.modules.pay.mapper.PayServeMapper;
 import com.zhongzheng.modules.pay.vo.PayServeVo;
 import com.zhongzheng.modules.pay.service.IPayServeService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -70,6 +73,16 @@ public class PayServeServiceImpl extends ServiceImpl<PayServeMapper, PayServe> i
     @Override
     public Boolean insertByAddBo(PayServeAddBo bo) {
         PayServe add = BeanUtil.toBean(bo, PayServe.class);
+        LambdaQueryWrapper<PayServe> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getServeName()), PayServe::getServeName, bo.getServeName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayServe::getStatus, status);
+        List<PayServe> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复服务模式名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -79,6 +92,22 @@ public class PayServeServiceImpl extends ServiceImpl<PayServeMapper, PayServe> i
     @Override
     public Boolean updateByEditBo(PayServeEditBo bo) {
         PayServe update = BeanUtil.toBean(bo, PayServe.class);
+        LambdaQueryWrapper<PayServe> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getServeName()), PayServe::getServeName, bo.getServeName());
+        lqw.like(bo.getServeId()!= null, PayServe::getServeId, bo.getServeId());
+        List<PayServe> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getServeName()), PayServe::getServeName, bo.getServeName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayServe::getStatus, status);
+            List<PayServe> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复服务模式名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 28 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PaySourceServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
 import com.zhongzheng.modules.pay.domain.PayServe;
@@ -18,6 +19,7 @@ import com.zhongzheng.modules.pay.mapper.PaySourceMapper;
 import com.zhongzheng.modules.pay.vo.PaySourceVo;
 import com.zhongzheng.modules.pay.service.IPaySourceService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -70,6 +72,16 @@ public class PaySourceServiceImpl extends ServiceImpl<PaySourceMapper, PaySource
     @Override
     public Boolean insertByAddBo(PaySourceAddBo bo) {
         PaySource add = BeanUtil.toBean(bo, PaySource.class);
+        LambdaQueryWrapper<PaySource> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getSourceName()), PaySource::getSourceName, bo.getSourceName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PaySource::getStatus, status);
+        List<PaySource> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复渠道来源名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -79,6 +91,22 @@ public class PaySourceServiceImpl extends ServiceImpl<PaySourceMapper, PaySource
     @Override
     public Boolean updateByEditBo(PaySourceEditBo bo) {
         PaySource update = BeanUtil.toBean(bo, PaySource.class);
+        LambdaQueryWrapper<PaySource> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getSourceName()), PaySource::getSourceName, bo.getSourceName());
+        lqw.like(bo.getSourceId()!= null, PaySource::getSourceId, bo.getSourceId());
+        List<PaySource> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getSourceName()), PaySource::getSourceName, bo.getSourceName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PaySource::getStatus, status);
+            List<PaySource> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复渠道来源名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PaySupplyServiceImpl.java

@@ -2,7 +2,9 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.modules.pay.domain.PayNature;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -16,6 +18,7 @@ import com.zhongzheng.modules.pay.mapper.PaySupplyMapper;
 import com.zhongzheng.modules.pay.vo.PaySupplyVo;
 import com.zhongzheng.modules.pay.service.IPaySupplyService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -65,6 +68,16 @@ public class PaySupplyServiceImpl extends ServiceImpl<PaySupplyMapper, PaySupply
     @Override
     public Boolean insertByAddBo(PaySupplyAddBo bo) {
         PaySupply add = BeanUtil.toBean(bo, PaySupply.class);
+        LambdaQueryWrapper<PaySupply> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getSupplyName()), PaySupply::getSupplyName, bo.getSupplyName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PaySupply::getStatus, status);
+        List<PaySupply> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复供应方名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -74,6 +87,22 @@ public class PaySupplyServiceImpl extends ServiceImpl<PaySupplyMapper, PaySupply
     @Override
     public Boolean updateByEditBo(PaySupplyEditBo bo) {
         PaySupply update = BeanUtil.toBean(bo, PaySupply.class);
+        LambdaQueryWrapper<PaySupply> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getSupplyName()), PaySupply::getSupplyName, bo.getSupplyName());
+        lqw.like(bo.getSupplyId()!= null, PaySupply::getSupplyId, bo.getSupplyId());
+        List<PaySupply> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getSupplyName()), PaySupply::getSupplyName, bo.getSupplyName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PaySupply::getStatus, status);
+            List<PaySupply> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复供应方名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);

+ 29 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayVisitServiceImpl.java

@@ -2,8 +2,10 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.domain.PayAisle;
+import com.zhongzheng.modules.pay.domain.PaySupply;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -17,6 +19,7 @@ import com.zhongzheng.modules.pay.mapper.PayVisitMapper;
 import com.zhongzheng.modules.pay.vo.PayVisitVo;
 import com.zhongzheng.modules.pay.service.IPayVisitService;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
@@ -69,6 +72,16 @@ public class PayVisitServiceImpl extends ServiceImpl<PayVisitMapper, PayVisit> i
     @Override
     public Boolean insertByAddBo(PayVisitAddBo bo) {
         PayVisit add = BeanUtil.toBean(bo, PayVisit.class);
+        LambdaQueryWrapper<PayVisit> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getVisitName()), PayVisit::getVisitName, bo.getVisitName());
+        List<Integer> status = new ArrayList<>();
+        status.add(1);
+        status.add(0);
+        lqw.in(bo.getStatus() != null, PayVisit::getStatus, status);
+        List<PayVisit> list = this.list(lqw);
+        if (CollectionUtils.isNotEmpty(list)){
+            throw new RuntimeException("重复到访校区名字");
+        }
         validEntityBeforeSave(add);
         add.setCreateTime(DateUtils.getNowTime());
         add.setUpdateTime(DateUtils.getNowTime());
@@ -78,6 +91,22 @@ public class PayVisitServiceImpl extends ServiceImpl<PayVisitMapper, PayVisit> i
     @Override
     public Boolean updateByEditBo(PayVisitEditBo bo) {
         PayVisit update = BeanUtil.toBean(bo, PayVisit.class);
+        LambdaQueryWrapper<PayVisit> lqw = Wrappers.lambdaQuery();
+        lqw.eq(StrUtil.isNotBlank(bo.getVisitName()), PayVisit::getVisitName, bo.getVisitName());
+        lqw.like(bo.getVisitId()!= null, PayVisit::getVisitId, bo.getVisitId());
+        List<PayVisit> list = this.list(lqw);
+        if (CollectionUtils.isEmpty(list)){
+            lqw.clear();
+            lqw.eq(StrUtil.isNotBlank(bo.getVisitName()), PayVisit::getVisitName, bo.getVisitName());
+            List<Integer> status = new ArrayList<>();
+            status.add(1);
+            status.add(0);
+            lqw.in(bo.getStatus() != null, PayVisit::getStatus, status);
+            List<PayVisit> list1 = this.list(lqw);
+            if (CollectionUtils.isNotEmpty(list1)){
+                throw new IllegalArgumentException("重复到访校区名字");
+            }
+        }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         return this.updateById(update);