Commit ce460b53 authored by 查济's avatar 查济

Merge branch 'feature-1.3-zhaji' into 'feature/insurance-1.3.0'

"feature-zhaJi:优化商险办理地为空时的校验"

See merge request !309
parents 9cca0300 9d3c6c20
...@@ -1279,4 +1279,9 @@ public class InsurancesConstants { ...@@ -1279,4 +1279,9 @@ public class InsurancesConstants {
*/ */
public static final String NO_PERMISSION = "当前登录人无任何商险办理地的操作权限"; public static final String NO_PERMISSION = "当前登录人无任何商险办理地的操作权限";
/**
* 该记录的商险办理地为空
*/
public static final String HANDLE_PROVINCE_IS_NULL = "该记录的商险办理地为空";
} }
...@@ -3466,12 +3466,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3466,12 +3466,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSERT_OR_BATCH_RECORD); param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSERT_OR_BATCH_RECORD);
continue; continue;
}else { }else {
if(null == detail.getInsuranceHandleProvince() || null == detail.getInsuranceHandleCity()){
param.setErrorMessage(InsurancesConstants.HANDLE_PROVINCE_IS_NULL);
continue;
}
//商险办理地权限校验 //商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince())); boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){ if(!b){
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION); param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
continue; continue;
} }
LambdaQueryWrapper<TInsuranceEkp> ekpLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TInsuranceEkp> ekpLambdaQueryWrapper = new LambdaQueryWrapper<>();
ekpLambdaQueryWrapper.eq(TInsuranceEkp :: getDetailId,detail.getId()).eq(TInsuranceEkp ::getResendFlag,CommonConstants.ZERO_INT); ekpLambdaQueryWrapper.eq(TInsuranceEkp :: getDetailId,detail.getId()).eq(TInsuranceEkp ::getResendFlag,CommonConstants.ZERO_INT);
List<TInsuranceEkp> ekpList = tInsuranceEkpService.list(ekpLambdaQueryWrapper); List<TInsuranceEkp> ekpList = tInsuranceEkpService.list(ekpLambdaQueryWrapper);
...@@ -3696,6 +3701,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3696,6 +3701,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSERT_OR_BATCH_RECORD); param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSERT_OR_BATCH_RECORD);
continue; continue;
}else { }else {
if(null == detail.getInsuranceHandleProvince() || null == detail.getInsuranceHandleCity()){
param.setErrorMessage(InsurancesConstants.HANDLE_PROVINCE_IS_NULL);
continue;
}
//商险办理地权限校验 //商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince())); boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){ if(!b){
...@@ -3824,6 +3833,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3824,6 +3833,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSURANCE_RECORD); param.setErrorMessage(InsurancesConstants.NOT_FOUND_INSURANCE_RECORD);
continue; continue;
}else { }else {
if(null == detail.getInsuranceHandleProvince() || null == detail.getInsuranceHandleCity()){
param.setErrorMessage(InsurancesConstants.HANDLE_PROVINCE_IS_NULL);
continue;
}
//商险办理地权限校验 //商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince())); boolean b = insuranceAreaResList.stream().anyMatch(s -> detail.getInsuranceHandleCity().equals(s.getCity()) && detail.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){ if(!b){
...@@ -5816,14 +5829,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -5816,14 +5829,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param); errorList.add(param);
continue; continue;
}else{ }else{
if(null == insuranceRefund.getInsuranceHandleProvince() || null == insuranceRefund.getInsuranceHandleCity()){
param.setErrorMessage(InsurancesConstants.HANDLE_PROVINCE_IS_NULL);
errorList.add(param);
continue;
}
//商险办理地权限校验 //商险办理地权限校验
boolean b = insuranceAreaResList.stream().anyMatch(s -> insuranceRefund.getInsuranceHandleCity().equals(s.getCity()) && insuranceRefund.getInsuranceHandleProvince().equals(s.getProvince())); boolean b = insuranceAreaResList.stream().anyMatch(s -> insuranceRefund.getInsuranceHandleCity().equals(s.getCity()) && insuranceRefund.getInsuranceHandleProvince().equals(s.getProvince()));
if(!b){ if(!b){
param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION); param.setErrorMessage(InsurancesConstants.NO_DETAIL_JURISDICTION);
errorList.add(param);
continue; continue;
}else{ }else{
String refundMoney = param.getRefundMoney(); String refundMoney = param.getRefundMoney();
if(!BigDecimalUtils.isNullOrZero(insuranceRefund.getRefundMoney()) && insuranceRefund.getRefundMoney().compareTo(new BigDecimal(refundMoney)) == CommonConstants.ZERO_INT){ if(!BigDecimalUtils.isNullOrZero(insuranceRefund.getRefundMoney()) && insuranceRefund.getRefundMoney().compareTo(new BigDecimal(refundMoney)) == CommonConstants.ZERO_INT){
errorList.add(param);
continue; 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