|
|
@@ -735,7 +735,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
//按月计租 |
|
|
//按月计租 |
|
|
// if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) |
|
|
// if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) |
|
|
// ||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { |
|
|
// ||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { |
|
|
rentList = buildRentMonth(wxMerchant, userId, wxRentContract, receivePeriod, lease, rentalStartDate, price,isPreview); |
|
|
|
|
|
|
|
|
rentList = buildRentMonth(wxMerchant, userId, wxRentContract, receivePeriod, lease, rentalStartDate, price,isPreview); |
|
|
// } else { |
|
|
// } else { |
|
|
// //如果按日 |
|
|
// //如果按日 |
|
|
// List<Date> yearList = new ArrayList<>(); |
|
|
// List<Date> yearList = new ArrayList<>(); |
|
|
@@ -955,18 +955,25 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ |
|
|
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ |
|
|
if(isFirstDay(billTimeVo.getStartDate())){ |
|
|
if(isFirstDay(billTimeVo.getStartDate())){ |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
|
|
|
months++; |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
}else{ |
|
|
}else{ |
|
|
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue(); |
|
|
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue(); |
|
|
} |
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
|
|
|
if(isFirstDay(billTimeVo.getStartDate())){ |
|
|
|
|
|
months++; |
|
|
|
|
|
} |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
} |
|
|
} |
|
|
}else if(i == billTimeVoList.size()-1){//最后 |
|
|
}else if(i == billTimeVoList.size()-1){//最后 |
|
|
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue(); |
|
|
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue(); |
|
|
}else{//中间 |
|
|
}else{//中间 |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); |
|
|
|
|
|
if(isFirstDay(billTimeVo.getStartDate())){ |
|
|
|
|
|
months++; |
|
|
|
|
|
} |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
needpay = new Double(months * priceD).longValue(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@@ -1806,6 +1813,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
Double total = new Double(0); |
|
|
Double total = new Double(0); |
|
|
int[] diff; |
|
|
int[] diff; |
|
|
|
|
|
|
|
|
|
|
|
if(sd.format(start).equals("2019-07-01")){ |
|
|
|
|
|
System.out.println(); |
|
|
|
|
|
} |
|
|
//同一天 |
|
|
//同一天 |
|
|
if(sd.format(start).equals(sd.format(end))){ |
|
|
if(sd.format(start).equals(sd.format(end))){ |
|
|
int dayCount = DateUtils.getMonthDayCount(start); |
|
|
int dayCount = DateUtils.getMonthDayCount(start); |
|
|
@@ -1987,3 +1997,5 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|