Commit 17c990fc authored by huyuchen's avatar huyuchen

商险登记保单保费针对ekp明细结算状态校验

parent e8cf9ff3
......@@ -3857,20 +3857,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_FOUR_NOT_REGISTERED);
continue;
}
//保单号是否更新
boolean booleanPolicyNo = StringUtils.isNotBlank(param.getPolicyNo()) && !param.getPolicyNo().equals(detail.getPolicyNo());
//发票号是否更新
boolean booleanInvoiceNo = StringUtils.isNotBlank(param.getInvoiceNo()) && !param.getInvoiceNo().equals(detail.getInvoiceNo());
//保费是否更新
boolean booleanActualPremium = true;
if (Common.isNotNull(detail.getActualPremium())) {
booleanActualPremium = StringUtils.isNotBlank(param.getActualPremium()) && detail.getActualPremium().compareTo(new BigDecimal(param.getActualPremium())) != 0;
}
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){
status = getSettleStatusFromEkpInsuranceDetail(detail.getId(), detail.getDefaultSettleId());
if(null != status && (booleanActualPremium || booleanPolicyNo || booleanInvoiceNo)){
if(null != status){
//保费更新或者保单号发票号更新
if (InsurancesConstants.SETTLE_TWO.equals(status)) {
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED);
......
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