Subversion Repositories SmartDukaan

Rev

Rev 15412 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 15412 Rev 19353
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[] mailToMT = {"chaitnaya.vats@saholic.com", "manoj.kumar@saholic.com", "khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com", "manish.sharma@shop2020.in","muvin.khan@shop2020.in"};
46
	private static final String[] mailToMT = {"chaitnaya.vats@saholic.com", "manoj.kumar@saholic.com", "khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com", "manish.sharma@shop2020.in", "yatin.singh@saholic.com","amit.gupta@shop2020.in","kshitij.sood@saholic.com"};
47
	private static final String[] mailToEMT = {"khushal.bhatia@saholic.com", "rajneesh.arora@saholic.com", "chandan.kumar@saholic.com", "manoj.pal@shop2020.in", "manish.sharma@shop2020.in"};
-
 
48
	private static final String[] mailTo = {"manish.sharma@shop2020.in"};
47
	private static final String[] mailTo = {"manish.sharma@shop2020.in"};
49
	private static final String senderAccountMail = "build-staging@shop2020.in";
48
	private static final String senderAccountMail = "build-staging@shop2020.in";
50
	private static final String senderAccountPswd = "shop2020";
49
	private static final String senderAccountPswd = "shop2020";
51
 
50
 
52
	static String tmpDir = System.getProperty("java.io.tmpdir");
51
	static String tmpDir = System.getProperty("java.io.tmpdir");
Line 641... Line 640...
641
			createXlsFile(movingStockSaleListEMT, slowMovingStockSaleListEMT, nonMovingStockSaleListEMT, false);
640
			createXlsFile(movingStockSaleListEMT, slowMovingStockSaleListEMT, nonMovingStockSaleListEMT, false);
642
 
641
 
643
 
642
 
644
			GmailUtils mailer = new GmailUtils();
643
			GmailUtils mailer = new GmailUtils();
645
			mailer.sendSSLMessage(mailToMT, "Stock Sales Report - Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+ stockSalesReportMT.getName(), "/tmp/MobileTablets-StockSales-file.htm");
644
			mailer.sendSSLMessage(mailToMT, "Stock Sales Report - Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+ stockSalesReportMT.getName(), "/tmp/MobileTablets-StockSales-file.htm");
646
			mailer.sendSSLMessage(mailToEMT, "Stock Sales Report - Except Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+stockSalesReportEMT.getName(), "/tmp/ExceptMobileTablets-StockSales-file.htm");
645
			mailer.sendSSLMessage(mailToMT, "Stock Sales Report - Except Mobile And Tablets ", "", senderAccountMail, senderAccountPswd, tmpDir +"/"+stockSalesReportEMT.getName(), "/tmp/ExceptMobileTablets-StockSales-file.htm");
647
		} catch (Exception e) {
646
		} catch (Exception e) {
648
			logger.error("Error in generating/sending Stock Sales Report", e);
647
			logger.error("Error in generating/sending Stock Sales Report", e);
649
		}
648
		}
650
 
649
 
651
 
650