Subversion Repositories SmartDukaan

Rev

Rev 34449 | Rev 34461 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34449 Rev 34459
Line 172... Line 172...
172
        List<Integer> fofoIds = fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList());
172
        List<Integer> fofoIds = fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList());
173
        Map<Integer, Map<Integer, Integer>> fofoCatalogQtyMap = new HashMap<>();
173
        Map<Integer, Map<Integer, Integer>> fofoCatalogQtyMap = new HashMap<>();
174
        for (Integer fofoId : fofoIds) {
174
        for (Integer fofoId : fofoIds) {
175
            List<InventoryItem> inventoryItems = inventoryItemRepository.selectByActivatedNotSold(fofoId);
175
            List<InventoryItem> inventoryItems = inventoryItemRepository.selectByActivatedNotSold(fofoId);
176
            Map<Integer, Integer> catalogIdQtyMap = new HashMap<>();
176
            Map<Integer, Integer> catalogIdQtyMap = new HashMap<>();
177
            for (InventoryItem item : inventoryItems) {
177
            for (InventoryItem inventoryitem : inventoryItems) {
178
                Item item1 = itemRepository.selectById(item.getItemId());
178
                Item item = itemRepository.selectById(inventoryitem.getItemId());
179
                Integer catalogId = item1.getCatalogItemId(); // Assuming this exists
179
                Integer catalogId = item.getCatalogItemId(); // Assuming this exists
180
                catalogIdQtyMap.put(catalogId, catalogIdQtyMap.getOrDefault(catalogId, 0) + 1);
180
                catalogIdQtyMap.put(catalogId, catalogIdQtyMap.getOrDefault(catalogId, 0) + 1);
181
            }
181
            }
182
            fofoCatalogQtyMap.put(fofoId, catalogIdQtyMap);
182
            fofoCatalogQtyMap.put(fofoId, catalogIdQtyMap);
183
        }
183
        }
184
        System.out.println("fofoCatalogQtyMap {}" + fofoCatalogQtyMap);
184
        System.out.println("fofoCatalogQtyMap {}" + fofoCatalogQtyMap);