Commit 5843ddff authored by 李灿灿's avatar 李灿灿

20221107 登记保单保费增加“购买标准”信息校验

parent d6f1a4b8
...@@ -277,6 +277,10 @@ public class InsurancesConstants { ...@@ -277,6 +277,10 @@ public class InsurancesConstants {
* 购买标准不存在 * 购买标准不存在
*/ */
public static final String BUY_STANDARD_NOT_EXIST = "购买标准不存在"; public static final String BUY_STANDARD_NOT_EXIST = "购买标准不存在";
/**
* 购买标准格式错误
*/
public static final String BUY_STANDARD_PARSE_ERROR = "购买标准格式错误";
/** /**
* 商险购买地省名称不能为空 * 商险购买地省名称不能为空
*/ */
......
...@@ -50,6 +50,12 @@ public class InsuranceRegisterParam implements Serializable { ...@@ -50,6 +50,12 @@ public class InsuranceRegisterParam implements Serializable {
@Schema(description = "保单结束时间") @Schema(description = "保单结束时间")
private String policyEnd; private String policyEnd;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/** /**
* 保单编号 * 保单编号
*/ */
......
...@@ -2877,6 +2877,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2877,6 +2877,22 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (StringUtils.isBlank(param.getBuyStandard())){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EXIST);
listResult.add(param);
continue;
}else {
if (!ValidityUtil.validateMoney(param.getBuyStandard())){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_PARSE_ERROR);
listResult.add(param);
continue;
}
if (!ValidityUtil.validateMoneyMax(param.getBuyStandard())){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_STANDARD_MAX_ERROR);
listResult.add(param);
continue;
}
}
if (StringUtils.isNotBlank(param.getPolicyNo())){ if (StringUtils.isNotBlank(param.getPolicyNo())){
if (!ValidityUtil.validate50(param.getPolicyNo())){ if (!ValidityUtil.validate50(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.POLICY_NO_MORE_THAN_50); param.setErrorMessage(InsurancesConstants.POLICY_NO_MORE_THAN_50);
...@@ -2898,7 +2914,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2898,7 +2914,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
} }
//查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 //查数据是否存在:姓名 + 身份证号 + 保险公司 + 险种名称 + 保单开始时间 + 保单结束时间 + 购买标准
TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda() TInsuranceDetail detail = this.baseMapper.selectOne(Wrappers.<TInsuranceDetail>query().lambda()
.eq(TInsuranceDetail::getEmpName, param.getEmpName()) .eq(TInsuranceDetail::getEmpName, param.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo, param.getEmpIdcardNo()) .eq(TInsuranceDetail::getEmpIdcardNo, param.getEmpIdcardNo())
...@@ -2906,6 +2922,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2906,6 +2922,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
.eq(TInsuranceDetail::getInsuranceTypeName, param.getInsuranceTypeName()) .eq(TInsuranceDetail::getInsuranceTypeName, param.getInsuranceTypeName())
.eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart())) .eq(TInsuranceDetail::getPolicyStart, LocalDateUtil.parseLocalDate(param.getPolicyStart()))
.eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd())) .eq(TInsuranceDetail::getPolicyEnd, LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.eq(TInsuranceDetail::getBuyStandard,param.getBuyStandard())
.eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TInsuranceDetail::getDeleteFlag, CommonConstants.ZERO_INT)
.orderByDesc(TInsuranceDetail::getUpdateTime) .orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL) .last(CommonConstants.LAST_ONE_SQL)
......
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