fix 会员项目成员导入校验
This commit is contained in:
+3
@@ -228,6 +228,9 @@ public class JeroController<T, S extends IService<T>> {
|
|||||||
try {
|
try {
|
||||||
//导入Excel格式校验,看匹配的字段文本概率
|
//导入Excel格式校验,看匹配的字段文本概率
|
||||||
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), clazz, params);
|
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), clazz, params);
|
||||||
|
if (t == null) {
|
||||||
|
throw new JeroBootException("导入数据为空!");
|
||||||
|
}
|
||||||
if(!t){
|
if(!t){
|
||||||
throw new JeroBootException("导入Excel校验失败 !");
|
throw new JeroBootException("导入Excel校验失败 !");
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -1,5 +1,6 @@
|
|||||||
package com.jero.member.service.impl;
|
package com.jero.member.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.util.ValidUtil;
|
import com.jero.common.util.ValidUtil;
|
||||||
import com.jero.company.entity.PayContactsManagement;
|
import com.jero.company.entity.PayContactsManagement;
|
||||||
@@ -54,6 +55,14 @@ public class PayPayMemberProjectSubitemServiceImpl extends ServiceImpl<PayMember
|
|||||||
if (memberProject == null){
|
if (memberProject == null){
|
||||||
throw new JeroBootException("会员项目不存在");
|
throw new JeroBootException("会员项目不存在");
|
||||||
}
|
}
|
||||||
|
String companyId = payMemberProjectSubitem.getCompanyId();
|
||||||
|
LambdaQueryWrapper<PayMemberProjectSubitem> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(PayMemberProjectSubitem::getProjectId,projectId);
|
||||||
|
wrapper.eq(PayMemberProjectSubitem::getCompanyId,companyId);
|
||||||
|
int count = count(wrapper);
|
||||||
|
if (count>0){
|
||||||
|
throw new JeroBootException("会员单位已经存在");
|
||||||
|
}
|
||||||
validMemberProjectSubitem(payMemberProjectSubitem);
|
validMemberProjectSubitem(payMemberProjectSubitem);
|
||||||
//实收金额
|
//实收金额
|
||||||
payMemberProjectSubitem.setPaidAmount(0);
|
payMemberProjectSubitem.setPaidAmount(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user