| Line 70... |
Line 70... |
| 70 |
|
70 |
|
| 71 |
static{
|
71 |
static{
|
| 72 |
emailFromAddress = "build-staging@shop2020.in";
|
72 |
emailFromAddress = "build-staging@shop2020.in";
|
| 73 |
password = "shop2020";
|
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 266... |
Line 266... |
| 266 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
266 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
| 267 |
nlcLOISD.setVendorName(warehouse.getVendor().getName());
|
267 |
nlcLOISD.setVendorName(warehouse.getVendor().getName());
|
| 268 |
nlcLOISD.setVendorAvailability(available);
|
268 |
nlcLOISD.setVendorAvailability(available);
|
| 269 |
nlcLOISD.setVendorNlc(nlc);
|
269 |
nlcLOISD.setVendorNlc(nlc);
|
| 270 |
nlcLOISD.setVendorWarehouseId(warehouse.getId());
|
270 |
nlcLOISD.setVendorWarehouseId(warehouse.getId());
|
| - |
|
271 |
nlcLOISD.setWarehouseType(warehouse.getWarehouseType().toString());
|
| 271 |
if(!nlcLoiMapSD.containsKey(warehouse.getId()))
|
272 |
if(!nlcLoiMapSD.containsKey(warehouse.getId()))
|
| 272 |
nlcLoiMapSD.put(warehouse.getId(), nlcLOISD);
|
273 |
nlcLoiMapSD.put(warehouse.getId(), nlcLOISD);
|
| 273 |
|
274 |
|
| 274 |
}
|
275 |
}
|
| 275 |
}
|
276 |
}
|
| Line 302... |
Line 303... |
| 302 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
303 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
| 303 |
nlcLOIFK.setVendorName(warehouse.getVendor().getName());
|
304 |
nlcLOIFK.setVendorName(warehouse.getVendor().getName());
|
| 304 |
nlcLOIFK.setVendorAvailability(available);
|
305 |
nlcLOIFK.setVendorAvailability(available);
|
| 305 |
nlcLOIFK.setVendorNlc(nlc);
|
306 |
nlcLOIFK.setVendorNlc(nlc);
|
| 306 |
nlcLOIFK.setVendorWarehouseId(warehouse.getId());
|
307 |
nlcLOIFK.setVendorWarehouseId(warehouse.getId());
|
| - |
|
308 |
nlcLOIFK.setWarehouseType(warehouse.getWarehouseType().toString());
|
| 307 |
if(!nlcLoiMapFK.containsKey(warehouse.getId()))
|
309 |
if(!nlcLoiMapFK.containsKey(warehouse.getId()))
|
| 308 |
nlcLoiMapFK.put(warehouse.getId(), nlcLOIFK);
|
310 |
nlcLoiMapFK.put(warehouse.getId(), nlcLOIFK);
|
| 309 |
}
|
311 |
}
|
| 310 |
}
|
312 |
}
|
| 311 |
}
|
313 |
}
|
| Line 365... |
Line 367... |
| 365 |
nlcLOISD.setOurNlc(maxnlcSD);
|
367 |
nlcLOISD.setOurNlc(maxnlcSD);
|
| 366 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
368 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
| 367 |
nlcLOISD.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
369 |
nlcLOISD.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
| 368 |
nlcLOISD.setVendorAvailability(available);
|
370 |
nlcLOISD.setVendorAvailability(available);
|
| 369 |
nlcLOISD.setVendorNlc(nlc);
|
371 |
nlcLOISD.setVendorNlc(nlc);
|
| - |
|
372 |
nlcLOISD.setVendorWarehouseId(entry.getKey());
|
| - |
|
373 |
nlcLOISD.setWarehouseType(allWarehousesMap.get(entry.getKey()).getWarehouseType().toString());
|
| 370 |
if(!nlcLoiMapSD.containsKey(entry.getKey()))
|
374 |
if(!nlcLoiMapSD.containsKey(entry.getKey()))
|
| 371 |
nlcLoiMapSD.put(entry.getKey(), nlcLOISD);
|
375 |
nlcLoiMapSD.put(entry.getKey(), nlcLOISD);
|
| 372 |
}
|
376 |
}
|
| 373 |
}
|
377 |
}
|
| 374 |
}
|
378 |
}
|
| Line 399... |
Line 403... |
| 399 |
nlcLOIFK.setOurNlc(maxnlcFK);
|
403 |
nlcLOIFK.setOurNlc(maxnlcFK);
|
| 400 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
404 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
| 401 |
nlcLOIFK.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
405 |
nlcLOIFK.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
| 402 |
nlcLOIFK.setVendorAvailability(available);
|
406 |
nlcLOIFK.setVendorAvailability(available);
|
| 403 |
nlcLOIFK.setVendorNlc(nlc);
|
407 |
nlcLOIFK.setVendorNlc(nlc);
|
| - |
|
408 |
nlcLOIFK.setVendorWarehouseId(entry.getKey());
|
| - |
|
409 |
nlcLOIFK.setWarehouseType(allWarehousesMap.get(entry.getKey()).getWarehouseType().toString());
|
| 404 |
if(!nlcLoiMapFK.containsKey(entry.getKey()))
|
410 |
if(!nlcLoiMapFK.containsKey(entry.getKey()))
|
| 405 |
nlcLoiMapFK.put(entry.getKey(), nlcLOIFK);
|
411 |
nlcLoiMapFK.put(entry.getKey(), nlcLOIFK);
|
| 406 |
}
|
412 |
}
|
| 407 |
}
|
413 |
}
|
| 408 |
}
|
414 |
}
|
| Line 618... |
Line 624... |
| 618 |
bufferedWriter.write(StringUtils.join(new String[] {
|
624 |
bufferedWriter.write(StringUtils.join(new String[] {
|
| 619 |
"ItemId",
|
625 |
"ItemId",
|
| 620 |
"Product Name",
|
626 |
"Product Name",
|
| 621 |
"SkuAtSource",
|
627 |
"SkuAtSource",
|
| 622 |
"Vendor Name",
|
628 |
"Vendor Name",
|
| - |
|
629 |
"Vendor Warehouse Id",
|
| - |
|
630 |
"Warehouse Type",
|
| 623 |
"Max Our NLC",
|
631 |
"Max Our NLC",
|
| 624 |
"Vendor NLC",
|
632 |
"Vendor NLC",
|
| 625 |
"Availability Count",
|
633 |
"Availability Count",
|
| 626 |
"Reserved Count",
|
634 |
"Reserved Count",
|
| 627 |
"Total Availabilty"
|
635 |
"Net Availabilty"
|
| 628 |
}, '\t'));
|
636 |
}, '\t'));
|
| 629 |
|
637 |
|
| 630 |
//System.out.println(fileName+ " Main Map Size "+nlcLeftoutInventoryItems.size());
|
638 |
//System.out.println(fileName+ " Main Map Size "+nlcLeftoutInventoryItems.size());
|
| 631 |
|
639 |
|
| 632 |
for(Map<Long, NlcLeftOutInventory> nlcLOImap : nlcLeftoutInventoryItems.values()){
|
640 |
for(Map<Long, NlcLeftOutInventory> nlcLOImap : nlcLeftoutInventoryItems.values()){
|
| Line 638... |
Line 646... |
| 638 |
new String[] {
|
646 |
new String[] {
|
| 639 |
String.valueOf(nlcLOI.getItemId()),
|
647 |
String.valueOf(nlcLOI.getItemId()),
|
| 640 |
nlcLOI.getProductName(),
|
648 |
nlcLOI.getProductName(),
|
| 641 |
nlcLOI.getSkuAtSource(),
|
649 |
nlcLOI.getSkuAtSource(),
|
| 642 |
nlcLOI.getVendorName(),
|
650 |
nlcLOI.getVendorName(),
|
| - |
|
651 |
String.valueOf(nlcLOI.getVendorWarehouseId()),
|
| - |
|
652 |
nlcLOI.getWarehouseType(),
|
| 643 |
String.valueOf(nlcLOI.getOurNlc()),
|
653 |
String.valueOf(nlcLOI.getOurNlc()),
|
| 644 |
String.valueOf(nlcLOI.getVendorNlc()),
|
654 |
String.valueOf(nlcLOI.getVendorNlc()),
|
| 645 |
String.valueOf(nlcLOI.getVendorAvailability()),
|
655 |
String.valueOf(nlcLOI.getVendorAvailability()),
|
| 646 |
String.valueOf(nlcLOI.getReserved()),
|
656 |
String.valueOf(nlcLOI.getReserved()),
|
| 647 |
String.valueOf(nlcLOI.getTotalAvailability())}, '\t'));
|
657 |
String.valueOf(nlcLOI.getTotalAvailability())}, '\t'));
|