Commit 58567da6 authored by huyuchen's avatar huyuchen

商险优化修改

parent 9084986c
...@@ -317,9 +317,9 @@ public class InsurancesConstants { ...@@ -317,9 +317,9 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间"; public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/** /**
* 保单起止时间不能超过365天 * 保单起止时间不能超过一年
*/ */
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天"; public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过一年";
/** /**
* 保单结束时间不能为空 * 保单结束时间不能为空
*/ */
......
...@@ -2540,7 +2540,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2540,7 +2540,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){ if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT) {
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365); param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param); listResult.add(param);
continue; continue;
...@@ -3265,7 +3265,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3265,7 +3265,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param); listResult.add(param);
continue; continue;
} }
if (LocalDateUtil.betweenDay(param.getPolicyStart(),param.getPolicyEnd()) > CommonConstants.ONE_YEAR){ //日期比较
if (DateUtil.getDateStr(DateUtil.stringToDate(param.getPolicyStart()),1).compareTo(param.getPolicyEnd().replaceAll("-","")) < CommonConstants.ZERO_INT){
param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365); param.setErrorMessage(InsurancesConstants.POLICY_DATE_NOT_MORE_THAN_365);
listResult.add(param); listResult.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