jiangping
2024-06-26 2b773dd14058d4eeacb38b0813edecc86170fd0c
server/service/src/main/java/com/doumee/service/business/impl/ApplyChangeServiceImpl.java
@@ -966,11 +966,6 @@
        Constants.ApplyLogType applyLogType = Constants.ApplyLogType.CA_COMPANY_COMMIT;
        ApplyLog log = new ApplyLog(applyChange,applyLogType.getName(),"",applyChange.getId(),applyLogType.getKey(), null, null);
        applyLogMapper.insert(log);
//        if(1==1){
//            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "存在进行中的加减保/换厂申请");
//        }
        return applyChange.getId();
    }
@@ -2325,10 +2320,15 @@
//        }
        BigDecimal sumPrice = Objects.isNull(insuranceApply.getServerCost())?solutions.getPrice():solutions.getPrice().add(insuranceApply.getServerCost());
        CountCyclePriceVO returnCountCyclePriceVO = new CountCyclePriceVO();
        Date addStartTime = DateUtil.afterDateByType(applyChangeCyclePriceDTO.getValidTime(),0,solutions.getAddValidDays());
        if(addStartTime.getTime()<insuranceApply.getStartTime().getTime()){
            returnCountCyclePriceVO.setCyclePrice(solutions.getPrice());
        }else{
        returnCountCyclePriceVO.setCyclePrice(Constants.addFee(solutions,
                sumPrice
                ,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),
                DateUtil.afterDateByType(applyChangeCyclePriceDTO.getValidTime(),0,solutions.getAddValidDays()),insuranceApply.getEndTime()));
                    ,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime(),addStartTime
                    ,insuranceApply.getEndTime()));
        }
        BigDecimal reducePrice =  solutions.getPrice().subtract(Constants.reduceFee(solutions,
                        sumPrice
                        ,insuranceApply.getStartTime(),insuranceApply.getFinalEndTime()