| | |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryDeadlineFee(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlineFeeCount(reportFeeMonthStatisticsDto); |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | if (count > 0) { |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlineFee(reportFeeMonthStatisticsDto); |
| | | |
| | | freshReportOweDay(reportFeeMonthStatisticsDtos); |
| | | } else { |
| | | reportFeeMonthStatisticsDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reportFeeMonthStatisticsDto.getRow()), count, reportFeeMonthStatisticsDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryPrePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryPrePaymentCount(reportFeeMonthStatisticsDto); |
| | | |
| | | ResultVo resultVo = new ResultVo(reportFeeMonthStatisticsDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryDeadlinePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryDeadlinePaymentCount(reportFeeMonthStatisticsDto); |
| | | |
| | | ResultVo resultVo = new ResultVo(reportFeeMonthStatisticsDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | @Override |
| | | public ResponseEntity<String> queryOwePaymentCount(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) { |
| | | |
| | | List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null; |
| | | |
| | | reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryOwePaymentCount(reportFeeMonthStatisticsDto); |
| | | |
| | | ResultVo resultVo = new ResultVo(reportFeeMonthStatisticsDtos); |
| | | |
| | |
| | | } |
| | | |
| | | try { |
| | | tmpReportFeeMonthStatisticsDto.setOweDay(DateUtil.daysBetween(DateUtil.getCurrentDate(), DateUtil.getDateFromString(tmpReportFeeMonthStatisticsDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A))); |
| | | tmpReportFeeMonthStatisticsDto.setOweDay(DateUtil.daysBetween(DateUtil.getDateFromString(tmpReportFeeMonthStatisticsDto.getEndTime(), DateUtil.DATE_FORMATE_STRING_A), DateUtil.getCurrentDate())); |
| | | } catch (ParseException e) { |
| | | logger.error("费用结束时间错误" + tmpReportFeeMonthStatisticsDto.getEndTime(), e); |
| | | } |
| | |
| | | |
| | | private void freshReportOweDay(List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos) { |
| | | |
| | | Date monthFirstDate = DateUtil.getNextMonthFirstDate(); |
| | | Date nowDate = DateUtil.getCurrentDate(); |
| | | |
| | | for (ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto : reportFeeMonthStatisticsDtos) { |
| | | try { |
| | | int day = DateUtil.daysBetween(monthFirstDate, DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getFeeCreateTime(), |
| | | DateUtil.DATE_FORMATE_STRING_A)); |
| | | int day = DateUtil.daysBetween(DateUtil.getDateFromString(reportFeeMonthStatisticsDto.getDeadlineTime(), |
| | | DateUtil.DATE_FORMATE_STRING_A), nowDate); |
| | | reportFeeMonthStatisticsDto.setOweDay(day); |
| | | } catch (Exception e) { |
| | | logger.error("计算欠费天数失败", e); |