|
|
@@ -483,10 +483,12 @@ public class WxRentContractHelper { |
|
|
//不是一个月的。但是按整月算的 |
|
|
//不是一个月的。但是按整月算的 |
|
|
int months = getMonths(sdM.format(start)+"-01",sdM.format(DateUtils.getDaySet(end,Calendar.DATE,1))+"-01"); |
|
|
int months = getMonths(sdM.format(start)+"-01",sdM.format(DateUtils.getDaySet(end,Calendar.DATE,1))+"-01"); |
|
|
for (int i = 0 ; i < months; i++) { |
|
|
for (int i = 0 ; i < months; i++) { |
|
|
|
|
|
//当前时间到当前月底 |
|
|
Date currentMonthEnd = DateUtils.getLastDayForMonth(start); |
|
|
Date currentMonthEnd = DateUtils.getLastDayForMonth(start); |
|
|
NeedPayDTO np = getMonthPay(start, currentMonthEnd, price, decimalSize, validDays, dayPriceCalcute, monthAvageDays); |
|
|
NeedPayDTO np = getMonthPay(start, currentMonthEnd, price, decimalSize, validDays, dayPriceCalcute, monthAvageDays); |
|
|
start = DateUtils.getDaySet(currentMonthEnd,Calendar.DATE,1); |
|
|
start = DateUtils.getDaySet(currentMonthEnd,Calendar.DATE,1); |
|
|
total = total.add(np.getMoney()); |
|
|
total = total.add(np.getMoney()); |
|
|
|
|
|
//TODO 这个月底到下个月 |
|
|
} |
|
|
} |
|
|
return total.toPlainString(); |
|
|
return total.toPlainString(); |
|
|
} |
|
|
} |
|
|
|