| Line 1780... |
Line 1780... |
| 1780 |
.stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
1780 |
.stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
| 1781 |
|
1781 |
|
| 1782 |
grnPendingAccessTvOrders = orderRepository.selectAllGrnPendingAccessoriesTvGroupByFofoId(fofoIdList)
|
1782 |
grnPendingAccessTvOrders = orderRepository.selectAllGrnPendingAccessoriesTvGroupByFofoId(fofoIdList)
|
| 1783 |
.stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
1783 |
.stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x));
|
| 1784 |
|
1784 |
|
| 1785 |
for (Entry<Integer, CustomRetailer> customRetailer : customRetailers.entrySet()) {
|
1785 |
// Bulk fetch partner types to avoid N+1 queries
|
| 1786 |
PartnerType partnerType = partnerTypeChangeService.getTypeOnDate(customRetailer.getKey(),
|
1786 |
fofoIdPartnerTypeMap = partnerTypeChangeService.getTypesForFofoIds(new ArrayList<>(customRetailers.keySet()), LocalDate.now());
|
| 1787 |
LocalDate.now());
|
- |
|
| 1788 |
fofoIdPartnerTypeMap.put(customRetailer.getKey(), partnerType);
|
- |
|
| 1789 |
|
1787 |
|
| - |
|
1788 |
for (Entry<Integer, CustomRetailer> customRetailer : customRetailers.entrySet()) {
|
| 1790 |
Map<String, Double> stockBrand = inStockBrandModel.get(customRetailer.getKey());
|
1789 |
Map<String, Double> stockBrand = inStockBrandModel.get(customRetailer.getKey());
|
| 1791 |
Map<String, Double> pendingIndentBrand = pendingIndent.get(customRetailer.getKey());
|
1790 |
Map<String, Double> pendingIndentBrand = pendingIndent.get(customRetailer.getKey());
|
| 1792 |
Map<String, Double> grnBrand = grnPendingOrders.get(customRetailer.getKey());
|
1791 |
Map<String, Double> grnBrand = grnPendingOrders.get(customRetailer.getKey());
|
| 1793 |
double totalAmount = 0;
|
1792 |
double totalAmount = 0;
|
| 1794 |
|
1793 |
|