Subversion Repositories SmartDukaan

Rev

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

Rev 27088 Rev 27095
Line 2002... Line 2002...
2002
			List<String> brands = mongoClient.getMongoBrands(fofoId, null, 3).stream().map(x -> (String) x.get("name"))
2002
			List<String> brands = mongoClient.getMongoBrands(fofoId, null, 3).stream().map(x -> (String) x.get("name"))
2003
					.collect(Collectors.toList());
2003
					.collect(Collectors.toList());
2004
 
2004
 
2005
			List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
2005
			List<Integer> regionIds = partnerRegionRepository.selectByfofoId(fofoId).stream().map(x -> x.getRegionId())
2006
					.collect(Collectors.toList());
2006
					.collect(Collectors.toList());
-
 
2007
			LOGGER.info("regionIds" + regionIds);
2007
			List<Integer> focusedModelCatalogId = focusedModelRepository.selectAllByRegionIds(regionIds).stream()
2008
			List<Integer> focusedModelCatalogId = focusedModelRepository.selectAllByRegionIds(regionIds).stream()
2008
					.map(x -> x.getCatalogId()).collect(Collectors.toList());
2009
					.map(x -> x.getCatalogId()).collect(Collectors.toList());
-
 
2010
			LOGGER.info("focusedModelCatalogId" + focusedModelCatalogId);
2009
			Map<String, Object> equalsMap = new HashMap<>();
2011
			Map<String, Object> equalsMap = new HashMap<>();
2010
			equalsMap.put("categoryId", 10006);
2012
			equalsMap.put("categoryId", 10006);
2011
			equalsMap.put("brand", brands);
2013
			equalsMap.put("brand", brands);
2012
 
2014
 
2013
			Map<String, List<?>> notEqualsMap = new HashMap<>();
2015
			Map<String, List<?>> notEqualsMap = new HashMap<>();
Line 2070... Line 2072...
2070
					focusedModelShortageReportMap.get(fofoId).add(fm);
2072
					focusedModelShortageReportMap.get(fofoId).add(fm);
2071
				}
2073
				}
2072
 
2074
 
2073
			}
2075
			}
2074
			List<FocusedModelShortageModel> focusedModelShortageModel = focusedModelShortageReportMap.get(fofoId);
2076
			List<FocusedModelShortageModel> focusedModelShortageModel = focusedModelShortageReportMap.get(fofoId);
2075
 
-
 
-
 
2077
			LOGGER.info("focusedModelShortageModel" + focusedModelShortageModel);
2076
			if (!focusedModelShortageModel.isEmpty()) {
2078
			if (!focusedModelShortageModel.isEmpty()) {
2077
				String subject = "Stock Alert";
2079
				String subject = "Stock Alert";
2078
				String messageText = this.getMessage(focusedModelShortageModel);
2080
				String messageText = this.getMessage(focusedModelShortageModel);
2079
 
2081
 
2080
				this.sendMailWithAttachments(subject, messageText, customRetailer.getEmail());
2082
				this.sendMailWithAttachments(subject, messageText, customRetailer.getEmail());