|
|
|
@@ -951,7 +951,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
} |
|
|
|
|
|
|
|
if(i == 0){//第一期 |
|
|
|
needpay = new Double(receivePeriod * priceD).longValue(); |
|
|
|
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ |
|
|
|
if(isFirstDay(billTimeVo.getStartDate())){ |
|
|
|
needpay = new Double(receivePeriod * priceD).longValue(); |
|
|
|
}else{ |
|
|
|
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue(); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
needpay = new Double(receivePeriod * priceD).longValue(); |
|
|
|
} |
|
|
|
}else if(i == billTimeVoList.size()-1){//最后 |
|
|
|
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue(); |
|
|
|
}else{//中间 |
|
|
|
@@ -1800,6 +1808,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
int dayCount = DateUtils.getMonthDayCount(start); |
|
|
|
total += (diff[1]+1) * (price/dayCount); |
|
|
|
|
|
|
|
//同月 |
|
|
|
if(sdM.format(start).equals(sdM.format(end))){ |
|
|
|
return total; |
|
|
|
} |
|
|
|
|
|
|
|
//中间月份 |
|
|
|
Date newStartDate = DateUtils.getDaySet(lastMonthDay,Calendar.DATE,1); |
|
|
|
int months = getMonths(sdM.format(newStartDate)+"-01",sdM.format(end)+"-01"); |
|
|
|
|