Commit 12b190b0 authored by zhaji's avatar zhaji

"feature-zhaJi:修改变更结算项目的校验逻辑"

parent cb9b91d4
......@@ -436,6 +436,11 @@ public class InsurancesConstants {
*/
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更结算月";
/**
* 商险投保退回,无法变更结算月
*/
public static final String SETTLE_MONTH_CHANGE_BUY_STATUS_FOUR_ERROR = "商险投保退回,无法变更结算月";
/**
* 商险已减员,无法变更结算月
*/
......@@ -493,11 +498,21 @@ public class InsurancesConstants {
*/
public static final String DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR = "商险投保中,无法变更项目";
/**
* 商险投保退回,无法变更项目
*/
public static final String DEPT_NO_CHANGE_BUY_STATUS_FOUR_ERROR = "商险投保退回,无法变更项目";
/**
* 商险已减员,无法变更项目
*/
public static final String DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR = "商险已减员,无法变更项目";
/**
* 商险已减员,无法变更项目
*/
public static final String DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR = "商险减员中,无法变更项目";
/**
* 商险结算中,无法变更项目
*/
......
......@@ -3093,22 +3093,31 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
Integer buyType = insuranceDetail.getBuyType();
//替换类型无法变更结算月
if (CommonConstants.FOUR_INT == buyType){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_IS_EFFECT_ERROR);
errorList.add(param);
continue;
}
Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus();
//商险待投保,无法变更结算月
if (CommonConstants.ONE_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_ONE_ERROR);
errorList.add(param);
continue;
}
//商险投保中,无法变更结算月
if (CommonConstants.TWO_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_TWO_ERROR);
errorList.add(param);
continue;
}
//商险投保退回,无法变更结算月
if (CommonConstants.FOUR_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_BUY_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
//如果结算月份相同
if (settleMonth.equals(insuranceDetail.getSettleMonth())){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_IDENTICAL);
......@@ -3149,6 +3158,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
errorList.add(param);
continue;
}
//减员流程中,无法变更结算月
if(CommonConstants.ONE_INT == insuranceDetail.getReduceHandleStatus()
|| CommonConstants.TWO_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.SETTLE_MONTH_CHANGE_REFUND_STATUS_ONE_ERROR);
......@@ -3307,22 +3317,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
Integer buyHandleStatus = insuranceDetail.getBuyHandleStatus();
//商险待投保,无法变更项目
if (CommonConstants.ONE_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_ONE_ERROR);
errorList.add(param);
continue;
}
//商险投保中,无法变更项目
if (CommonConstants.TWO_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_TWO_ERROR);
errorList.add(param);
continue;
}
//当前保单信息的为已减员时,不能变更结算项目
if( null != insuranceDetail.getBuyHandleStatus() && CommonConstants.FIVE_INT == insuranceDetail.getBuyHandleStatus() ){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR);
//商险投保退回,无法变更项目
if (CommonConstants.FOUR_INT == buyHandleStatus){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_BUY_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
//当前保单信息的为已减员时,不能变更结算项目
if( null != insuranceDetail.getReduceHandleStatus()){
if (CommonConstants.FIVE_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_FOUR_ERROR);
errorList.add(param);
continue;
}
if(CommonConstants.ONE_INT == insuranceDetail.getReduceHandleStatus() || CommonConstants.TWO_INT == insuranceDetail.getReduceHandleStatus()){
param.setErrorMessage(InsurancesConstants.DEPT_NO_CHANGE_REFUND_STATUS_ONE_ERROR);
errorList.add(param);
continue;
}
}
String defaultSettleId = insuranceDetail.getDefaultSettleId();
if (StringUtils.isNotBlank(defaultSettleId)){
//查询结算状态
......
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