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());