| Line 67... |
Line 67... |
| 67 |
static String sendTo[];
|
67 |
static String sendTo[];
|
| 68 |
private static Map<String, Map<Long, NlcLeftOutInventory>> nlcLoiItemsMapSD = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
68 |
private static Map<String, Map<Long, NlcLeftOutInventory>> nlcLoiItemsMapSD = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
| 69 |
private static Map<String, Map<Long, NlcLeftOutInventory>> nlcLoiItemsMapFK = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
69 |
private static Map<String, Map<Long, NlcLeftOutInventory>> nlcLoiItemsMapFK = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
| 70 |
|
70 |
|
| 71 |
static{
|
71 |
static{
|
| 72 |
emailFromAddress = "build@shop2020.in";
|
72 |
emailFromAddress = "build-staging@shop2020.in";
|
| 73 |
password = "cafe@nes";
|
73 |
password = "shop2020";
|
| 74 |
mailer = new GmailUtils();
|
74 |
mailer = new GmailUtils();
|
| 75 |
sendTo = new String[]{"vikram.raghav@shop2020.in", "manish.sharma@shop2020.in"};
|
75 |
//sendTo = new String[]{"vikram.raghav@shop2020.in", "manish.sharma@shop2020.in"};
|
| 76 |
/*sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
76 |
sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "vikram.raghav@shop2020.in", "rajneesh.arora@shop2020.in",
|
| 77 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
77 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 78 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};*/
|
78 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in"};
|
| 79 |
CatalogClient catalogServiceClient = null;
|
79 |
CatalogClient catalogServiceClient = null;
|
| 80 |
try {
|
80 |
try {
|
| 81 |
catalogServiceClient = new CatalogClient();
|
81 |
catalogServiceClient = new CatalogClient();
|
| 82 |
} catch (TTransportException e1) {
|
82 |
} catch (TTransportException e1) {
|
| 83 |
// TODO Auto-generated catch block
|
83 |
// TODO Auto-generated catch block
|
| Line 625... |
Line 625... |
| 625 |
"Availability Count",
|
625 |
"Availability Count",
|
| 626 |
"Reserved Count",
|
626 |
"Reserved Count",
|
| 627 |
"Total Availabilty"
|
627 |
"Total Availabilty"
|
| 628 |
}, '\t'));
|
628 |
}, '\t'));
|
| 629 |
|
629 |
|
| 630 |
System.out.println(fileName+ " Main Map Size "+nlcLeftoutInventoryItems.size());
|
630 |
//System.out.println(fileName+ " Main Map Size "+nlcLeftoutInventoryItems.size());
|
| 631 |
|
631 |
|
| 632 |
for(Map<Long, NlcLeftOutInventory> nlcLOImap : nlcLeftoutInventoryItems.values()){
|
632 |
for(Map<Long, NlcLeftOutInventory> nlcLOImap : nlcLeftoutInventoryItems.values()){
|
| 633 |
System.out.println("Inner Map Size "+nlcLOImap.size());
|
633 |
//System.out.println("Inner Map Size "+nlcLOImap.size());
|
| 634 |
for(NlcLeftOutInventory nlcLOI : nlcLOImap.values()){
|
634 |
for(NlcLeftOutInventory nlcLOI : nlcLOImap.values()){
|
| 635 |
bufferedWriter.newLine();
|
635 |
bufferedWriter.newLine();
|
| 636 |
|
636 |
|
| 637 |
bufferedWriter.write(StringUtils.join(
|
637 |
bufferedWriter.write(StringUtils.join(
|
| 638 |
new String[] {
|
638 |
new String[] {
|
| Line 651... |
Line 651... |
| 651 |
bufferedWriter.close();
|
651 |
bufferedWriter.close();
|
| 652 |
|
652 |
|
| 653 |
List<File> files = new ArrayList<File>();
|
653 |
List<File> files = new ArrayList<File>();
|
| 654 |
files.add(file);
|
654 |
files.add(file);
|
| 655 |
|
655 |
|
| 656 |
//mailer.sendSSLMessage(sendTo, "Inventory not Sent due to NLC Limitaion in case of - "+ fileName , "Please find attached file.", emailFromAddress, password, files);
|
656 |
mailer.sendSSLMessage(sendTo, "Inventory not Sent due to NLC Limitaion in case of - "+ fileName , "Please find attached file.", emailFromAddress, password, files);
|
| 657 |
} catch (Exception e) {
|
657 |
} catch (Exception e) {
|
| 658 |
e.printStackTrace();
|
658 |
e.printStackTrace();
|
| 659 |
/*try {
|
659 |
try {
|
| 660 |
//mailer.sendSSLMessage(sendTo,"Error while creating file from data ", emailFromAddress, password, "");
|
660 |
mailer.sendSSLMessage(sendTo,"Error while creating file from data ", emailFromAddress, password, "");
|
| 661 |
} catch (MessagingException e1) {
|
661 |
} catch (MessagingException e1) {
|
| 662 |
e1.printStackTrace();
|
662 |
e1.printStackTrace();
|
| 663 |
}*/
|
663 |
}
|
| 664 |
}
|
664 |
}
|
| 665 |
}
|
665 |
}
|
| 666 |
|
666 |
|
| 667 |
//private static DefaultHttpClient client = new DefaultHttpClient();
|
667 |
//private static DefaultHttpClient client = new DefaultHttpClient();
|
| 668 |
|
668 |
|