| @@ -781,6 +781,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| return resultList; | return resultList; | ||||
| } | } | ||||
| public boolean isFirstDay(Date date){ | |||||
| int dateInt = Integer.parseInt(new SimpleDateFormat("d").format(date)); | |||||
| if(dateInt == 1){ | |||||
| return true; | |||||
| } | |||||
| return false; | |||||
| } | |||||
| public Map<String, Object> buildRent(int lease, int receivePeriod, int price, Date startdate, int dayType, WxRentContract wxRentContract, Long userId, WxMerchant wxMerchant, int billcount, Integer isPreview, Map<String, Object> shopInfo) { | public Map<String, Object> buildRent(int lease, int receivePeriod, int price, Date startdate, int dayType, WxRentContract wxRentContract, Long userId, WxMerchant wxMerchant, int billcount, Integer isPreview, Map<String, Object> shopInfo) { | ||||
| String shopInfoStr = null; | String shopInfoStr = null; | ||||
| if (shopInfo != null) { | if (shopInfo != null) { | ||||
| @@ -794,7 +802,9 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| int index = paycount - 1; | int index = paycount - 1; | ||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| //自然月 n+1 | //自然月 n+1 | ||||
| if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ | |||||
| if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode()) | |||||
| && !isFirstDay(wxRentContract.getRentalStartDate()) | |||||
| ){ | |||||
| paycount ++; | paycount ++; | ||||
| } | } | ||||
| for (int i = 0; i < paycount; i++) { | for (int i = 0; i < paycount; i++) { | ||||