| Line 441... |
Line 441... |
| 441 |
|
441 |
|
| 442 |
LOGGER.info("curDateYear" + curDate.with(LocalTime.MAX));
|
442 |
LOGGER.info("curDateYear" + curDate.with(LocalTime.MAX));
|
| 443 |
|
443 |
|
| 444 |
Map<String, Double> brandwisesale = fofoOrderItemRepository
|
444 |
Map<String, Double> brandwisesale = fofoOrderItemRepository
|
| 445 |
.selectSumAmountGroupByBrand(curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), fofoId);
|
445 |
.selectSumAmountGroupByBrand(curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), fofoId);
|
| - |
|
446 |
|
| - |
|
447 |
Map<Integer, Double> accesoriesmtdsale = fofoOrderRepository.selectSumSaleGroupByFofoIdsForMobileOrAccessories(
|
| - |
|
448 |
fofoId, curDate.withDayOfMonth(1), curDate.with(LocalTime.MAX), Optional.of(false));
|
| - |
|
449 |
|
| - |
|
450 |
LOGGER.info("accesoriesmtdsale" + accesoriesmtdsale);
|
| - |
|
451 |
|
| 446 |
LOGGER.info("brandwisesale" + brandwisesale);
|
452 |
LOGGER.info("brandwisesale" + brandwisesale);
|
| 447 |
|
453 |
|
| 448 |
Map<String, Double> lmtdBrandWiseSale = fofoOrderItemRepository.selectSumAmountGroupByBrand(
|
454 |
Map<String, Double> lmtdBrandWiseSale = fofoOrderItemRepository.selectSumAmountGroupByBrand(
|
| 449 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), fofoId);
|
455 |
curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1), fofoId);
|
| 450 |
|
456 |
|
| - |
|
457 |
Map<Integer, Double> accesorieslmtdsale = fofoOrderRepository.selectSumSaleGroupByFofoIdsForMobileOrAccessories(
|
| - |
|
458 |
fofoId, curDate.withDayOfMonth(1).minusMonths(1), curDate.with(LocalTime.MAX).minusMonths(1),
|
| - |
|
459 |
Optional.of(false));
|
| - |
|
460 |
LOGGER.info("accesorieslmtdsale" + accesorieslmtdsale);
|
| 451 |
ChartModel cm = new ChartModel();
|
461 |
ChartModel cm = new ChartModel();
|
| 452 |
|
462 |
|
| 453 |
List<String> labels = new ArrayList<>();
|
463 |
List<String> labels = new ArrayList<>();
|
| 454 |
labels.addAll(brandwisesale.keySet());
|
464 |
labels.addAll(brandwisesale.keySet());
|
| - |
|
465 |
labels.add("accessories");
|
| 455 |
List<Double> values = new ArrayList<>();
|
466 |
List<Double> values = new ArrayList<>();
|
| 456 |
values.addAll(brandwisesale.values());
|
467 |
values.addAll(brandwisesale.values());
|
| - |
|
468 |
values.addAll(accesoriesmtdsale.values());
|
| 457 |
|
469 |
|
| 458 |
List<Double> lmtdValues = new ArrayList<>();
|
470 |
List<Double> lmtdValues = new ArrayList<>();
|
| 459 |
lmtdValues.addAll(lmtdBrandWiseSale.values());
|
471 |
lmtdValues.addAll(lmtdBrandWiseSale.values());
|
| - |
|
472 |
lmtdValues.addAll(accesorieslmtdsale.values());
|
| 460 |
|
473 |
|
| 461 |
DatasetModel dsm = new DatasetModel();
|
474 |
DatasetModel dsm = new DatasetModel();
|
| 462 |
dsm.setLabel("mtd sales");
|
475 |
dsm.setLabel("mtd sales");
|
| 463 |
|
476 |
|
| 464 |
List<String> backgroundColor = new ArrayList<>();
|
477 |
List<String> backgroundColor = new ArrayList<>();
|
| 465 |
for (Entry<String, Double> bs : brandwisesale.entrySet()) {
|
478 |
for (Entry<String, Double> bs : brandwisesale.entrySet()) {
|
| 466 |
backgroundColor.add("#3e95cd");
|
479 |
backgroundColor.add("#3e95cd");
|
| 467 |
}
|
480 |
}
|
| 468 |
|
- |
|
| - |
|
481 |
backgroundColor.add("#3e95cd");
|
| 469 |
dsm.setBackgroundColor(backgroundColor);
|
482 |
dsm.setBackgroundColor(backgroundColor);
|
| 470 |
dsm.setData(values);
|
483 |
dsm.setData(values);
|
| 471 |
|
484 |
|
| 472 |
DatasetModel lmtddsm = new DatasetModel();
|
485 |
DatasetModel lmtddsm = new DatasetModel();
|
| 473 |
lmtddsm.setLabel("lmtd sales");
|
486 |
lmtddsm.setLabel("lmtd sales");
|
| 474 |
|
487 |
|
| 475 |
List<String> background = new ArrayList<>();
|
488 |
List<String> background = new ArrayList<>();
|
| 476 |
for (Entry<String, Double> bs : lmtdBrandWiseSale.entrySet()) {
|
489 |
for (Entry<String, Double> bs : lmtdBrandWiseSale.entrySet()) {
|
| 477 |
background.add("#8e5ea2");
|
490 |
background.add("#8e5ea2");
|
| 478 |
}
|
491 |
}
|
| 479 |
|
- |
|
| - |
|
492 |
background.add("#8e5ea2");
|
| 480 |
lmtddsm.setBackgroundColor(background);
|
493 |
lmtddsm.setBackgroundColor(background);
|
| 481 |
lmtddsm.setData(lmtdValues);
|
494 |
lmtddsm.setData(lmtdValues);
|
| 482 |
|
495 |
|
| 483 |
List<DatasetModel> datasets = new ArrayList<>();
|
496 |
List<DatasetModel> datasets = new ArrayList<>();
|
| 484 |
datasets.add(dsm);
|
497 |
datasets.add(dsm);
|