| | |
| | | throw new ServiceException("实付金额不能高于于流水可抵扣剩余金额"); |
| | | } |
| | | //如果实付金额大于欠费金额 |
| | | if (dto.getAmount().compareTo(bill.getOutstandingMoney())>=0){ |
| | | if (dto.getAmount().compareTo(bill.getOutstandingMoney())>0){ |
| | | throw new ServiceException("实付金额不能高于该账单欠费金额"); |
| | | } |
| | | |
| | |
| | | throw new ServiceException("实付金额不能高于于流水可抵扣剩余金额"); |
| | | } |
| | | //如果实付金额大于欠费金额 |
| | | if (dto.getAmount().compareTo(bill.getOutstandingMoney())>=0){ |
| | | if (dto.getAmount().compareTo(bill.getOutstandingMoney())>0){ |
| | | throw new ServiceException("实付金额不能高于该账单欠费金额"); |
| | | } |
| | | } |
| | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public BillStatisticsDto statistics() { |
| | | BillStatisticsDto dto = new BillStatisticsDto(); |
| | | dto.setRent(getBaseMapper().statisticsAllRent()); |
| | | dto.setNopay(getBaseMapper().statisticsNoPay()); |
| | | dto.setPayed(getBaseMapper().statisticsPayed()); |
| | | dto.setOverdue(getBaseMapper().statisticsOverdue()); |
| | | return dto; |
| | | } |
| | | |
| | | |
| | | } |