|
|
|
@@ -2367,8 +2367,11 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
}
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
Date startDate = DateUtils.stringToDate("2024-08-01 00:00:00", DateUtils.DATE_TIME_PATTERN);
|
|
|
|
Date endDate = DateUtils.stringToDate("2024-09-11 23:59:59", DateUtils.DATE_TIME_PATTERN);
|
|
|
|
Date startDate = DateUtils.stringToDate("2023-12-20 00:00:00", DateUtils.DATE_TIME_PATTERN);
|
|
|
|
Date endDate = DateUtils.stringToDate("2024-12-19 00:00:00", DateUtils.DATE_TIME_PATTERN);
|
|
|
|
int days = DateUtils.daysBetween(startDate, endDate)+1;
|
|
|
|
System.out.println(days);
|
|
|
|
|
|
|
|
Date realEndStart = DateUtils.getDaySet(endDate, Calendar.SECOND, 1);
|
|
|
|
int[] diffs = DateUtils.getDiff(startDate, realEndStart);
|
|
|
|
Date preextraStartDay = DateUtils.getTimeAfterMonths(diffs[0], startDate);
|
|
|
|
@@ -2885,7 +2888,8 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
|
|
|
|
//销售收入不满足一年怎么算。
|
|
|
|
int yearDays = DateUtils.daysBetween(rentcontract.getYearsBegin(), rentcontract.getYearsEnd())+1;
|
|
|
|
if (yearDays == 365) {
|
|
|
|
//闰年是366
|
|
|
|
if (yearDays >= 365) {
|
|
|
|
}else {
|
|
|
|
if (rentcontract.getDayPriceCalcute().intValue() == EnumRentDayPriceCalcute.AVERAGE_DAYS.getCode()) {
|
|
|
|
jumpRevenuePay = jumpRevenuePay.multiply(new BigDecimal(yearDays)).divide(new BigDecimal(12*rentcontract.getMonthAverageDays()),rentcontract.getDecimalSize(),BigDecimal.ROUND_HALF_UP);
|
|
|
|
|