Browse Source

[账单][修改][其他账单欠缴]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
db99e39401
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java

+ 3
- 3
mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java View File

@@ -142,10 +142,10 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {


@Override @Override
public ResultData saveOrUpdate(WxBillOther record, MallUserInfo user) { public ResultData saveOrUpdate(WxBillOther record, MallUserInfo user) {
int receivepay = record.getReceivePay()==null?0:record.getReceivePay().intValue();
int receivepay = record.getRealReceivePay() == null ? 0 : record.getRealReceivePay().intValue();
int pay = record.getPay()==null?0:record.getPay().intValue(); int pay = record.getPay()==null?0:record.getPay().intValue();
if(pay>receivepay){ if(pay>receivepay){
return new ResultData(ErrorCode.BILL_PAY_ERROR,"实收金额不能大于实际应收金额");
return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收金额");
} }
Date date = new Date(); Date date = new Date();
if (record.getId() == null) { if (record.getId() == null) {
@@ -166,7 +166,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService {
record.setCreatetime(date); record.setCreatetime(date);
record.setUpdatetime(date); record.setUpdatetime(date);
record.setExpiredDay(0L); record.setExpiredDay(0L);
record.setOwe(record.getReceivePay()-record.getPay());
record.setOwe(record.getRealReceivePay() - record.getPay());
record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); record.setIsDel(EnumDelStatus.NOT_DEL.getCode());
try { try {
wxBillOtherMapper.insert(record); wxBillOtherMapper.insert(record);


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java View File

@@ -154,7 +154,7 @@ public class WxBillPropertyDepositServiceImpl implements WxBillPropertyDepositSe
Long addpay = wxBillDeposit.getPay(); Long addpay = wxBillDeposit.getPay();
wxBillDeposit.setPay(record.getPay()); wxBillDeposit.setPay(record.getPay());
wxBillDeposit.setReceivePay(record.getReceivePay()); wxBillDeposit.setReceivePay(record.getReceivePay());
wxBillDeposit.setOwe(record.getRealReceivePay() - record.getPay());
wxBillDeposit.setOwe(record.getReceivePay() - record.getPay());
if (record.getPay().equals(record.getReceivePay())) { if (record.getPay().equals(record.getReceivePay())) {
wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode());
Date receiveDate = wxBillDeposit.getReceiveDate(); Date receiveDate = wxBillDeposit.getReceiveDate();


Loading…
Cancel
Save