From 2a7117bd061d487824eee13ad60e5dcb49e7aed5 Mon Sep 17 00:00:00 2001 From: winter Date: Wed, 7 Aug 2024 19:00:01 +0800 Subject: [PATCH] fix --- .../iformall/service/impl/WxRentContractServiceImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index 381d9ce82..68ccef046 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -1914,19 +1914,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { //自然月,应该是从本月开始到本月结束 if(adjustPeriod.equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ - if(count == 0){ - timeVo.setEndDate(EnumContractReceivePeriodUnit.getAfterCalendarNarDay(timeVo.getStartDate(), receivePeriod, dayType)); - } + timeVo.setEndDate(EnumContractReceivePeriodUnit.getAfterCalendarNarDay(timeVo.getStartDate(), receivePeriod, dayType)); } if (count >= 12) { String a = ""; } //如果是到了每年的截止时间,第一年忽略(是开始时间) + boolean isYearCut = false;//是不是有截断 if (null != yearsEndList && yearsEndList.size() > 0 ) { Date yearEndDateStart = yearsEndList.get(0); + //如果开始时间到了年的截止 if (timeVo.getStartDate().equals(yearEndDateStart)) { yearsEndList.remove(yearEndDateStart); + //TODO 是不是有1天? }else if (timeVo.getStartDate().after(yearEndDateStart)) { //do nothing }else if (timeVo.getStartDate().before(yearEndDateStart)) { @@ -1934,6 +1935,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (timeVo.getEndDate().after(yearEndDateEnd)) { timeVo.setEndDate(yearEndDateEnd); yearsEndList.remove(yearEndDateStart); + isYearCut = true; }else if(timeVo.getEndDate().equals(yearEndDateEnd)) { yearsEndList.remove(yearEndDateStart); }