From 33081fe557fdc195877300d64b582794231bf934 Mon Sep 17 00:00:00 2001 From: luozukai Date: Thu, 12 Sep 2019 19:20:10 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9=E7=BB=93=E7=AE=97=E5=8D=95]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxBillSettleServiceImpl.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java index 2abf98bc6..46f5b1792 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java @@ -169,6 +169,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillRent dbBill = wxBillRentMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getOwe() == null) dbBill.setOwe(0l); wxBillRent.setPay(dbBill.getPay()+ dbBill.getOwe()); wxBillRent.setPayDate(new Date()); addBillAction(bill.getBillId(), dbBill.getOwe()); @@ -186,6 +188,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillDeposit dbBill = wxBillDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay() ); //押金是ReceivePay wxBillRent.setPayDate(new Date()); wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -204,6 +208,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); wxBillOtherDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); wxBillOtherDeposit.setPayDate(new Date()); wxBillOtherDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -222,6 +228,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); propertyDeposit.setPay(dbBill.getPay()+ dbBill.getReceivePay()); propertyDeposit.setPayDate(new Date()); propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -241,6 +249,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillProperty dbBill = wxBillPropertyMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getOwe() == null) dbBill.setOwe(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); wxBillRent.setPayDate(new Date()); addBillAction(bill.getBillId(), dbBill.getOwe()); @@ -258,6 +268,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillPropertyDeposit dbBill = wxBillPropertyDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); propertyDeposit.setPay(dbBill.getPay()+dbBill.getReceivePay()); propertyDeposit.setPayDate(new Date()); propertyDeposit.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -276,6 +288,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getOwe() == null) dbBill.setOwe(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); wxBillRent.setPayDate(new Date()); addBillAction(bill.getBillId(), dbBill.getOwe()); @@ -293,6 +307,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -319,6 +335,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOtherDeposit dbBill = wxBillOtherDepositMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getReceivePay() == null) dbBill.setReceivePay(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getReceivePay()); wxBillRent.setPayDate(new Date()); wxBillRent.setStatus(EnumBillRentStatus.RETURN.getCode()); @@ -337,6 +355,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillDaily dbBill = wxBillDailyMapper.selectByPrimaryKey(wxBillDaily.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getOwe() == null) dbBill.setOwe(0l); wxBillDaily.setPay(dbBill.getPay()+dbBill.getOwe()); wxBillDaily.setPayDate(new Date()); addBillAction(bill.getBillId(), dbBill.getOwe()); @@ -354,6 +374,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { if(EnumBillRentStatus.PAID.getCode().equals(status)){ WxBillOther dbBill = wxBillOtherMapper.selectByPrimaryKey(wxBillRent.getId()); if(dbBill!=null) { + if(dbBill.getPay() == null) dbBill.setPay(0l); + if(dbBill.getOwe() == null) dbBill.setOwe(0l); wxBillRent.setPay(dbBill.getPay()+dbBill.getOwe()); wxBillRent.setPayDate(new Date()); addBillAction(bill.getBillId(), dbBill.getOwe());