| Line 1561... |
Line 1561... |
| 1561 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
1561 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
| 1562 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
1562 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
| 1563 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(fofoId);
|
1563 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(fofoId);
|
| 1564 |
Map<String, Double> brandMtdAmount = fofoOrderItemRepository
|
1564 |
Map<String, Double> brandMtdAmount = fofoOrderItemRepository
|
| 1565 |
.selectSumAmountGroupByBrand(curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), fofoId);
|
1565 |
.selectSumAmountGroupByBrand(curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), fofoId);
|
| 1566 |
|
- |
|
| - |
|
1566 |
Map<String, Long> brandMtdQty = fofoOrderItemRepository.selectSumQuantityGroupByBrand(curDate.withDayOfMonth(1),
|
| - |
|
1567 |
curDate.with(LocalTime.MAX), fofoId);
|
| 1567 |
Double accesoriesmtdsale = fofoOrderRepository.selectSumSaleGroupByFofoIdsForMobileOrAccessories(fofoId,
|
1568 |
Double accesoriesmtdsale = fofoOrderRepository.selectSumSaleGroupByFofoIdsForMobileOrAccessories(fofoId,
|
| 1568 |
curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false)).get(fofoId);
|
1569 |
curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false)).get(fofoId);
|
| - |
|
1570 |
Long accesoriesmtdqty = fofoOrderRepository.selectSumSaleQuantityGroupByFofoIdsForMobileOrAccessories(fofoId,
|
| - |
|
1571 |
curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false)).get(fofoId);
|
| - |
|
1572 |
|
| 1569 |
LOGGER.info("accesoriesmtdsale" + accesoriesmtdsale);
|
1573 |
LOGGER.info("accesoriesmtdsale" + accesoriesmtdsale);
|
| 1570 |
model.addAttribute("brandMtdAmount", brandMtdAmount);
|
1574 |
model.addAttribute("brandMtdAmount", brandMtdAmount);
|
| - |
|
1575 |
model.addAttribute("brandMtdQty", brandMtdQty);
|
| 1571 |
model.addAttribute("accesoriesmtdsale", accesoriesmtdsale);
|
1576 |
model.addAttribute("accesoriesmtdsale", accesoriesmtdsale);
|
| - |
|
1577 |
model.addAttribute("accesoriesmtdqty", accesoriesmtdqty);
|
| - |
|
1578 |
|
| 1572 |
model.addAttribute("customRetailer", customRetailer);
|
1579 |
model.addAttribute("customRetailer", customRetailer);
|
| 1573 |
return "partner-brand-mtd-sale";
|
1580 |
return "partner-brand-mtd-sale";
|
| 1574 |
}
|
1581 |
}
|
| 1575 |
|
1582 |
|
| 1576 |
@RequestMapping(value = "/getPatnerBrandWiseLMTDSale", method = RequestMethod.GET)
|
1583 |
@RequestMapping(value = "/getPatnerBrandWiseLMTDSale", method = RequestMethod.GET)
|
| Line 1578... |
Line 1585... |
| 1578 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
1585 |
@RequestParam(name = ProfitMandiConstants.FOFO_ID) int fofoId, Model model) throws Exception {
|
| 1579 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
1586 |
LocalDateTime curDate = LocalDate.now().atStartOfDay();
|
| 1580 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(fofoId);
|
1587 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(fofoId);
|
| 1581 |
Map<String, Double> brandLMtdAmount = fofoOrderItemRepository.selectSumAmountGroupByBrand(
|
1588 |
Map<String, Double> brandLMtdAmount = fofoOrderItemRepository.selectSumAmountGroupByBrand(
|
| 1582 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), fofoId);
|
1589 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), fofoId);
|
| - |
|
1590 |
Map<String, Long> brandLmtdQty = fofoOrderItemRepository.selectSumQuantityGroupByBrand(
|
| - |
|
1591 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), fofoId);
|
| 1583 |
|
1592 |
|
| 1584 |
Double accesorieslmtdsale = fofoOrderRepository
|
1593 |
Double accesorieslmtdsale = fofoOrderRepository
|
| 1585 |
.selectSumSaleGroupByFofoIdsForMobileOrAccessories(fofoId, curDate.withDayOfMonth(1).minusMonths(1),
|
1594 |
.selectSumSaleGroupByFofoIdsForMobileOrAccessories(fofoId, curDate.withDayOfMonth(1).minusMonths(1),
|
| 1586 |
curDate.with(LocalTime.MAX).minusMonths(1), Optional.of(false))
|
1595 |
curDate.with(LocalTime.MAX).minusMonths(1), Optional.of(false))
|
| 1587 |
.get(fofoId);
|
1596 |
.get(fofoId);
|
| - |
|
1597 |
Long accesorieslmtdqty = fofoOrderRepository.selectSumSaleQuantityGroupByFofoIdsForMobileOrAccessories(fofoId,
|
| - |
|
1598 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1),
|
| - |
|
1599 |
Optional.of(false)).get(fofoId);
|
| - |
|
1600 |
|
| 1588 |
model.addAttribute("brandLMtdAmount", brandLMtdAmount);
|
1601 |
model.addAttribute("brandLMtdAmount", brandLMtdAmount);
|
| - |
|
1602 |
model.addAttribute("brandLmtdQty", brandLmtdQty);
|
| - |
|
1603 |
model.addAttribute("accesorieslmtdqty", accesorieslmtdqty);
|
| 1589 |
model.addAttribute("accesorieslmtdsale", accesorieslmtdsale);
|
1604 |
model.addAttribute("accesorieslmtdsale", accesorieslmtdsale);
|
| 1590 |
model.addAttribute("customRetailer", customRetailer);
|
1605 |
model.addAttribute("customRetailer", customRetailer);
|
| 1591 |
return "partner-brand-lmtd-sale";
|
1606 |
return "partner-brand-lmtd-sale";
|
| 1592 |
}
|
1607 |
}
|
| 1593 |
|
1608 |
|