Commit 357d7b66 authored by huyuchen's avatar huyuchen

社保配置修改

parent 3f0ee748
......@@ -3797,6 +3797,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/
private List<InsuranceInsuredParam> updateInsuranceInsuredCheck(List<InsuranceInsuredParam> paramList, List<TInsuranceAreaRes> insuranceAreaResList){
List<InsuranceInsuredParam> collect = paramList.stream().distinct().collect(Collectors.toList());
TInsuranceDetail detail;
for (InsuranceInsuredParam param : collect) {
param.setFlag(CommonConstants.ONE_STRING);
// 必填校验
......@@ -3880,7 +3881,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, param.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, param.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceCompanyName, param.getInsuranceCompanyName())
......@@ -3903,8 +3904,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){
String insuranceHandleCity = detail.getInsuranceHandleCity().toString();
String insuranceHandleProvince = detail.getInsuranceHandleProvince().toString();
if(insuranceAreaResList.stream().noneMatch(s -> insuranceHandleCity.equals(s.getCity()) && insuranceHandleProvince.equals(s.getProvince()))){
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
continue;
}
......
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