Commit 9d3c6c20 authored by zhaji's avatar zhaji

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

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