Commit 298b0029 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'develop'

Feature licancan

See merge request fangxinjiang/yifu!57
parents a07eea68 22ffc8e8
......@@ -74,9 +74,14 @@ public class LocalDateUtil {
* @return {@link LocalDate}
*/
public static LocalDate parseLocalDate(String strDate){
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(NORM_DATE_PATTERN, Locale.CHINA);
LocalDate localDate = LocalDate.parse(strDate, dateTimeFormatter);
return localDate;
try {
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(NORM_DATE_PATTERN, Locale.CHINA);
LocalDate localDate = LocalDate.parse(strDate, dateTimeFormatter);
return localDate;
}catch (Exception e){
e.printStackTrace();
return null;
}
}
/**
......
......@@ -24,7 +24,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.TInsuranceDetailMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.service.*;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BigDecimalUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.LocalDateUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.util.ValidityUtil;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
......@@ -696,6 +695,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail.setIsEffect(CommonConstants.ZERO_INT);
detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT);
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
......@@ -728,6 +728,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail.setIsEffect(CommonConstants.ZERO_INT);
detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT);
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
......@@ -758,6 +759,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//记录的有效状态,置为「有效」
detail.setIsEffect(CommonConstants.ZERO_INT);
detail.setIsOverdue(CommonConstants.ZERO_INT);
detail.setIsUse(CommonConstants.ZERO_INT);
successList.add(detail);
}
}
......@@ -1632,21 +1634,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 已出险 不能替换
if (detail.getBuyHandleStatus() == CommonConstants.THREE_INT
&& detail.getIsUse() == CommonConstants.ONE_INT){
&& detail.getIsUse() != null && detail.getIsUse() == CommonConstants.ONE_INT){
param.setErrorMessage(InsurancesConstants.USE_REPLACE_IS_NOT_ALLOW);
listResult.add(param);
continue;
}
// 投保状态 已投保 已失效 不能替换
if (detail.getBuyHandleStatus() == CommonConstants.THREE_INT
&& detail.getIsEffect() == CommonConstants.ONE_INT){
&& detail.getIsEffect() != null && detail.getIsEffect() == CommonConstants.ONE_INT){
param.setErrorMessage(InsurancesConstants.EFFECT_REPLACE_IS_NOT_ALLOW);
listResult.add(param);
continue;
}
// 投保状态 已投保 已过期 不能替换
if (detail.getBuyHandleStatus() == CommonConstants.THREE_INT
&& detail.getIsOverdue() == CommonConstants.ONE_INT){
&& detail.getIsOverdue() != null && detail.getIsOverdue() == CommonConstants.ONE_INT){
param.setErrorMessage(InsurancesConstants.OVERDUE_REPLACE_IS_NOT_ALLOW);
listResult.add(param);
continue;
......@@ -1659,8 +1661,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
// 投保状态 已投保 减员状态 待减员/减员中 不能替换
if (detail.getBuyHandleStatus() == CommonConstants.THREE_INT
&& (detail.getReduceHandleStatus() == CommonConstants.ONE_INT
|| detail.getReduceHandleStatus() == CommonConstants.TWO_INT)){
&& (detail.getReduceHandleStatus() != null && (detail.getReduceHandleStatus() == CommonConstants.ONE_INT
|| detail.getReduceHandleStatus() == CommonConstants.TWO_INT))){
param.setErrorMessage(InsurancesConstants.REDUCE_REPLACE_IS_NOT_ALLOW);
listResult.add(param);
continue;
......@@ -1813,7 +1815,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
if(!BigDecimalUtils.isBigDecimal(param.getActualPremium())){
if(!ValidityUtil.validateMoney(param.getActualPremium())){
param.setErrorMessage(InsurancesConstants.ACTUAL_PREMIUM_PARSE_ERROR);
listResult.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