Subversion Repositories SmartDukaan

Rev

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

Rev 27217 Rev 27233
Line 2091... Line 2091...
2091
 
2091
 
2092
					focusedModelShortageList.add(fm);
2092
					focusedModelShortageList.add(fm);
2093
				}
2093
				}
2094
 
2094
 
2095
			}
2095
			}
2096
			/*
2096
 
2097
			 * if (!focusedModelShortageList.isEmpty()) { String subject = "Stock Alert";
2097
			if (!focusedModelShortageList.isEmpty()) {
-
 
2098
				String subject = "Stock Alert";
2098
			 * String messageText = this.getMessage(focusedModelShortageList);
2099
				String messageText = this.getMessage(focusedModelShortageList);
2099
			 * 
2100
 
2100
			 * this.sendMailWithAttachments(subject, messageText,
2101
				this.sendMailWithAttachments(subject, messageText, customRetailer.getEmail());
2101
			 * customRetailer.getEmail()); String notificationMessage =
-
 
2102
			 * this.getNotificationMessage(focusedModelShortageList);
2102
				String notificationMessage = this.getNotificationMessage(focusedModelShortageList);
2103
			 * 
2103
 
2104
			 * LOGGER.info("notificationMessage" + notificationMessage);
2104
				LOGGER.info("notificationMessage" + notificationMessage);
2105
			 * 
2105
 
2106
			 * SendNotificationModel sendNotificationModel = new SendNotificationModel();
2106
				SendNotificationModel sendNotificationModel = new SendNotificationModel();
2107
			 * sendNotificationModel.setCampaignName("Stock Alert");
2107
				sendNotificationModel.setCampaignName("Stock Alert");
2108
			 * sendNotificationModel.setTitle("Alert");
2108
				sendNotificationModel.setTitle("Alert");
2109
			 * sendNotificationModel.setMessage(notificationMessage);
2109
				sendNotificationModel.setMessage(notificationMessage);
2110
			 * sendNotificationModel.setType("url"); sendNotificationModel.setUrl(
2110
				sendNotificationModel.setType("url");
2111
			 * "https://app.smartdukaan.com/pages/home/notifications");
2111
				sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
2112
			 * sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
2112
				sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(2));
2113
			 * sendNotificationModel.setMessageType(MessageType.notification); int userId =
2113
				sendNotificationModel.setMessageType(MessageType.notification);
2114
			 * userAccountRepository.selectUserIdByRetailerId(fofoId);
2114
				int userId = userAccountRepository.selectUserIdByRetailerId(fofoId);
2115
			 * sendNotificationModel.setUserIds(Arrays.asList(userId));
2115
				sendNotificationModel.setUserIds(Arrays.asList(userId));
2116
			 * notificationService.sendNotification(sendNotificationModel);
2116
				notificationService.sendNotification(sendNotificationModel);
2117
			 * 
2117
 
2118
			 * }
2118
			}
2119
			 */
2119
 
2120
		}
2120
		}
2121
		if (!focusedModelShortageReportMap.isEmpty()) {
2121
		if (!focusedModelShortageReportMap.isEmpty()) {
2122
			String fileName = "Stock Alert-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
2122
			String fileName = "Stock Alert-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
2123
			Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
2123
			Map<String, Set<Integer>> storeGuyMap = csService.getAuthUserPartnerIdMapping();
2124
			Map<String, List<List<?>>> emailRowsMap = new HashMap<>();
2124
			Map<String, List<List<?>>> emailRowsMap = new HashMap<>();