|  |  | 
 |  |  | import com.doumee.dao.business.dto.*; | 
 |  |  | import com.doumee.dao.business.join.*; | 
 |  |  | import com.doumee.dao.business.model.*; | 
 |  |  | import com.doumee.dao.business.vo.ChangeDealTypeVO; | 
 |  |  | import com.doumee.dao.business.vo.CountCyclePriceVO; | 
 |  |  | import com.doumee.dao.system.model.SystemUser; | 
 |  |  | import com.doumee.service.business.ApplyChangeService; | 
 |  |  | 
 |  |  |                             .set(ApplyDetail::getEndTime, delValidTime) | 
 |  |  |                             .set(ApplyDetail::getEditor, update.getEditor()) | 
 |  |  |                             .set(ApplyDetail::getEditDate, update.getEditDate()) | 
 |  |  |  | 
 |  |  |                             .eq(ApplyDetail::getId, oldModel.getId()) | 
 |  |  |                     ); | 
 |  |  |                     totalFee = totalFee.add(updateFee).subtract(oldModel.getFee()); | 
 |  |  | 
 |  |  |                             .set( ApplyChagneDetail::getEndTime, delValidTime) | 
 |  |  |                             .eq(ApplyChagneDetail::getId,detail.getId()) | 
 |  |  |                     ); | 
 |  |  |  | 
 |  |  | //                if(1==1){ | 
 |  |  | //                    throw new BusinessException(ResponseStatus.SERVER_ERROR); | 
 |  |  | //                } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |  | 
 |  |  |             member.setApplyId(update.getApplyId()); | 
 |  |  | 
 |  |  |             applyChagneDetail.setApplyDetailId(applyDetail.getId()); | 
 |  |  |             applyChagneDetail.setStartTime(applyDetail.getStartTime()); | 
 |  |  |             applyChagneDetail.setEndTime(endTime); | 
 |  |  |             applyChagneDetail.setReduceMoney(BigDecimal.ZERO); | 
 |  |  |  | 
 |  |  |             member.setApplyId(insuranceApply.getId()); | 
 |  |  |             member.setDuId(applyChagneDetail.getDuId()); | 
 |  |  | 
 |  |  |             //查询减保日期 | 
 |  |  | //            Integer delDays = DateUtil.daysBetweenDates(applyDetail.getEndTime(),endTime); | 
 |  |  | //            ; | 
 |  |  |  | 
 |  |  |             //查询周期数量 | 
 |  |  |             applyChagneDetail.setFee( | 
 |  |  |                     Constants.reduceFee(solutions, | 
 |  |  | 
 |  |  |                                     applyDetail.getStartTime(),endTime) | 
 |  |  |                             .subtract(applyDetail.getFee() | 
 |  |  |             )); | 
 |  |  |             //如果是减保业务为仅替换 且 方案的扣费周期和总周期相等 则处理减保费用 | 
 |  |  |             if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE) | 
 |  |  |              && Constants.equalsInteger(solutions.getTimeUnit(),solutions.getInsureCycleUnit())){ | 
 |  |  |                 applyChagneDetail.setReduceMoney(solutions.getPrice().multiply(new BigDecimal(-1))); | 
 |  |  |             } | 
 |  |  |             applyChagneDetailJoinMapper.insert(applyChagneDetail); | 
 |  |  |         } | 
 |  |  |     } |