Commit a24ca913 authored by huyuchen's avatar huyuchen

商险优化修改

parent fce5d068
...@@ -1806,7 +1806,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1806,7 +1806,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准 //查数据:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
detail = success.getDetail(); detail = success.getDetail();
actualMoney = detail.getActualPremium(); actualMoney = detail.getActualPremium();
boolean booleanInvoiceNo = false;
if (StringUtils.isNotBlank(success.getInvoiceNo())){ if (StringUtils.isNotBlank(success.getInvoiceNo())){
if (Common.isEmpty(detail.getInvoiceNo()) || success.getInvoiceNo().equals(detail.getInvoiceNo())) {
booleanInvoiceNo = true;
}
detail.setInvoiceNo(success.getInvoiceNo()); detail.setInvoiceNo(success.getInvoiceNo());
//如果发票号不为空,将替换类型的发票号也全部更新 //如果发票号不为空,将替换类型的发票号也全部更新
list = tInsuranceReplaceService.list(Wrappers.<TInsuranceReplace>query().lambda() list = tInsuranceReplaceService.list(Wrappers.<TInsuranceReplace>query().lambda()
...@@ -1831,7 +1835,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1831,7 +1835,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.ONE_INT); doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.ONE_INT);
} }
} }
boolean booleanPolicyNo = false;
if (StringUtils.isNotBlank(success.getPolicyNo())){ if (StringUtils.isNotBlank(success.getPolicyNo())){
if (Common.isEmpty(detail.getPolicyNo()) || success.getPolicyNo().equals(detail.getPolicyNo())) {
booleanPolicyNo = true;
}
detail.setPolicyNo(success.getPolicyNo()); detail.setPolicyNo(success.getPolicyNo());
//保单号不为空,维护到保单表中 //保单号不为空,维护到保单表中
one = tInsurancePolicyService.getOne(Wrappers.<TInsurancePolicy>query().lambda() one = tInsurancePolicyService.getOne(Wrappers.<TInsurancePolicy>query().lambda()
...@@ -1933,12 +1941,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1933,12 +1941,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
} }
} }
boolean booleanInvoiceNo = StringUtils.isNotBlank(success.getInvoiceNo()) && !success.getInvoiceNo().equals(detail.getInvoiceNo());
boolean booleanPolicyNo = StringUtils.isNotBlank(success.getPolicyNo()) && !success.getPolicyNo().equals(detail.getPolicyNo());
boolean isEquals = Common.isNotNull(detail.getActualPremium()) && Common.isNotNull(success.getActualPremium()) && new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) == 0;
//如果当前保费为空,且保单号或发票号不一样 //如果当前保费为空,且保单号或发票号不一样
if ((StringUtils.isBlank(success.getActualPremium()) || isEquals) && (booleanInvoiceNo || booleanPolicyNo) if ((StringUtils.isBlank(success.getActualPremium()) || (Common.isNotNull(detail.getActualPremium())
&& StringUtils.isNotBlank(detail.getDefaultSettleId())) { && Common.isNotNull(success.getActualPremium()) && new BigDecimal(success.getActualPremium()).compareTo(detail.getActualPremium()) == 0))
&& (booleanInvoiceNo || booleanPolicyNo) && StringUtils.isNotBlank(detail.getDefaultSettleId())) {
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()) { if (Optional.ofNullable(settle).isPresent()) {
//如果当前实缴信息未推送,则新增实缴单推送 //如果当前实缴信息未推送,则新增实缴单推送
......
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