| Line 2463... |
Line 2463... |
| 2463 |
List<String> remainingBrandsWithoutStock = ProfitMandiConstants.BRANDS.stream()
|
2463 |
List<String> remainingBrandsWithoutStock = ProfitMandiConstants.BRANDS.stream()
|
| 2464 |
.filter(x -> !brandToMtdMap.containsKey(x))
|
2464 |
.filter(x -> !brandToMtdMap.containsKey(x))
|
| 2465 |
.filter(x -> !sortedBrandStatusWiseStockListMap.containsKey(x)) // no stock
|
2465 |
.filter(x -> !sortedBrandStatusWiseStockListMap.containsKey(x)) // no stock
|
| 2466 |
.collect(Collectors.toList());
|
2466 |
.collect(Collectors.toList());
|
| 2467 |
|
2467 |
|
| - |
|
2468 |
List<InStockBrandItemModel> inStockBrandItemModels = currentInventorySnapshotRepository.selectInStockItemsByBrand(fofoId);
|
| - |
|
2469 |
|
| - |
|
2470 |
Map<String, Long> brandsWithPartnerStockMap = inStockBrandItemModels.stream().collect(Collectors.groupingBy(InStockBrandItemModel::getBrand, Collectors.summingLong(InStockBrandItemModel::getQty)));
|
| - |
|
2471 |
List<String> brandsWithPartnerStock = brandsWithPartnerStockMap.entrySet().stream().filter(x -> x.getValue() > 0).map(x -> x.getKey()).collect(Collectors.toList());
|
| 2468 |
List<String> sortedBrands = new ArrayList<>();
|
2472 |
List<String> sortedBrands = new ArrayList<>();
|
| 2469 |
sortedBrands.addAll(sortedBrandsByMtd);
|
2473 |
sortedBrands.addAll(sortedBrandsByMtd);
|
| 2470 |
sortedBrands.addAll(remainingBrands);
|
2474 |
sortedBrands.addAll(remainingBrands);
|
| 2471 |
sortedBrands.addAll(remainingBrandsWithoutStock);
|
2475 |
sortedBrands.addAll(remainingBrandsWithoutStock);
|
| 2472 |
|
2476 |
|
| Line 2491... |
Line 2495... |
| 2491 |
}
|
2495 |
}
|
| 2492 |
LOGGER.info("pendingIndents {}", pendingIndents);
|
2496 |
LOGGER.info("pendingIndents {}", pendingIndents);
|
| 2493 |
LOGGER.info("pendingIndentsDetailMap {}", pendingIndentsDetailMap);
|
2497 |
LOGGER.info("pendingIndentsDetailMap {}", pendingIndentsDetailMap);
|
| 2494 |
|
2498 |
|
| 2495 |
model.addAttribute("brandStatusWiseStockListMap", sortedBrandStatusWiseStockListMap);
|
2499 |
model.addAttribute("brandStatusWiseStockListMap", sortedBrandStatusWiseStockListMap);
|
| - |
|
2500 |
model.addAttribute("brandsWithPartnerStock", brandsWithPartnerStock);
|
| 2496 |
model.addAttribute("pendingIndentsDetailMap", pendingIndentsDetailMap);
|
2501 |
model.addAttribute("pendingIndentsDetailMap", pendingIndentsDetailMap);
|
| 2497 |
model.addAttribute("brands", finalSortedBrands);
|
2502 |
model.addAttribute("brands", finalSortedBrands);
|
| 2498 |
model.addAttribute("brandToMtdMap", brandToMtdMap);
|
2503 |
model.addAttribute("brandToMtdMap", brandToMtdMap);
|
| 2499 |
model.addAttribute("catalogWiseQtyMap", catalogWiseQtyMap);
|
2504 |
model.addAttribute("catalogWiseQtyMap", catalogWiseQtyMap);
|
| 2500 |
model.addAttribute("intransistSummaryList", intransistSummaryList);
|
2505 |
model.addAttribute("intransistSummaryList", intransistSummaryList);
|