@Test public void testShowAccountingDataForWithNull() { accountingDataController.showAccountingDataFor("2010-05-10", "2010-05-10"); }
@RequestMapping("renderAccountingData.ftl") public final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate, @RequestParam(value = TO_DATE) String paramToDate) { DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd"); LocalDate fromDate = fmt.parseDateTime(paramFromDate).toLocalDate(); LocalDate toDate = fmt.parseDateTime(paramToDate).toLocalDate(); Boolean hasAlreadyRanQuery = Boolean.FALSE; String fileName = null; List<AccountingDto> accountingData = new ArrayList<AccountingDto>(); try { fileName = accountingService.getExportOutputFileName(fromDate, toDate).replace(".xml", ""); hasAlreadyRanQuery = accountingService.hasAlreadyRanQuery(fromDate, toDate); accountingData = accountingService.getExportDetails(fromDate, toDate); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } ModelAndView mav = new ModelAndView("renderAccountingData"); List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder() .withLink("accounting.viewaccountingexports", "renderAccountingDataCacheInfo.ftl") .withLink(fileName, "").build(); mav.addObject("breadcrumbs", breadcrumbs); mav.addObject("accountingData", accountingData); mav.addObject("hasAlreadyRanQuery", hasAlreadyRanQuery); mav.addObject("fileName", fileName); mav.addObject("fromDate", fromDate); mav.addObject("toDate", toDate); return mav; }
AccountingDataController { @RequestMapping("renderAccountingData.ftl") public final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate, @RequestParam(value = TO_DATE) String paramToDate) { DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd"); LocalDate fromDate = fmt.parseDateTime(paramFromDate).toLocalDate(); LocalDate toDate = fmt.parseDateTime(paramToDate).toLocalDate(); Boolean hasAlreadyRanQuery = Boolean.FALSE; String fileName = null; List<AccountingDto> accountingData = new ArrayList<AccountingDto>(); try { fileName = accountingService.getExportOutputFileName(fromDate, toDate).replace(".xml", ""); hasAlreadyRanQuery = accountingService.hasAlreadyRanQuery(fromDate, toDate); accountingData = accountingService.getExportDetails(fromDate, toDate); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } ModelAndView mav = new ModelAndView("renderAccountingData"); List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder() .withLink("accounting.viewaccountingexports", "renderAccountingDataCacheInfo.ftl") .withLink(fileName, "").build(); mav.addObject("breadcrumbs", breadcrumbs); mav.addObject("accountingData", accountingData); mav.addObject("hasAlreadyRanQuery", hasAlreadyRanQuery); mav.addObject("fileName", fileName); mav.addObject("fromDate", fromDate); mav.addObject("toDate", toDate); return mav; } }
AccountingDataController { @RequestMapping("renderAccountingData.ftl") public final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate, @RequestParam(value = TO_DATE) String paramToDate) { DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd"); LocalDate fromDate = fmt.parseDateTime(paramFromDate).toLocalDate(); LocalDate toDate = fmt.parseDateTime(paramToDate).toLocalDate(); Boolean hasAlreadyRanQuery = Boolean.FALSE; String fileName = null; List<AccountingDto> accountingData = new ArrayList<AccountingDto>(); try { fileName = accountingService.getExportOutputFileName(fromDate, toDate).replace(".xml", ""); hasAlreadyRanQuery = accountingService.hasAlreadyRanQuery(fromDate, toDate); accountingData = accountingService.getExportDetails(fromDate, toDate); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } ModelAndView mav = new ModelAndView("renderAccountingData"); List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder() .withLink("accounting.viewaccountingexports", "renderAccountingDataCacheInfo.ftl") .withLink(fileName, "").build(); mav.addObject("breadcrumbs", breadcrumbs); mav.addObject("accountingData", accountingData); mav.addObject("hasAlreadyRanQuery", hasAlreadyRanQuery); mav.addObject("fileName", fileName); mav.addObject("fromDate", fromDate); mav.addObject("toDate", toDate); return mav; } @Autowired  AccountingDataController(AccountingService accountingService); }
AccountingDataController { @RequestMapping("renderAccountingData.ftl") public final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate, @RequestParam(value = TO_DATE) String paramToDate) { DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd"); LocalDate fromDate = fmt.parseDateTime(paramFromDate).toLocalDate(); LocalDate toDate = fmt.parseDateTime(paramToDate).toLocalDate(); Boolean hasAlreadyRanQuery = Boolean.FALSE; String fileName = null; List<AccountingDto> accountingData = new ArrayList<AccountingDto>(); try { fileName = accountingService.getExportOutputFileName(fromDate, toDate).replace(".xml", ""); hasAlreadyRanQuery = accountingService.hasAlreadyRanQuery(fromDate, toDate); accountingData = accountingService.getExportDetails(fromDate, toDate); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } ModelAndView mav = new ModelAndView("renderAccountingData"); List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder() .withLink("accounting.viewaccountingexports", "renderAccountingDataCacheInfo.ftl") .withLink(fileName, "").build(); mav.addObject("breadcrumbs", breadcrumbs); mav.addObject("accountingData", accountingData); mav.addObject("hasAlreadyRanQuery", hasAlreadyRanQuery); mav.addObject("fileName", fileName); mav.addObject("fromDate", fromDate); mav.addObject("toDate", toDate); return mav; } @Autowired  AccountingDataController(AccountingService accountingService); @RequestMapping("renderAccountingData.ftl") final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate,
            @RequestParam(value = TO_DATE) String paramToDate); @RequestMapping("confirmExportsDelete.ftl") final ModelAndView confirmExportsDelete(); @RequestMapping("deleteCacheDir.ftl") final ModelAndView deleteCacheDir(); @RequestMapping("generateExportsList.ftl") final ModelAndView generateList(@RequestParam(value = LIST_START_DAY) Integer listStartDay, @RequestParam(value = "type") String type); @RequestMapping("renderAccountingDataCacheInfo.ftl") final ModelAndView listAllExports(); }
AccountingDataController { @RequestMapping("renderAccountingData.ftl") public final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate, @RequestParam(value = TO_DATE) String paramToDate) { DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd"); LocalDate fromDate = fmt.parseDateTime(paramFromDate).toLocalDate(); LocalDate toDate = fmt.parseDateTime(paramToDate).toLocalDate(); Boolean hasAlreadyRanQuery = Boolean.FALSE; String fileName = null; List<AccountingDto> accountingData = new ArrayList<AccountingDto>(); try { fileName = accountingService.getExportOutputFileName(fromDate, toDate).replace(".xml", ""); hasAlreadyRanQuery = accountingService.hasAlreadyRanQuery(fromDate, toDate); accountingData = accountingService.getExportDetails(fromDate, toDate); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } ModelAndView mav = new ModelAndView("renderAccountingData"); List<BreadCrumbsLinks> breadcrumbs = new AdminBreadcrumbBuilder() .withLink("accounting.viewaccountingexports", "renderAccountingDataCacheInfo.ftl") .withLink(fileName, "").build(); mav.addObject("breadcrumbs", breadcrumbs); mav.addObject("accountingData", accountingData); mav.addObject("hasAlreadyRanQuery", hasAlreadyRanQuery); mav.addObject("fileName", fileName); mav.addObject("fromDate", fromDate); mav.addObject("toDate", toDate); return mav; } @Autowired  AccountingDataController(AccountingService accountingService); @RequestMapping("renderAccountingData.ftl") final ModelAndView showAccountingDataFor(@RequestParam(value = FROM_DATE) String paramFromDate,
            @RequestParam(value = TO_DATE) String paramToDate); @RequestMapping("confirmExportsDelete.ftl") final ModelAndView confirmExportsDelete(); @RequestMapping("deleteCacheDir.ftl") final ModelAndView deleteCacheDir(); @RequestMapping("generateExportsList.ftl") final ModelAndView generateList(@RequestParam(value = LIST_START_DAY) Integer listStartDay, @RequestParam(value = "type") String type); @RequestMapping("renderAccountingDataCacheInfo.ftl") final ModelAndView listAllExports();  }