| | |
| | | } |
| | | if (!(Constants.equalsInteger(insuranceApply.getStatus(), Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey()) |
| | | ||Constants.equalsInteger(insuranceApply.getStatus(), Constants.InsuranceApplyStatus.WTB_DONE.getKey()) |
| | | ) |
| | | ) { |
| | | )) { |
| | | throw new BusinessException(ResponseStatus.DATA_ERRO.getCode(), "保单状态错误"); |
| | | } |
| | | if (DateUtil.compareDate(insuranceApply.getEndTime(),new Date()) >= Constants.ZERO |
| | | ) { |
| | | if (DateUtil.compareDate(insuranceApply.getEndTime(),new Date()) >= Constants.ZERO ) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "保单已过保,无法进行该操作"); |
| | | } |
| | | if (DateUtil.compareDate(applyChange.getValidTime(),insuranceApply.getStartTime()) >= Constants.ZERO) { |
| | | //如果保单尚未生效,设置期望生效日期为保单生效开始时间 |
| | | applyChange.setValidTime(insuranceApply.getStartTime()); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | |
| | | ) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "保单已过保,无法进行该操作"); |
| | | } |
| | | if (DateUtil.compareDate(applyChange.getValidTime(),insuranceApply.getStartTime()) >= Constants.ZERO) { |
| | | //如果保单尚未生效,设置期望生效日期为保单生效开始时间 |
| | | applyChange.setValidTime(insuranceApply.getStartTime()); |
| | | } |
| | | Solutions solutions = solutionsMapper.selectById(insuranceApply.getSolutionId()); |
| | | if(Objects.isNull(solutions)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到保险方案"); |