| @@ -1710,7 +1710,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| @Override | |||
| public Map<String, Object> getOweBillAsPage(WxBillAll record, Integer pageNum, Integer pageSize) { | |||
| WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId()); | |||
| //WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(record.getTenantId()); | |||
| PageInfo<Map<String, Object>> pageInfo = PageHelper.startPage(pageNum, pageSize).doSelectPageInfo(() -> wxBillAllMapper.getOweBillAsPage(record)); | |||
| List<Map<String, Object>> list = pageInfo.getList(); | |||
| for (Map<String, Object> map : list) { | |||
| @@ -1722,7 +1722,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| //加上手续费 | |||
| //todo:把手续费率传进sql,在sql中算,汇总到max,直接出结果 | |||
| map.put("totalReceivePay", subZeroAndDot(map.get("totalOwe").toString())); | |||
| //map.put("totalReceivePay", subZeroAndDot(map.get("totalOwe").toString())); | |||
| } | |||
| pageInfo.setList(list); | |||
| @@ -146,10 +146,10 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| @Override | |||
| public ResultData saveOrUpdate(WxBillDaily 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(); | |||
| 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) { | |||
| @@ -170,7 +170,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.setExpiredDay(0L); | |||
| record.setOwe(record.getReceivePay()-record.getPay()); | |||
| record.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| wxBillDailyMapper.insert(record); | |||
| @@ -197,7 +197,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { | |||
| wxBillDaily.setPay(record.getPay()); | |||
| wxBillDaily.setReceivePay(record.getReceivePay()); | |||
| wxBillDaily.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| wxBillDaily.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillDaily.getReceiveDate(); | |||
| @@ -126,10 +126,10 @@ public class WxBillDepositServiceImpl implements WxBillDepositService { | |||
| @Override | |||
| public ResultData saveOrUpdate(WxBillDeposit 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(); | |||
| 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.getReceivePay()-record.getPay()); | |||
| record.setOwe(record.getRealReceivePay() - 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.getReceivePay()-record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| wxBillDeposit.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| wxBillDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date receiveDate = wxBillDeposit.getReceiveDate(); | |||
| wxBillDeposit.setExpiredDay(0L); | |||
| @@ -141,10 +141,10 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| @Override | |||
| public ResultData saveOrUpdate(WxBillOtherDeposit 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(); | |||
| 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) { | |||
| @@ -167,7 +167,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.setExpiredDay(0L); | |||
| record.setOwe(record.getReceivePay() - record.getPay()); | |||
| record.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| wxBillOtherDepositMapper.insert(record); | |||
| @@ -193,7 +193,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| wxBillOtherDeposit.setPay(record.getPay()); | |||
| wxBillOtherDeposit.setReceivePay(record.getReceivePay()); | |||
| wxBillOtherDeposit.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| wxBillOtherDeposit.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOtherDeposit.getReceiveDate(); | |||
| @@ -193,7 +193,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| wxBillOther.setPay(record.getPay()); | |||
| wxBillOther.setReceivePay(record.getReceivePay()); | |||
| wxBillOther.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| wxBillOther.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillOther.getReceiveDate(); | |||
| @@ -142,10 +142,10 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| @Override | |||
| public ResultData saveOrUpdate(WxBillProperty record, MallUserInfo user) { | |||
| int receivepay = record.getReceivePay() == null ? 0 : record.getReceivePay().intValue(); | |||
| int receivepay = record.getRealReceivePay() == null ? 0 : record.getReceivePay().intValue(); | |||
| int pay = record.getPay() == null ? 0 : record.getPay().intValue(); | |||
| if (pay > receivepay) { | |||
| return new ResultData(ErrorCode.BILL_PAY_ERROR, "实收金额不能大于实际应收金额"); | |||
| return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | |||
| } | |||
| Date date = new Date(); | |||
| if (record.getId() == null) { | |||
| @@ -154,7 +154,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| record.setId(idWorker.nextId()); | |||
| record.setCreatetime(date); | |||
| record.setUpdatetime(date); | |||
| record.setOwe(record.getReceivePay() - record.getPay()); | |||
| record.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| try { | |||
| wxBillPropertyMapper.insert(record); | |||
| @@ -185,7 +185,7 @@ public class WxBillPropertyServiceImpl implements WxBillPropertyService { | |||
| property.setPay(record.getPay()); | |||
| property.setReceivePay(record.getReceivePay()); | |||
| property.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| property.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = property.getReceiveDate(); | |||
| @@ -144,10 +144,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| @Override | |||
| public ResultData saveOrUpdate(WxBillRent 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(); | |||
| if(pay>receivepay){ | |||
| return new ResultData(ErrorCode.BILL_PAY_ERROR,"实收金额不能大于实际应收金额"); | |||
| return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | |||
| } | |||
| Date date = new Date(); | |||
| if (record.getId() == null) { | |||
| @@ -186,7 +186,7 @@ public class WxBillRentServiceImpl implements WxBillRentService { | |||
| wxBillRent.setPay(record.getPay()); | |||
| wxBillRent.setReceivePay(record.getReceivePay()); | |||
| wxBillRent.setOwe(record.getRealReceivePay() - record.getPay()); | |||
| if (record.getPay().equals(record.getReceivePay())) { | |||
| if (record.getPay().equals(record.getRealReceivePay())) { | |||
| wxBillRent.setStatus(EnumBillRentStatus.PAID.getCode()); | |||
| Date payDate = record.getPayDate(); | |||
| Date receiveDate = wxBillRent.getReceiveDate(); | |||