Commit 19df76dd authored by 李灿灿's avatar 李灿灿

商险替换校验接口调试

parent 6fbabba4
...@@ -320,10 +320,30 @@ public class InsurancesConstants { ...@@ -320,10 +320,30 @@ public class InsurancesConstants {
* 商险投保中,无法登记保单保费 * 商险投保中,无法登记保单保费
*/ */
public static final String BUY_HANDLE_TWO_NOT_REGISTERED = "商险投保中,无法登记保单保费"; public static final String BUY_HANDLE_TWO_NOT_REGISTERED = "商险投保中,无法登记保单保费";
/**
* 商险投保退回,无法登记保单保费
*/
public static final String BUY_HANDLE_FOUR_NOT_REGISTERED = "商险投保退回,无法登记保单保费";
/**
* 商险结算中,无法登记保单保费
*/
public static final String SETTLE_HANDLE_TWO_NOT_REGISTERED = "商险结算中,无法登记保单保费";
/**
* 商险已结算,无法登记保单保费
*/
public static final String SETTLE_HANDLE_THREE_NOT_REGISTERED = "商险已结算,无法登记保单保费";
/** /**
* 保单号不存在或已过期 * 保单号不存在或已过期
*/ */
public static final String POLICY_NO_EXIST = "保单号不存在或已过期"; public static final String POLICY_NO_EXIST = "保单号不存在或已过期";
/**
* 保单号不存
*/
public static final String POLICY_NO_NOT_EXIST = "保单号不存";
/**
* 保单号信息错误
*/
public static final String POLICY_NO_ERROR = "保单号信息错误";
/** /**
* 保险公司错误 * 保险公司错误
*/ */
......
...@@ -33,7 +33,7 @@ public class TInsuranceSettle implements Serializable { ...@@ -33,7 +33,7 @@ public class TInsuranceSettle implements Serializable {
private String insDetailId; private String insDetailId;
/** /**
* 结算状态 * 结算状态 1、待结算,2、结算中,3、已结算
*/ */
@Schema(description = "结算状态 1、待结算,2、结算中,3、已结算") @Schema(description = "结算状态 1、待结算,2、结算中,3、已结算")
private String settleHandleStatus; private String settleHandleStatus;
......
...@@ -1735,6 +1735,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1735,6 +1735,46 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
//批增类型,保单号不存在
if (detail.getBuyType() == CommonConstants.THREE_INT){
TInsuranceDetail batchPolicyNo = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getPolicyNo, param.getPolicyNo())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (!Optional.ofNullable(batchPolicyNo).isPresent()){
param.setErrorMessage(InsurancesConstants.POLICY_NO_NOT_EXIST);
listResult.add(param);
continue;
}else {
//批增类型,保单号已存在但是和派单时填写的不一致
if (!detail.getPolicyNo().equals(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.POLICY_NO_ERROR);
listResult.add(param);
continue;
}
}
}
//新增类型,保单号已存在但是和填写的保险公司不一致
if (detail.getBuyType() == CommonConstants.ONE_INT){
TInsuranceDetail addPolicyNo = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getPolicyNo, param.getPolicyNo())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(addPolicyNo).isPresent()){
if (!addPolicyNo.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())){
param.setErrorMessage(InsurancesConstants.POLICY_NO_COMPANY_NAME_NOT_SAME);
listResult.add(param);
continue;
}
if (!addPolicyNo.getInsuranceTypeName().equals(param.getInsuranceTypeName())){
param.setErrorMessage(InsurancesConstants.POLICY_NO_TYPE_NAME_NOT_SAME);
listResult.add(param);
continue;
}
}
}
} }
if (detail.getBuyType() == CommonConstants.FOUR_INT){ if (detail.getBuyType() == CommonConstants.FOUR_INT){
param.setErrorMessage(InsurancesConstants.BUY_TYPE_FOUR_NOT_REGISTERED); param.setErrorMessage(InsurancesConstants.BUY_TYPE_FOUR_NOT_REGISTERED);
...@@ -1751,6 +1791,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1751,6 +1791,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (detail.getBuyHandleStatus() == CommonConstants.FOUR_INT){
param.setErrorMessage(InsurancesConstants.BUY_HANDLE_FOUR_NOT_REGISTERED);
listResult.add(param);
continue;
}
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){
if (CommonConstants.TWO_STRING.equals(settle.getSettleHandleStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_TWO_NOT_REGISTERED);
listResult.add(param);
continue;
}
if (CommonConstants.THREE_STRING.equals(settle.getSettleHandleStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED);
listResult.add(param);
continue;
}
}
}
} }
listSuccess.add(param); listSuccess.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