Commit 12b190b0 authored by zhaji's avatar zhaji

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

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