jiangping
2024-06-20 bcbb6db1ccebf91b1a4472ab7fc2408182d02f46
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -1038,13 +1038,15 @@
        }
        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)){
@@ -1177,6 +1179,10 @@
        ) {
            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(),"未查询到保险方案");