Browse Source

[商铺租金账单][修改][押金判断]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
0003e780df
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java

+ 5
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java View File

@@ -126,10 +126,10 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {

@Override
public ResultData saveOrUpdate(WxBillDeposit record, MallUserInfo user) {
int receivepay = record.getRealReceivePay() == null ? 0 : record.getRealReceivePay().intValue();
int receivepay = record.getReceivePay() == null ? 0 : record.getReceivePay().intValue();
int pay = record.getPay()==null?0:record.getPay().intValue();
if(pay>receivepay){
return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收金额");
return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收金额");
}
Date date = new Date();
if (record.getId() == null) {
@@ -138,7 +138,7 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
record.setId(idWorker.nextId());
record.setCreatetime(date);
record.setUpdatetime(date);
record.setOwe(record.getRealReceivePay() - record.getPay());
record.setOwe(record.getReceivePay() - record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try {
wxBillDepositMapper.insert(record);
@@ -156,8 +156,8 @@ public class WxBillDepositServiceImpl implements WxBillDepositService {
Long addpay = wxBillDeposit.getPay();
wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getRealReceivePay() - record.getPay());
if (record.getPay().equals(record.getRealReceivePay())) {
wxBillDeposit.setOwe(record.getReceivePay() - record.getPay());
if (record.getPay().equals(record.getReceivePay())) {
wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
Date receiveDate = wxBillDeposit.getReceiveDate();
wxBillDeposit.setExpiredDay(0L);


Loading…
Cancel
Save