Subversion Repositories SmartDukaan

Rev

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

Rev 12222 Rev 12234
Line 41... Line 41...
41
import in.shop2020.thrift.clients.InventoryClient;
41
import in.shop2020.thrift.clients.InventoryClient;
42
import in.shop2020.utils.GmailUtils;
42
import in.shop2020.utils.GmailUtils;
43
 
43
 
44
public class NewStockSalesReportFetcher {
44
public class NewStockSalesReportFetcher {
45
	private static final int NUMBER_OF_DAYS_SALE = 5;
45
	private static final int NUMBER_OF_DAYS_SALE = 5;
46
	/*private static final String[] mailTo = {"manish.sharma@shop2020.in", "rajveer.singh@shop2020.in", "chaitnaya.vats@saholic.com", 
46
	private static final String[] mailToMT = {"chaitnaya.vats@saholic.com", "manoj.kumar@saholic.com", "khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com"};
47
		"manoj.kumar@saholic.com", "chandan.kumar@saholic.com", "khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com"};*/
47
	private static final String[] mailToEMT = {"khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com", "chandan.kumar@saholic.com", "manoj.pal@shop2020.in"};
48
	private static final String[] mailTo = {"manish.sharma@shop2020.in"};
48
	private static final String[] mailTo = {"manish.sharma@shop2020.in"};
49
	private static final String senderAccountMail = "build-staging@shop2020.in";
49
	private static final String senderAccountMail = "build-staging@shop2020.in";
50
	private static final String senderAccountPswd = "shop2020";
50
	private static final String senderAccountPswd = "shop2020";
51
 
51
 
52
	static String tmpDir = System.getProperty("java.io.tmpdir");
52
	static String tmpDir = System.getProperty("java.io.tmpdir");
Line 619... Line 619...
619
			createXlsFile(movingStockSaleListMT, slowMovingStockSaleListMT, nonMovingStockSaleListMT, true);
619
			createXlsFile(movingStockSaleListMT, slowMovingStockSaleListMT, nonMovingStockSaleListMT, true);
620
			createXlsFile(movingStockSaleListEMT, slowMovingStockSaleListEMT, nonMovingStockSaleListEMT, false);
620
			createXlsFile(movingStockSaleListEMT, slowMovingStockSaleListEMT, nonMovingStockSaleListEMT, false);
621
 
621
 
622
 
622
 
623
			GmailUtils mailer = new GmailUtils();
623
			GmailUtils mailer = new GmailUtils();
624
			mailer.sendSSLMessage(mailTo, "Stock Sales Report - Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+ stockSalesReportMT.getName(), "/tmp/MobileTablets-StockSales-file.htm");
624
			mailer.sendSSLMessage(mailToMT, "Stock Sales Report - Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+ stockSalesReportMT.getName(), "/tmp/MobileTablets-StockSales-file.htm");
625
			mailer.sendSSLMessage(mailTo, "Stock Sales Report - Except Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+stockSalesReportEMT.getName(), "/tmp/ExceptMobileTablets-StockSales-file.htm");
625
			mailer.sendSSLMessage(mailToEMT, "Stock Sales Report - Except Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+stockSalesReportEMT.getName(), "/tmp/ExceptMobileTablets-StockSales-file.htm");
626
		} catch (Exception e) {
626
		} catch (Exception e) {
627
			logger.error("Error in generating/sending Stock Sales Report", e);
627
			logger.error("Error in generating/sending Stock Sales Report", e);
628
		}
628
		}
629
 
629
 
630
 
630