Subversion Repositories SmartDukaan

Rev

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

Rev 30279 Rev 30426
Line 324... Line 324...
324
	}
324
	}
325
 
325
 
326
	public Map<String, Object> getFilter(int warehouseId, String email, LocalDateTime date, LocalDateTime endDate)
326
	public Map<String, Object> getFilter(int warehouseId, String email, LocalDateTime date, LocalDateTime endDate)
327
			throws ProfitMandiBusinessException {
327
			throws ProfitMandiBusinessException {
328
		Map<String, Object> map = new HashMap<>();
328
		Map<String, Object> map = new HashMap<>();
329
 
-
 
-
 
329
		Map<Integer, CustomRetailer> customRetailerMap = retailerService.getAllFofoRetailers();
330
		Map<Integer, CustomRetailer> customRetailersMap = null;
330
		Map<Integer, CustomRetailer> crm = null;
331
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
331
		Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
332
		AuthUser authUser = authRepository.selectByEmailOrMobile(email);
332
		AuthUser authUser = authRepository.selectByEmailOrMobile(email);
333
		Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
333
		Map<Integer, String> warehouseMap = ProfitMandiConstants.WAREHOUSE_MAP;
334
 
334
 
335
		Set<Integer> fofoIds = null;
335
		Set<Integer> fofoIds = null;
Line 354... Line 354...
354
					.stream().map(x -> x).collect(Collectors.toSet());
354
					.stream().map(x -> x).collect(Collectors.toSet());
355
 
355
 
356
		}
356
		}
357
 
357
 
358
		if (fofoIds != null) {
358
		if (fofoIds != null) {
-
 
359
 
359
			customRetailersMap = retailerService
360
			crm = fofoIds.stream().map(x -> customRetailerMap.get(x)).filter(x -> x != null)
360
					.getFofoRetailers(fofoIds.stream().map(x -> x).collect(Collectors.toList()));
361
					.collect(Collectors.toList()).stream().collect(Collectors.toMap(x -> x.getPartnerId(), x -> x));
361
 
362
 
362
		}
363
		}
363
 
364
 
364
		map.put("date", date);
365
		map.put("date", date);
365
		map.put("endDate", endDate);
366
		map.put("endDate", endDate);
366
		map.put("customRetailersMap", customRetailersMap);
367
		map.put("customRetailersMap", crm);
367
		map.put("fofoIds", fofoIds);
368
		map.put("fofoIds", fofoIds);
368
		map.put("warehouseMap", warehouseMap);
369
		map.put("warehouseMap", warehouseMap);
369
 
370
 
370
		return map;
371
		return map;
371
 
372