| Line 1324... |
Line 1324... |
| 1324 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(fofoDetails.getFofoId());
|
1324 |
FofoStore fs = fofoStoreRepository.selectByRetailerId(fofoDetails.getFofoId());
|
| 1325 |
List<FocoSaleReportModel> focoSaleReportList = fofoOrderRepository.selectFocoSaleReport(fofoDetails.getFofoId(),
|
1325 |
List<FocoSaleReportModel> focoSaleReportList = fofoOrderRepository.selectFocoSaleReport(fofoDetails.getFofoId(),
|
| 1326 |
fs.getCode(), startDate.atStartOfDay(), endDate.atStartOfDay());
|
1326 |
fs.getCode(), startDate.atStartOfDay(), endDate.atStartOfDay());
|
| 1327 |
LOGGER.info("FocoSaleReportList {}", focoSaleReportList);
|
1327 |
LOGGER.info("FocoSaleReportList {}", focoSaleReportList);
|
| 1328 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
1328 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| 1329 |
|
1329 |
|
| 1330 |
for (FocoSaleReportModel fsr : focoSaleReportList) {
|
1330 |
for (FocoSaleReportModel fsr : focoSaleReportList) {
|
| 1331 |
|
1331 |
|
| 1332 |
rows.add(Arrays.asList(fsr.getCode(), fsr.getName(), fsr.getCity(), fsr.getState(), fsr.getRegion(),
|
1332 |
rows.add(Arrays.asList(fsr.getCode(), fsr.getName(), fsr.getCity(), fsr.getState(), fsr.getRegion(),
|
| 1333 |
fsr.getItemId(), fsr.getBrand(), fsr.getModelName(), fsr.getModelNumber(), fsr.getColor(),
|
1333 |
fsr.getItemId(), fsr.getBrand(), fsr.getModelName(), fsr.getModelNumber(), fsr.getColor(),
|
| 1334 |
fsr.getQuantity(), fsr.getDp(), fsr.getSellingPrice(), fsr.getMop(), fsr.getSerialNumber(),
|
1334 |
fsr.getQuantity(), fsr.getDp(), fsr.getSellingPrice(), fsr.getMop(), fsr.getSerialNumber(),
|
| 1335 |
fsr.getCreateDate().format(dateTimeFormatter), fsr.getCustomerName(), fsr.getCustomerPhone(), fsr.getCustomerCity(),
|
1335 |
fsr.getCreateDate().format(dateTimeFormatter), fsr.getCustomerName(), fsr.getCustomerPhone(),
|
| 1336 |
fsr.getCustomerPincode(), fsr.getInvoiceNumber(), fsr.getPurchaseReference(),
|
1336 |
fsr.getCustomerCity(), fsr.getCustomerPincode(), fsr.getInvoiceNumber(), fsr.getPurchaseReference(),
|
| 1337 |
fsr.getCustomerGstNumber(), fsr.getCancelledTimestamp().format(dateTimeFormatter), fsr.getGrnCompleteDate().format(dateTimeFormatter),
|
1337 |
fsr.getCustomerGstNumber(), fsr.getCancelledTimestamp().format(dateTimeFormatter),
|
| 1338 |
fsr.getHygieneRating(), fsr.getRating(), fsr.getStatus(), fsr.getRemark(),
|
1338 |
fsr.getGrnCompleteDate().format(dateTimeFormatter), fsr.getHygieneRating(), fsr.getRating(),
|
| 1339 |
fsr.getCreatedTimestamp().format(dateTimeFormatter), fsr.getDisposedTimestamp().format(dateTimeFormatter), fsr.getNextTimestamp().format(dateTimeFormatter),
|
1339 |
fsr.getStatus(), fsr.getRemark(), fsr.getCreatedTimestamp().format(dateTimeFormatter),
|
| - |
|
1340 |
fsr.getDisposedTimestamp().format(dateTimeFormatter),
|
| - |
|
1341 |
fsr.getNextTimestamp().format(dateTimeFormatter),
|
| - |
|
1342 |
fsr.getActivationTimestamp().format(dateTimeFormatter),
|
| 1340 |
fsr.getActivationTimestamp().format(dateTimeFormatter), fsr.getActivationTimestamp().format(dateTimeFormatter), fsr.getLabel()));
|
1343 |
fsr.getActivationTimestamp().format(dateTimeFormatter), fsr.getLabel()));
|
| 1341 |
|
1344 |
|
| 1342 |
}
|
1345 |
}
|
| 1343 |
|
1346 |
|
| 1344 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(
|
1347 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(
|
| 1345 |
Arrays.asList("Code", "Name", "City", "State", "Region", "Item Id", "Brand", "Model Name",
|
1348 |
Arrays.asList("Code", "Name", "City", "State", "Region", "Item Id", "Brand", "Model Name",
|
| Line 1369... |
Line 1372... |
| 1369 |
LocalDateTime currentStartMonth = currentDate.minusDays(30).toLocalDate().atStartOfDay();
|
1372 |
LocalDateTime currentStartMonth = currentDate.minusDays(30).toLocalDate().atStartOfDay();
|
| 1370 |
|
1373 |
|
| 1371 |
List<WalletSummaryReportModel> walletSummartList = fofoOrderRepository
|
1374 |
List<WalletSummaryReportModel> walletSummartList = fofoOrderRepository
|
| 1372 |
.selectWalletSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1375 |
.selectWalletSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
| 1373 |
LOGGER.info("walletSummartList {}", walletSummartList);
|
1376 |
LOGGER.info("walletSummartList {}", walletSummartList);
|
| - |
|
1377 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| 1374 |
|
1378 |
|
| 1375 |
for (WalletSummaryReportModel walletSummart : walletSummartList) {
|
1379 |
for (WalletSummaryReportModel walletSummart : walletSummartList) {
|
| 1376 |
|
1380 |
|
| 1377 |
rows.add(Arrays.asList(walletSummart.getId(), walletSummart.getCode(), walletSummart.getName(),
|
1381 |
rows.add(Arrays.asList(walletSummart.getId(), walletSummart.getCode(), walletSummart.getName(),
|
| 1378 |
walletSummart.getEmail(), walletSummart.getPhone(), walletSummart.getAmount(),
|
1382 |
walletSummart.getEmail(), walletSummart.getPhone(), walletSummart.getAmount(),
|
| 1379 |
walletSummart.getRefundableAmount(), walletSummart.getReference(), walletSummart.getReferenceType(),
|
1383 |
walletSummart.getRefundableAmount(), walletSummart.getReference(), walletSummart.getReferenceType(),
|
| 1380 |
walletSummart.getBusinessTimestamp(), walletSummart.getDescription()));
|
1384 |
walletSummart.getBusinessTimestamp().format(dateTimeFormatter), walletSummart.getDescription()));
|
| 1381 |
|
1385 |
|
| 1382 |
}
|
1386 |
}
|
| 1383 |
|
1387 |
|
| 1384 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
|
1388 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil
|
| 1385 |
.getCSVByteStream(Arrays.asList("Id", "Code", "Name", "Email", "Phone", "Amount", "Refundable_amount",
|
1389 |
.getCSVByteStream(Arrays.asList("Id", "Code", "Name", "Email", "Phone", "Amount", "Refundable_amount",
|
| Line 1434... |
Line 1438... |
| 1434 |
LocalDateTime currentStartMonth = currentDate.minusMonths(2).toLocalDate().atStartOfDay();
|
1438 |
LocalDateTime currentStartMonth = currentDate.minusMonths(2).toLocalDate().atStartOfDay();
|
| 1435 |
List<List<?>> rows = new ArrayList<>();
|
1439 |
List<List<?>> rows = new ArrayList<>();
|
| 1436 |
List<PendingIndentReportModel> pendingIndentReports = fofoOrderRepository
|
1440 |
List<PendingIndentReportModel> pendingIndentReports = fofoOrderRepository
|
| 1437 |
.selectPendingIndentReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1441 |
.selectPendingIndentReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
| 1438 |
LOGGER.info("pendingIndentReports {}", pendingIndentReports);
|
1442 |
LOGGER.info("pendingIndentReports {}", pendingIndentReports);
|
| - |
|
1443 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| 1439 |
|
1444 |
|
| 1440 |
for (PendingIndentReportModel pir : pendingIndentReports) {
|
1445 |
for (PendingIndentReportModel pir : pendingIndentReports) {
|
| 1441 |
|
1446 |
|
| 1442 |
rows.add(Arrays.asList(pir.getTransactionId(), pir.getOrderId(), pir.getCreatTimestamp(), pir.getItemId(),
|
1447 |
rows.add(Arrays.asList(pir.getTransactionId(), pir.getOrderId(),
|
| - |
|
1448 |
pir.getCreatTimestamp().format(dateTimeFormatter), pir.getItemId(), pir.getBrand(),
|
| 1443 |
pir.getBrand(), pir.getModelName(), pir.getModelNumber(), pir.getColor(), pir.getQuantity(),
|
1449 |
pir.getModelName(), pir.getModelNumber(), pir.getColor(), pir.getQuantity(), pir.getUnitPrice(),
|
| 1444 |
pir.getUnitPrice(), pir.getWalletAmount(), pir.getStatus(), pir.getInvoiceNumber(),
|
1450 |
pir.getWalletAmount(), pir.getStatus(), pir.getInvoiceNumber(),
|
| 1445 |
pir.getBillingTimestamp()));
|
1451 |
pir.getBillingTimestamp().format(dateTimeFormatter)));
|
| 1446 |
|
1452 |
|
| 1447 |
}
|
1453 |
}
|
| 1448 |
|
1454 |
|
| 1449 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList(
|
1455 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList(
|
| 1450 |
"Transaction Id", "Order Id", "Created_At", "Item_Id", "Brand", "Model Name", "Model Number", "Color",
|
1456 |
"Transaction Id", "Order Id", "Created_At", "Item_Id", "Brand", "Model Name", "Model Number", "Color",
|
| Line 1547... |
Line 1553... |
| 1547 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
1553 |
LocalDateTime currentDate = LocalDate.now().atStartOfDay();
|
| 1548 |
LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
1554 |
LocalDateTime currentStartMonth = currentDate.minusMonths(3).toLocalDate().atStartOfDay();
|
| 1549 |
|
1555 |
|
| 1550 |
List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository
|
1556 |
List<PartnerBillingSummaryModel> partnerBillingSummaryReports = fofoOrderRepository
|
| 1551 |
.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
1557 |
.selectPartnerBillingSummaryReport(fofoDetails.getFofoId(), currentStartMonth, currentDate);
|
| - |
|
1558 |
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm");
|
| 1552 |
|
1559 |
|
| 1553 |
for (PartnerBillingSummaryModel pbsr : partnerBillingSummaryReports) {
|
1560 |
for (PartnerBillingSummaryModel pbsr : partnerBillingSummaryReports) {
|
| 1554 |
|
1561 |
|
| 1555 |
rows.add(Arrays.asList(pbsr.getId(), pbsr.getCreateTimestamp(), pbsr.getBillingTimestamp(),
|
1562 |
rows.add(Arrays.asList(pbsr.getId(), pbsr.getCreateTimestamp().format(dateTimeFormatter),
|
| - |
|
1563 |
pbsr.getBillingTimestamp().format(dateTimeFormatter),
|
| - |
|
1564 |
pbsr.getDeliveryTimestamp().format(dateTimeFormatter),
|
| - |
|
1565 |
pbsr.getDeliveryTimestamp().format(dateTimeFormatter),
|
| 1556 |
pbsr.getDeliveryTimestamp(), pbsr.getDeliveryTimestamp(), pbsr.getPartnerGrnTimestamp(),
|
1566 |
pbsr.getPartnerGrnTimestamp().format(dateTimeFormatter), pbsr.getTransactionId(),
|
| 1557 |
pbsr.getTransactionId(), pbsr.getLogisticsTransactionId(), pbsr.getAirwayBillNumber(),
|
1567 |
pbsr.getLogisticsTransactionId(), pbsr.getAirwayBillNumber(), pbsr.getStatusSubGroup(),
|
| 1558 |
pbsr.getStatusSubGroup(), pbsr.getStatusName(), pbsr.getRetailerId(), pbsr.getRetailerName(),
|
1568 |
pbsr.getStatusName(), pbsr.getRetailerId(), pbsr.getRetailerName(), pbsr.getItemId(),
|
| 1559 |
pbsr.getItemId(), pbsr.getBrand(), pbsr.getModelName(), pbsr.getModelNumber(), pbsr.getColor(),
|
1569 |
pbsr.getBrand(), pbsr.getModelName(), pbsr.getModelNumber(), pbsr.getColor(), pbsr.getUnitPrice(),
|
| 1560 |
pbsr.getUnitPrice(), pbsr.getQuantity(), pbsr.getTotalPrice(), pbsr.getInvoiceNumber(),
|
1570 |
pbsr.getQuantity(), pbsr.getTotalPrice(), pbsr.getInvoiceNumber(), pbsr.getIgstRate(),
|
| 1561 |
pbsr.getIgstRate(), pbsr.getCgstRate(), pbsr.getSgstRate()));
|
1571 |
pbsr.getCgstRate(), pbsr.getSgstRate()));
|
| 1562 |
|
1572 |
|
| 1563 |
}
|
1573 |
}
|
| 1564 |
|
1574 |
|
| 1565 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList("OrderId",
|
1575 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList("OrderId",
|
| 1566 |
"CREATION_DATE", "BILLING_DATE", "DELIVERED_ON", "SCANNED_IN_ON", "Transaction_id", "master_order_id",
|
1576 |
"CREATION_DATE", "BILLING_DATE", "DELIVERED_ON", "SCANNED_IN_ON", "Transaction_id", "master_order_id",
|