Commit 5b24f59e authored by 李灿灿's avatar 李灿灿

商险校验姓名和身份证号是否正确接口调整

parent de36924a
...@@ -65,11 +65,6 @@ ...@@ -65,11 +65,6 @@
<artifactId>commons-collections</artifactId> <artifactId>commons-collections</artifactId>
<version>3.2.2</version> <version>3.2.2</version>
</dependency> </dependency>
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-check-api</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard; import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.utils.ChecksUtil;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.ProjectSetInfoVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.SetInfoVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
...@@ -18,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R; ...@@ -18,6 +17,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil; import com.yifu.cloud.plus.v1.yifu.common.core.util.RedisUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.CheckDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*; import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
...@@ -35,8 +35,6 @@ import org.springframework.stereotype.Service; ...@@ -35,8 +35,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.NotBlank;
import java.sql.Array;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
...@@ -69,6 +67,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -69,6 +67,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private TInsuranceSettleService tInsuranceSettleService; private TInsuranceSettleService tInsuranceSettleService;
@Resource @Resource
private TInsuranceOperateService tInsuranceOperateService; private TInsuranceOperateService tInsuranceOperateService;
@Resource
private CheckDaprUtil checkDaprUtil;
/***********************商险办理********************************/ /***********************商险办理********************************/
...@@ -713,11 +713,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -713,11 +713,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard(); TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){ if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); TCheckIdCard data = tCheckIdCardR.getData();
listResult.add(param); if (CommonConstants.ONE_INT != data.getIsTrue()){
continue; param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
} }
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
...@@ -962,11 +965,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -962,11 +965,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard(); TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getEmpName()); checkIdCard.setName(param.getEmpName());
checkIdCard.setIdCard(param.getEmpIdcardNo()); checkIdCard.setIdCard(param.getEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){ if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT); TCheckIdCard data = tCheckIdCardR.getData();
listResult.add(param); if (CommonConstants.ONE_INT != data.getIsTrue()){
continue; param.setErrorMessage(InsurancesConstants.EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
} }
//根据项目编码查询项目是否存在 //根据项目编码查询项目是否存在
...@@ -1200,12 +1206,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1200,12 +1206,16 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TCheckIdCard checkIdCard = new TCheckIdCard(); TCheckIdCard checkIdCard = new TCheckIdCard();
checkIdCard.setName(param.getReplaceEmpName()); checkIdCard.setName(param.getReplaceEmpName());
checkIdCard.setIdCard(param.getReplaceEmpIdcardNo()); checkIdCard.setIdCard(param.getReplaceEmpIdcardNo());
ChecksUtil.checkIdCard(checkIdCard,true); R<TCheckIdCard> tCheckIdCardR = checkDaprUtil.checkIdCardSingle(checkIdCard);
if (CommonConstants.ONE_INT != checkIdCard.getIsTrue()){ if (null != tCheckIdCardR && tCheckIdCardR.getCode() == CommonConstants.SUCCESS){
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT); TCheckIdCard data = tCheckIdCardR.getData();
listResult.add(param); if (CommonConstants.ONE_INT != data.getIsTrue()){
continue; param.setErrorMessage(InsurancesConstants.REPLACE_EMP_ID_CARD_NO_NOT_FIT);
listResult.add(param);
continue;
}
} }
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){ if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR); param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
listResult.add(param); listResult.add(param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment