| | |
| | | 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(); |
| | | } |
| | | |
| | |
| | | // } |
| | | 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() |