|
|
|
@@ -1050,7 +1050,12 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
} |
|
|
|
daily.setReceivePay(receivePay); |
|
|
|
daily.setPay(daily.getPay() + pay); |
|
|
|
daily.setOwe(daily.getOwe() - pay); |
|
|
|
daily.setPay(daily.getPay() + pay); |
|
|
|
daily.setOwe(0L); |
|
|
|
long owe = daily.getReceivePay() - daily.getPay(); |
|
|
|
if (owe > 0) { |
|
|
|
daily.setOwe(owe); |
|
|
|
} |
|
|
|
daily.setPayDate(bill.getPayDate()); |
|
|
|
daily.setReceiveDate(bill.getReceiveDate()); |
|
|
|
wxBillDailyMapper.updateByPrimaryKey(daily); |
|
|
|
@@ -1079,7 +1084,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
daily.setCreatetime(date); |
|
|
|
daily.setUpdatetime(date); |
|
|
|
daily.setExpiredDay(0L); |
|
|
|
daily.setOwe(0L); |
|
|
|
daily.setOwe(receivePay - pay); |
|
|
|
daily.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
daily.setStarttime(bill.getStarttime()); |
|
|
|
daily.setEndtime(bill.getEndtime()); |
|
|
|
@@ -1088,12 +1093,12 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
} else { |
|
|
|
Date payDate = daily.getPayDate(); |
|
|
|
Date receiveDate = daily.getReceiveDate(); |
|
|
|
if (payDate.before(receiveDate)) { |
|
|
|
daily.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
} else { |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
if (expiredDay > 0) { |
|
|
|
daily.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
daily.setExpiredDay((long) expiredDay); |
|
|
|
} else { |
|
|
|
daily.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
wxBillDailyMapper.insertSelective(daily); |
|
|
|
@@ -1125,7 +1130,11 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
other.setName(bill.getBillAttr()); |
|
|
|
other.setComments(bill.getBillAttr()); |
|
|
|
other.setPay(other.getPay() + pay); |
|
|
|
other.setOwe(other.getOwe() - pay); |
|
|
|
other.setOwe(0L); |
|
|
|
long owe = other.getReceivePay() - other.getPay(); |
|
|
|
if (owe > 0) { |
|
|
|
other.setOwe(owe); |
|
|
|
} |
|
|
|
other.setPayDate(bill.getPayDate()); |
|
|
|
other.setReceiveDate(bill.getReceiveDate()); |
|
|
|
wxBillOtherMapper.updateByPrimaryKey(other); |
|
|
|
@@ -1155,7 +1164,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
other.setCreatetime(date); |
|
|
|
other.setUpdatetime(date); |
|
|
|
other.setExpiredDay(0L); |
|
|
|
other.setOwe(0L); |
|
|
|
other.setOwe(receivePay - pay); |
|
|
|
other.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
other.setStarttime(bill.getStarttime()); |
|
|
|
other.setEndtime(bill.getEndtime()); |
|
|
|
@@ -1164,12 +1173,12 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
} else { |
|
|
|
Date payDate = other.getPayDate(); |
|
|
|
Date receiveDate = other.getReceiveDate(); |
|
|
|
if (payDate.before(receiveDate)) { |
|
|
|
other.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
} else { |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
if (expiredDay > 0) { |
|
|
|
other.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
other.setExpiredDay((long) expiredDay); |
|
|
|
} else { |
|
|
|
other.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
wxBillOtherMapper.insertSelective(other); |
|
|
|
@@ -1199,7 +1208,11 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
} |
|
|
|
otherDeposit.setReceivePay(receivePay); |
|
|
|
otherDeposit.setPay(otherDeposit.getPay() + pay); |
|
|
|
otherDeposit.setOwe(otherDeposit.getOwe() - pay); |
|
|
|
otherDeposit.setOwe(0L); |
|
|
|
long owe = otherDeposit.getReceivePay() - otherDeposit.getPay(); |
|
|
|
if (owe > 0) { |
|
|
|
otherDeposit.setOwe(owe); |
|
|
|
} |
|
|
|
otherDeposit.setPayDate(bill.getPayDate()); |
|
|
|
otherDeposit.setReceiveDate(bill.getReceiveDate()); |
|
|
|
wxBillOtherDepositMapper.updateByPrimaryKey(otherDeposit); |
|
|
|
@@ -1239,11 +1252,9 @@ public class WxBillAllServiceImpl implements WxBillAllService { |
|
|
|
} else { |
|
|
|
Date payDate = otherDeposit.getPayDate(); |
|
|
|
Date receiveDate = otherDeposit.getReceiveDate(); |
|
|
|
if (payDate.before(receiveDate)) { |
|
|
|
otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
} else { |
|
|
|
otherDeposit.setStatus(EnumBillRentStatus.NOT_PAID.getCode()); |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
int expiredDay = DateUtils.daysBetween(receiveDate, payDate); |
|
|
|
otherDeposit.setStatus(EnumBillRentStatus.WAIT_PAY.getCode()); |
|
|
|
if (expiredDay > 0) { |
|
|
|
otherDeposit.setExpiredDay((long) expiredDay); |
|
|
|
} |
|
|
|
} |
|
|
|
|