| Line 1551... |
Line 1551... |
| 1551 |
model.addAttribute("endDate", LocalDate.now());
|
1551 |
model.addAttribute("endDate", LocalDate.now());
|
| 1552 |
model.addAttribute("schemePayoutReports", schemePayoutReports);
|
1552 |
model.addAttribute("schemePayoutReports", schemePayoutReports);
|
| 1553 |
|
1553 |
|
| 1554 |
return "scheme-payout-report";
|
1554 |
return "scheme-payout-report";
|
| 1555 |
}
|
1555 |
}
|
| 1556 |
@RequestMapping(value = "/selectPartnerBillingSummaryReport", method = RequestMethod.GET)
|
1556 |
// @RequestMapping(value = "/selectPartnerBillingSummaryReport", method = RequestMethod.GET)
|
| 1557 |
public String getselectPartnerBillingSummaryReport(HttpServletRequest request,
|
1557 |
// public String getselectPartnerBillingSummaryReport(HttpServletRequest request,
|
| 1558 |
Model model) throws Exception {
|
1558 |
// Model model) throws Exception {
|
| 1559 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1559 |
// LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 1560 |
|
1560 |
//
|
| 1561 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1561 |
// LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1562 |
LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
1562 |
// LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
| 1563 |
|
1563 |
//
|
| 1564 |
List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1564 |
// List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
| 1565 |
|
1565 |
//
|
| 1566 |
|
1566 |
//
|
| 1567 |
model.addAttribute("startDate",currentDate.minusMonths(3).toLocalDate());
|
1567 |
// model.addAttribute("startDate",currentDate.minusMonths(3).toLocalDate());
|
| 1568 |
model.addAttribute("endDate", LocalDate.now());
|
1568 |
// model.addAttribute("endDate", LocalDate.now());
|
| 1569 |
model.addAttribute("partnerBillingSummaryReports", partnerBillingSummaryReports);
|
1569 |
// model.addAttribute("partnerBillingSummaryReports", partnerBillingSummaryReports);
|
| 1570 |
|
1570 |
//
|
| 1571 |
return "partner-billing-summary-report";
|
1571 |
// return "partner-billing-summary-report";
|
| 1572 |
}
|
1572 |
// }
|
| 1573 |
|
1573 |
|
| 1574 |
@RequestMapping(value = "/priceDropReport", method = RequestMethod.GET)
|
1574 |
@RequestMapping(value = "/priceDropReport", method = RequestMethod.GET)
|
| 1575 |
public String getSelectPriceDropReport(HttpServletRequest request,
|
1575 |
public String getSelectPriceDropReport(HttpServletRequest request,
|
| 1576 |
Model model) throws Exception {
|
1576 |
Model model) throws Exception {
|
| 1577 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1577 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| Line 1615... |
Line 1615... |
| 1615 |
return responseEntity;
|
1615 |
return responseEntity;
|
| 1616 |
|
1616 |
|
| 1617 |
}
|
1617 |
}
|
| 1618 |
|
1618 |
|
| 1619 |
|
1619 |
|
| 1620 |
@RequestMapping(value = "/downloadPartnerBillingSummaryReport", method = RequestMethod.GET)
|
1620 |
// @RequestMapping(value = "/downloadPartnerBillingSummaryReport", method = RequestMethod.GET)
|
| 1621 |
public ResponseEntity<?> getdownloadPartnerBillingSummaryReport(HttpServletRequest request,
|
1621 |
// public ResponseEntity<?> getdownloadPartnerBillingSummaryReport(HttpServletRequest request,
|
| 1622 |
@RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
1622 |
// @RequestParam(name = "startDate", required = true, defaultValue = "") LocalDate startDate,
|
| 1623 |
@RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
1623 |
// @RequestParam(name = "endDate", required = true, defaultValue = "") LocalDate endDate, Model model)
|
| 1624 |
throws Exception {
|
1624 |
// throws Exception {
|
| 1625 |
|
1625 |
//
|
| 1626 |
List<List<?>> rows = new ArrayList<>();
|
1626 |
// List<List<?>> rows = new ArrayList<>();
|
| 1627 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1627 |
// LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 1628 |
|
1628 |
//
|
| 1629 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1629 |
// LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1630 |
LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
1630 |
// LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
| 1631 |
|
1631 |
//
|
| 1632 |
List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1632 |
// List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
| 1633 |
|
1633 |
//
|
| 1634 |
for (PartnerBillingSummaryModel pbsr : partnerBillingSummaryReports) {
|
1634 |
// for (PartnerBillingSummaryModel pbsr : partnerBillingSummaryReports) {
|
| 1635 |
|
1635 |
//
|
| 1636 |
rows.add(Arrays.asList(pbsr.getId(), pbsr.getCreateTimestamp(), pbsr.getBillingTimestamp(),pbsr.getDeliveryTimestamp(),
|
1636 |
// rows.add(Arrays.asList(pbsr.getId(), pbsr.getCreateTimestamp(), pbsr.getBillingTimestamp(),pbsr.getDeliveryTimestamp(),
|
| 1637 |
pbsr.getDeliveryTimestamp(), pbsr.getPartnerGrnTimestamp() ,pbsr.getTransactionId(), pbsr.getLogisticsTransactionId(),
|
1637 |
// pbsr.getDeliveryTimestamp(), pbsr.getPartnerGrnTimestamp() ,pbsr.getTransactionId(), pbsr.getLogisticsTransactionId(),
|
| 1638 |
pbsr.getAirwayBillNumber(), pbsr.getStatusSubGroup(), pbsr.getStatusName(),pbsr.getRetailerId(), pbsr.getRetailerName(),pbsr.getItemId(), pbsr.getBrand()
|
1638 |
// pbsr.getAirwayBillNumber(), pbsr.getStatusSubGroup(), pbsr.getStatusName(),pbsr.getRetailerId(), pbsr.getRetailerName(),pbsr.getItemId(), pbsr.getBrand()
|
| 1639 |
, pbsr.getModelName(), pbsr.getModelNumber(),pbsr.getColor(),pbsr.getUnitPrice(), pbsr.getQuantity(),
|
1639 |
// , pbsr.getModelName(), pbsr.getModelNumber(),pbsr.getColor(),pbsr.getUnitPrice(), pbsr.getQuantity(),
|
| 1640 |
pbsr.getTotalPrice(),pbsr.getInvoiceNumber(), pbsr.getIgstRate(),pbsr.getCgstRate(),pbsr.getSgstRate()));
|
1640 |
// pbsr.getTotalPrice(),pbsr.getInvoiceNumber(), pbsr.getIgstRate(),pbsr.getCgstRate(),pbsr.getSgstRate()));
|
| 1641 |
|
1641 |
//
|
| 1642 |
}
|
1642 |
// }
|
| 1643 |
|
1643 |
//
|
| 1644 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
|
1644 |
// org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
|
| 1645 |
.getCSVByteStream(Arrays.asList("OrderId","CREATION_DATE","BILLING_DATE","DELIVERED_ON","SCANNED_IN_ON"
|
1645 |
// .getCSVByteStream(Arrays.asList("OrderId","CREATION_DATE","BILLING_DATE","DELIVERED_ON","SCANNED_IN_ON"
|
| 1646 |
,"Transaction_id","master_order_id", "airwaybill_no", "statusSubGroupp", "statusName","customer_id"
|
1646 |
// ,"Transaction_id","master_order_id", "airwaybill_no", "statusSubGroupp", "statusName","customer_id"
|
| 1647 |
, "customer_name","Item_Id", "brand", "model_name", "model_number" ,"color", "selling_price"
|
1647 |
// , "customer_name","Item_Id", "brand", "model_name", "model_number" ,"color", "selling_price"
|
| 1648 |
,"Quantity","total_price","invoice_number","igstrate","cgstrate","sgstrate"), rows);
|
1648 |
// ,"Quantity","total_price","invoice_number","igstrate","cgstrate","sgstrate"), rows);
|
| 1649 |
|
1649 |
//
|
| 1650 |
ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, "Billing Statement Report");
|
1650 |
// ResponseEntity<?> responseEntity = orderService.downloadReportInCsv(baos, rows, "Billing Statement Report");
|
| 1651 |
|
1651 |
//
|
| 1652 |
return responseEntity;
|
1652 |
// return responseEntity;
|
| 1653 |
|
1653 |
//
|
| 1654 |
}
|
1654 |
// }
|
| 1655 |
|
1655 |
//
|
| 1656 |
@RequestMapping(value = "/invoiceSchemeOutSummaryReport", method = RequestMethod.GET)
|
1656 |
@RequestMapping(value = "/invoiceSchemeOutSummaryReport", method = RequestMethod.GET)
|
| 1657 |
public String getInvoiceSchemeOutSummaryReport(HttpServletRequest request,
|
1657 |
public String getInvoiceSchemeOutSummaryReport(HttpServletRequest request,
|
| 1658 |
Model model) throws Exception {
|
1658 |
Model model) throws Exception {
|
| 1659 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
1659 |
LoginDetails fofoDetails = cookiesProcessor.getCookiesObject(request);
|
| 1660 |
|
1660 |
|