| Line 1396... |
Line 1396... |
| 1396 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(fofoDetails.getFofoId());
|
1396 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(fofoDetails.getFofoId());
|
| 1397 |
List<FocoSaleReportModel> focoSaleReportList = fofoOrderRepository.selectFocoSaleReport(fofoDetails.getFofoId(),
|
1397 |
List<FocoSaleReportModel> focoSaleReportList = fofoOrderRepository.selectFocoSaleReport(fofoDetails.getFofoId(),
|
| 1398 |
fs.getCode(), startDate.atStartOfDay(), endDate.atStartOfDay());
|
1398 |
fs.getCode(), startDate.atStartOfDay(), endDate.atStartOfDay());
|
| 1399 |
LOGGER.info("focoSaleReportList {}", focoSaleReportList);
|
1399 |
LOGGER.info("focoSaleReportList {}", focoSaleReportList);
|
| 1400 |
|
1400 |
|
| 1401 |
model.addAttribute("startDate", currentDate.minusDays(30).toLocalDate());
|
1401 |
model.addAttribute("startDate",startDate);
|
| 1402 |
model.addAttribute("endDate", LocalDate.now());
|
1402 |
model.addAttribute("endDate", LocalDate.now());
|
| 1403 |
model.addAttribute("focoSaleReportList", focoSaleReportList);
|
1403 |
model.addAttribute("focoSaleReportList", focoSaleReportList);
|
| 1404 |
return "foco-sale-report";
|
1404 |
return "foco-sale-report";
|
| 1405 |
}
|
1405 |
}
|
| 1406 |
|
1406 |
|
| Line 1479... |
Line 1479... |
| 1479 |
ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, "Wallet Statement Report");
|
1479 |
ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, "Wallet Statement Report");
|
| 1480 |
|
1480 |
|
| 1481 |
return responseEntity;
|
1481 |
return responseEntity;
|
| 1482 |
|
1482 |
|
| 1483 |
}
|
1483 |
}
|
| - |
|
1484 |
@RequestMapping(value = "/walletSummaryFetchReportByDate", method = RequestMethod.GET)
|
| - |
|
1485 |
public String getwalletSummaryFetchReport(HttpServletRequest request,
|
| - |
|
1486 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| - |
|
1487 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
| - |
|
1488 |
throws Exception {
|
| - |
|
1489 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
1490 |
|
| - |
|
1491 |
List<List<?>> rows = new ArrayList<>();
|
| - |
|
1492 |
|
| - |
|
1493 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| - |
|
1494 |
List<WalletSummaryReportModel> walletSummaryReports = fofoOrderRepository
|
| - |
|
1495 |
.selectWalletSummaryReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| - |
|
1496 |
LOGGER.info("walletSummaryReports {}", walletSummaryReports);
|
| - |
|
1497 |
|
| - |
|
1498 |
model.addAttribute("startDate",startDate);
|
| - |
|
1499 |
model.addAttribute("endDate", LocalDate.now());
|
| - |
|
1500 |
model.addAttribute("walletSummaryReports", walletSummaryReports);
|
| - |
|
1501 |
|
| - |
|
1502 |
return "wallet-summary-report";
|
| - |
|
1503 |
}
|
| 1484 |
|
1504 |
|
| 1485 |
@RequestMapping(value = "/walletSummaryReport", method = RequestMethod.GET)
|
1505 |
@RequestMapping(value = "/walletSummaryReport", method = RequestMethod.GET)
|
| 1486 |
public String getWalletSummaryReport(HttpServletRequest request, Model model) throws Exception {
|
1506 |
public String getWalletSummaryReport(HttpServletRequest request, Model model) throws Exception {
|
| 1487 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1507 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 1488 |
|
1508 |
|
| Line 1515... |
Line 1535... |
| 1515 |
model.addAttribute("endDate", LocalDate.now());
|
1535 |
model.addAttribute("endDate", LocalDate.now());
|
| 1516 |
model.addAttribute("pendingIndentReports", pendingIndentReports);
|
1536 |
model.addAttribute("pendingIndentReports", pendingIndentReports);
|
| 1517 |
|
1537 |
|
| 1518 |
return "pending-indent-report";
|
1538 |
return "pending-indent-report";
|
| 1519 |
}
|
1539 |
}
|
| - |
|
1540 |
@RequestMapping(value = "/pendingIndentFetchReportByDate", method = RequestMethod.GET)
|
| - |
|
1541 |
public String getpendingIndentFetchReport(HttpServletRequest request,
|
| - |
|
1542 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| - |
|
1543 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
| - |
|
1544 |
throws Exception {
|
| - |
|
1545 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
1546 |
|
| - |
|
1547 |
List<List<?>> rows = new ArrayList<>();
|
| - |
|
1548 |
|
| - |
|
1549 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| - |
|
1550 |
List<PendingIndentReportModel> pendingIndentReports = fofoOrderRepository
|
| - |
|
1551 |
.selectPendingIndentReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| - |
|
1552 |
LOGGER.info("pendingIndentReports {}", pendingIndentReports);
|
| - |
|
1553 |
|
| - |
|
1554 |
model.addAttribute("startDate",startDate);
|
| - |
|
1555 |
model.addAttribute("endDate", LocalDate.now());
|
| - |
|
1556 |
model.addAttribute("pendingIndentReports", pendingIndentReports);
|
| - |
|
1557 |
|
| - |
|
1558 |
return "pending-indent-report";
|
| - |
|
1559 |
}
|
| - |
|
1560 |
|
| 1520 |
|
1561 |
|
| 1521 |
@RequestMapping(value = "/pendingIndentReportDownload", method = RequestMethod.GET)
|
1562 |
@RequestMapping(value = "/pendingIndentReportDownload", method = RequestMethod.GET)
|
| 1522 |
public ResponseEntity<?> getPendingIndentReportDownload(HttpServletRequest request, Model model) throws Exception {
|
1563 |
public ResponseEntity<?> getPendingIndentReportDownload(HttpServletRequest request,
|
| - |
|
1564 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| - |
|
1565 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
| - |
|
1566 |
throws Exception{
|
| 1523 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1567 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 1524 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1568 |
/*LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1525 |
LocalDateTime currentStartMonth = currentDate.minusMonths(2).toLocalDate().atStartOfDay();
|
1569 |
LocalDateTime currentStartMonth = currentDate.minusMonths(2).toLocalDate().atStartOfDay();*/
|
| 1526 |
List<List<?>> rows = new ArrayList<>();
|
1570 |
List<List<?>> rows = new ArrayList<>();
|
| 1527 |
List<PendingIndentReportModel> pendingIndentReports = fofoOrderRepository
|
1571 |
List<PendingIndentReportModel> pendingIndentReports = fofoOrderRepository
|
| 1528 |
.selectPendingIndentReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1572 |
.selectPendingIndentReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| 1529 |
LOGGER.info("pendingIndentReports {}", pendingIndentReports);
|
1573 |
LOGGER.info("pendingIndentReports {}", pendingIndentReports);
|
| 1530 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
1574 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| 1531 |
|
1575 |
|
| 1532 |
for (PendingIndentReportModel pir : pendingIndentReports) {
|
1576 |
for (PendingIndentReportModel pir : pendingIndentReports) {
|
| 1533 |
|
1577 |
|
| Line 1579... |
Line 1623... |
| 1579 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1623 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1580 |
List<SchemePayoutReportModel> schemePayoutReports = fofoOrderRepository
|
1624 |
List<SchemePayoutReportModel> schemePayoutReports = fofoOrderRepository
|
| 1581 |
.selectSchemePayoutReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
1625 |
.selectSchemePayoutReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| 1582 |
LOGGER.info("schemePayoutReports {}", schemePayoutReports);
|
1626 |
LOGGER.info("schemePayoutReports {}", schemePayoutReports);
|
| 1583 |
|
1627 |
|
| 1584 |
model.addAttribute("startDate", currentDate.minusMonths(3).toLocalDate());
|
1628 |
model.addAttribute("startDate",startDate);
|
| 1585 |
model.addAttribute("endDate", LocalDate.now());
|
1629 |
model.addAttribute("endDate", LocalDate.now());
|
| 1586 |
model.addAttribute("schemePayoutReports", schemePayoutReports);
|
1630 |
model.addAttribute("schemePayoutReports", schemePayoutReports);
|
| 1587 |
|
1631 |
|
| 1588 |
return "scheme-payout-report";
|
1632 |
return "scheme-payout-report";
|
| 1589 |
}
|
1633 |
}
|
| Line 1617... |
Line 1661... |
| 1617 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1661 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1618 |
List<OfferPayoutDumpReportModel> offerPayoutDumpReports = fofoOrderRepository
|
1662 |
List<OfferPayoutDumpReportModel> offerPayoutDumpReports = fofoOrderRepository
|
| 1619 |
.selectOfferPayoutDumpReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
1663 |
.selectOfferPayoutDumpReport(fofoDetails.getFofoId(), startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| 1620 |
LOGGER.info("offerPayoutDumpReports {}", offerPayoutDumpReports);
|
1664 |
LOGGER.info("offerPayoutDumpReports {}", offerPayoutDumpReports);
|
| 1621 |
|
1665 |
|
| 1622 |
model.addAttribute("startDate", currentDate.minusMonths(3).toLocalDate());
|
1666 |
model.addAttribute("startDate",startDate);
|
| 1623 |
model.addAttribute("endDate", LocalDate.now());
|
1667 |
model.addAttribute("endDate", LocalDate.now());
|
| 1624 |
model.addAttribute("offerPayoutDumpReports", offerPayoutDumpReports);
|
1668 |
model.addAttribute("offerPayoutDumpReports", offerPayoutDumpReports);
|
| 1625 |
|
1669 |
|
| 1626 |
|
1670 |
|
| 1627 |
return "offer-payout-dump-report";
|
1671 |
return "offer-payout-dump-report";
|
| Line 1659... |
Line 1703... |
| 1659 |
model.addAttribute("endDate", LocalDate.now());
|
1703 |
model.addAttribute("endDate", LocalDate.now());
|
| 1660 |
model.addAttribute("priceDropReports", priceDropReports);
|
1704 |
model.addAttribute("priceDropReports", priceDropReports);
|
| 1661 |
|
1705 |
|
| 1662 |
return "price-drop-report";
|
1706 |
return "price-drop-report";
|
| 1663 |
}
|
1707 |
}
|
| - |
|
1708 |
@RequestMapping(value = "/priceDropFetchReportByDate", method = RequestMethod.GET)
|
| - |
|
1709 |
public String getpriceDropFetchReportByDate(HttpServletRequest request,
|
| - |
|
1710 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| - |
|
1711 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
| - |
|
1712 |
throws Exception {
|
| - |
|
1713 |
|
| - |
|
1714 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| - |
|
1715 |
|
| - |
|
1716 |
List<List<?>> rows = new ArrayList<>();
|
| - |
|
1717 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| - |
|
1718 |
List<PriceDropReportModel> priceDropReports = orderRepository.selectPriceDropReport(fofoDetails.getFofoId(),
|
| - |
|
1719 |
startDate.atStartOfDay(), endDate.atTime(LocalTime.MAX));
|
| - |
|
1720 |
|
| - |
|
1721 |
model.addAttribute("startDate",startDate);
|
| - |
|
1722 |
model.addAttribute("endDate", LocalDate.now());
|
| - |
|
1723 |
model.addAttribute("priceDropReports", priceDropReports);
|
| - |
|
1724 |
|
| - |
|
1725 |
return "price-drop-report";
|
| - |
|
1726 |
}
|
| - |
|
1727 |
|
| 1664 |
|
1728 |
|
| 1665 |
@RequestMapping(value = "/downloadPriceDropReport", method = RequestMethod.GET)
|
1729 |
@RequestMapping(value = "/downloadPriceDropReport", method = RequestMethod.GET)
|
| 1666 |
public ResponseEntity<?> getSelectDownloadPriceDropReport(HttpServletRequest request,
|
1730 |
public ResponseEntity<?> getSelectDownloadPriceDropReport(HttpServletRequest request,
|
| 1667 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
1731 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| 1668 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
1732 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|