Subversion Repositories SmartDukaan

Rev

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

Rev 28455 Rev 28459
Line 1763... Line 1763...
1763
			Set<Integer> fofoIds = storeGuyMap.get(authUser.getEmailId());
1763
			Set<Integer> fofoIds = storeGuyMap.get(authUser.getEmailId());
1764
			if (emails.contains(authUser.getEmailId())) {
1764
			if (emails.contains(authUser.getEmailId())) {
1765
				fofoIds = storeGuyMap.get("tarun.verma@smartdukaan.com");
1765
				fofoIds = storeGuyMap.get("tarun.verma@smartdukaan.com");
1766
				LOGGER.info("fofoIds" + fofoIds);
1766
				LOGGER.info("fofoIds" + fofoIds);
1767
			}
1767
			}
1768
			Map<Integer, CustomRetailer> customRetailerMap = null;
-
 
-
 
1768
			
1769
			if (fofoIds != null) {
1769
			if(fofoIds==null) {
-
 
1770
				List<Position> positions1 = positionRepository.selectAll(authUser.getId());
-
 
1771
				if(positions1.stream().filter(x->x.getCategoryId()==ProfitMandiConstants.TICKET_CATEGORY_MASTER).count() > 0) {
-
 
1772
					fofoIds = csService.getPositionCustomRetailerMap(positions1).values().stream().flatMap(x->x.stream()).map(x->x.getPartnerId()).collect(Collectors.toSet());
-
 
1773
				}
-
 
1774
			}
1770
 
1775
 
-
 
1776
			if (fofoIds != null && fofoIds.size() > 0) {
1771
				Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository
1777
				Map<Integer, List<Integer>> warehouseIdFofoIdMap = fofoStoreRepository
1772
						.selectActivePartnersByRetailerIds(new ArrayList<>(fofoIds)).stream()
1778
						.selectActivePartnersByRetailerIds(new ArrayList<>(fofoIds)).stream()
1773
						.collect(Collectors.groupingBy(FofoStore::getWarehouseId,
1779
						.collect(Collectors.groupingBy(FofoStore::getWarehouseId,
1774
								Collectors.mapping(FofoStore::getId, Collectors.toList())));
1780
								Collectors.mapping(FofoStore::getId, Collectors.toList())));
1775
				// warehouseStock
1781
				// warehouseStock
Line 1792... Line 1798...
1792
					ws.setTertiary(tertiary);
1798
					ws.setTertiary(tertiary);
1793
					ws.setWarehouseId(0);
1799
					ws.setWarehouseId(0);
1794
					warehouseStockMap.put(0, ws);
1800
					warehouseStockMap.put(0, ws);
1795
 
1801
 
1796
				}
1802
				}
1797
				customRetailerMap = retailerService
-
 
1798
						.getFofoRetailers(fofoIds.stream().map(x -> x).collect(Collectors.toList()));
-
 
1799
 
1803
 
1800
				warehouseStockMap.entrySet().stream().sorted(Map.Entry.comparingByKey(Comparator.reverseOrder()))
1804
				warehouseStockMap.entrySet().stream().sorted(Map.Entry.comparingByKey(Comparator.reverseOrder()))
1801
						.forEachOrdered(x -> warehouseStockSortedMap.put(x.getKey(), x.getValue()));
1805
						.forEachOrdered(x -> warehouseStockSortedMap.put(x.getKey(), x.getValue()));
1802
 
1806
 
1803
				rctSaholic = reporticoCacheTableRepository.selectByTableName("SaholicInventoryCIS");
1807
				rctSaholic = reporticoCacheTableRepository.selectByTableName("SaholicInventoryCIS");
Line 1850... Line 1854...
1850
						menus = menuRepository.selectAllByIds(menuIds);
1854
						menus = menuRepository.selectAllByIds(menuIds);
1851
					}
1855
					}
1852
				}
1856
				}
1853
			}
1857
			}
1854
 
1858
 
-
 
1859
			Map<Integer, CustomRetailer> customRetailerMap = retailerService
-
 
1860
					.getFofoRetailers(fofoIds.stream().map(x -> x).collect(Collectors.toList()));
-
 
1861
 
1855
			model.addAttribute("authId", authUser.getId());
1862
			model.addAttribute("authId", authUser.getId());
1856
 
1863
 
1857
			model.addAttribute("rctPartneStat", rctPartneStat);
1864
			model.addAttribute("rctPartneStat", rctPartneStat);
1858
 
1865
 
1859
			model.addAttribute("reporticoDate", rctSaholic);
1866
			model.addAttribute("reporticoDate", rctSaholic);
Line 2884... Line 2891...
2884
		colorList.add("red");
2891
		colorList.add("red");
2885
		colorList.add("midnightblue");
2892
		colorList.add("midnightblue");
2886
		colorList.add("cornsilk");
2893
		colorList.add("cornsilk");
2887
 
2894
 
2888
		List<String> borderList = new ArrayList<>();
2895
		List<String> borderList = new ArrayList<>();
-
 
2896
		borderList.add("pink");
2889
		borderList.add("mediumseagreen");
2897
		borderList.add("mediumseagreen");
2890
		borderList.add("lightblue");
2898
		borderList.add("lightblue");
2891
		borderList.add("#0000cd");
2899
		borderList.add("#0000cd");
2892
		borderList.add("#f7e98e");
2900
		borderList.add("#f7e98e");
2893
 
2901