Просмотр исходного кода

[合同][修改][生成账单-过期时间]

release_toaliyun_real
gongbiao 6 лет назад
Родитель
Сommit
42b5e0dbdf
2 измененных файлов: 11 добавлений и 8 удалений
  1. +6
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  2. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 6
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -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);
}
}
}


+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -1170,10 +1170,13 @@ public class WxRentContractServiceImpl implements WxRentContractService {
public void setExpiredDay(WxBillRent wxBillRent,int dayType, int receivePeriod){
//截止收租日在当前时间之前
Date date = new Date();
wxBillRent.setExpiredDay(0L);
if (wxBillRent.getReceiveDate().before(date)) {
long day = (wxBillRent.getReceiveDate().getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
long day = (date.getTime() - wxBillRent.getReceiveDate().getTime()) / (24 * 60 * 60 * 1000);
wxBillRent.setStatus(EnumBillRentStatus.NOT_PAID.getCode());
wxBillRent.setExpiredDay(day);
if (day > 0) {
wxBillRent.setExpiredDay(day);
}
} else {//截止收租日在当前时间之后
Calendar now = Calendar.getInstance();
now.add(dayType, receivePeriod);
@@ -1181,10 +1184,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//当前日期加上周期后小于截止收租日就是没有到期,否则当前待缴
if (currenttime.before(wxBillRent.getReceiveDate())) {
wxBillRent.setStatus(EnumBillRentStatus.NOT_EXPIRED.getCode());
wxBillRent.setExpiredDay(0L);
} else {
wxBillRent.setStatus(EnumBillRentStatus.WAIT_PAY.getCode());
wxBillRent.setExpiredDay(0L);
}
}
}


Загрузка…
Отмена
Сохранить