|
|
|
@@ -237,6 +237,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
bill.setPay(0L); |
|
|
|
bill.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
bill.setShopId(record.getShopId()); |
|
|
|
bill.setExpiredDay(0L); |
|
|
|
setExpiredDay(bill,Calendar.MONTH,record.getReceivePeriod()); |
|
|
|
if (bill.getReceivePay().equals(0L)) { |
|
|
|
bill.setStatus(EnumBillRentStatus.PAID.getCode()); |
|
|
|
@@ -727,10 +728,13 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
|
|
|
|
public void setExpiredDay(WxBillProperty wxBillProperty,int dayType, int receivePeriod){ |
|
|
|
Date date = new Date(); |
|
|
|
wxBillProperty.setExpiredDay(0L); |
|
|
|
if (wxBillProperty.getReceiveDate().before(date)) { |
|
|
|
long day = (wxBillProperty.getReceiveDate().getTime() - date.getTime()) / (24 * 60 * 60 * 1000); |
|
|
|
long day = (date.getTime() - wxBillProperty.getReceiveDate().getTime()) / (24 * 60 * 60 * 1000); |
|
|
|
wxBillProperty.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); |
|
|
|
wxBillProperty.setExpiredDay(day); |
|
|
|
if (day > 0) { |
|
|
|
wxBillProperty.setExpiredDay(day); |
|
|
|
} |
|
|
|
} else {//截止收租日在当前时间之后 |
|
|
|
Calendar now = Calendar.getInstance(); |
|
|
|
now.add(dayType, receivePeriod); |
|
|
|
@@ -738,10 +742,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
//当前日期加上周期后小于截止收租日就是没有到期,否则当前待缴 |
|
|
|
if (currenttime.before(wxBillProperty.getReceiveDate())) { |
|
|
|
wxBillProperty.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode()); |
|
|
|
wxBillProperty.setExpiredDay(0L); |
|
|
|
} else { |
|
|
|
wxBillProperty.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
wxBillProperty.setExpiredDay(0L); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|