| Line 180... |
Line 180... |
| 180 |
long total_held=0;*/
|
180 |
long total_held=0;*/
|
| 181 |
double nlc=0;
|
181 |
double nlc=0;
|
| 182 |
double maxnlcSD=0;
|
182 |
double maxnlcSD=0;
|
| 183 |
double maxnlcFK=0;
|
183 |
double maxnlcFK=0;
|
| 184 |
|
184 |
|
| 185 |
Map<String, Set<NlcLeftOutInventory>> snapdealLeftInvDataMap = new HashMap<String, Set<NlcLeftOutInventory>>();
|
185 |
Map<String, Map<Long, NlcLeftOutInventory>> snapdealLeftInvDataMap = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
| 186 |
Map<String, Set<NlcLeftOutInventory>> flipkartLeftInvDataMap = new HashMap<String, Set<NlcLeftOutInventory>>();
|
186 |
Map<String, Map<Long, NlcLeftOutInventory>> flipkartLeftInvDataMap = new HashMap<String, Map<Long, NlcLeftOutInventory>>();
|
| 187 |
|
187 |
|
| 188 |
|
188 |
|
| 189 |
for(Item thriftItem : aliveItems){
|
189 |
for(Item thriftItem : aliveItems){
|
| 190 |
SnapdealItemDetails snapdealItem = null;
|
190 |
SnapdealItemDetails snapdealItem = null;
|
| 191 |
FlipkartItem flipkartItem = null;
|
191 |
FlipkartItem flipkartItem = null;
|
| 192 |
NlcLeftOutInventory nlcLOISD;
|
192 |
NlcLeftOutInventory nlcLOISD;
|
| 193 |
NlcLeftOutInventory nlcLOIFK;
|
193 |
NlcLeftOutInventory nlcLOIFK;
|
| 194 |
maxnlcSD=0;
|
194 |
maxnlcSD=0;
|
| 195 |
maxnlcFK=0;
|
195 |
maxnlcFK=0;
|
| - |
|
196 |
Map<Long, NlcLeftOutInventory> nlcLoiMapSD = new HashMap<Long, NlcLeftOutInventory>();
|
| - |
|
197 |
Map<Long, NlcLeftOutInventory> nlcLoiMapFK = new HashMap<Long, NlcLeftOutInventory>();
|
| 196 |
Set<NlcLeftOutInventory> nlcLoiSetSD = new HashSet<NlcLeftOutInventory>();
|
198 |
Set<NlcLeftOutInventory> nlcLoiSetSD = new HashSet<NlcLeftOutInventory>();
|
| 197 |
Set<NlcLeftOutInventory> nlcLoiSetFK = new HashSet<NlcLeftOutInventory>();
|
199 |
Set<NlcLeftOutInventory> nlcLoiSetFK = new HashSet<NlcLeftOutInventory>();
|
| 198 |
if(snapdealItemMap.containsKey(thriftItem.getId())){
|
200 |
if(snapdealItemMap.containsKey(thriftItem.getId())){
|
| 199 |
snapdealItem = snapdealItemMap.get(thriftItem.getId());
|
201 |
snapdealItem = snapdealItemMap.get(thriftItem.getId());
|
| 200 |
maxnlcSD = snapdealItem.getMaxNlc();
|
202 |
maxnlcSD = snapdealItem.getMaxNlc();
|
| Line 264... |
Line 266... |
| 264 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
266 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
| 265 |
nlcLOISD.setVendorName(warehouse.getVendor().getName());
|
267 |
nlcLOISD.setVendorName(warehouse.getVendor().getName());
|
| 266 |
nlcLOISD.setVendorAvailability(available);
|
268 |
nlcLOISD.setVendorAvailability(available);
|
| 267 |
nlcLOISD.setVendorNlc(nlc);
|
269 |
nlcLOISD.setVendorNlc(nlc);
|
| 268 |
nlcLOISD.setVendorWarehouseId(warehouse.getId());
|
270 |
nlcLOISD.setVendorWarehouseId(warehouse.getId());
|
| - |
|
271 |
if(!nlcLoiMapSD.containsKey(warehouse.getId()))
|
| 269 |
nlcLoiSetSD.add(nlcLOISD);
|
272 |
nlcLoiMapSD.put(warehouse.getId(), nlcLOISD);
|
| 270 |
|
273 |
|
| 271 |
}
|
274 |
}
|
| 272 |
}
|
275 |
}
|
| 273 |
}
|
276 |
}
|
| 274 |
|
277 |
|
| Line 299... |
Line 302... |
| 299 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
302 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
| 300 |
nlcLOIFK.setVendorName(warehouse.getVendor().getName());
|
303 |
nlcLOIFK.setVendorName(warehouse.getVendor().getName());
|
| 301 |
nlcLOIFK.setVendorAvailability(available);
|
304 |
nlcLOIFK.setVendorAvailability(available);
|
| 302 |
nlcLOIFK.setVendorNlc(nlc);
|
305 |
nlcLOIFK.setVendorNlc(nlc);
|
| 303 |
nlcLOIFK.setVendorWarehouseId(warehouse.getId());
|
306 |
nlcLOIFK.setVendorWarehouseId(warehouse.getId());
|
| - |
|
307 |
if(!nlcLoiMapFK.containsKey(warehouse.getId()))
|
| 304 |
nlcLoiSetFK.add(nlcLOIFK);
|
308 |
nlcLoiMapFK.put(warehouse.getId(), nlcLOIFK);
|
| 305 |
}
|
309 |
}
|
| 306 |
}
|
310 |
}
|
| 307 |
}
|
311 |
}
|
| 308 |
//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + warehouse.getId() );
|
312 |
//System.out.println("itemId:" + thriftItem.getId() + "\tmaxnlc: " + maxnlc + "\tnlc:" + nlc + "\twid:" + warehouse.getId() );
|
| 309 |
|
313 |
|
| 310 |
}
|
314 |
}
|
| 311 |
}
|
315 |
}
|
| 312 |
if(nlcLoiSetSD!=null && nlcLoiSetSD.size()>0){
|
316 |
if(nlcLoiMapSD!=null && nlcLoiMapSD.size()>0){
|
| 313 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiSetSD);
|
317 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiMapSD);
|
| 314 |
}
|
318 |
}
|
| 315 |
if(nlcLoiSetFK!=null && nlcLoiSetFK.size()>0){
|
319 |
if(nlcLoiMapFK!=null && nlcLoiMapFK.size()>0){
|
| 316 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiSetFK);
|
320 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiMapFK);
|
| 317 |
}
|
321 |
}
|
| 318 |
}
|
322 |
}
|
| 319 |
else{
|
323 |
else{
|
| 320 |
for (Map.Entry<Long,Long> entry : itemavailability.entrySet()) {
|
324 |
for (Map.Entry<Long,Long> entry : itemavailability.entrySet()) {
|
| 321 |
if(allWarehousesMap.get(entry.getKey()).getBillingWarehouseId()!=7){
|
325 |
if(allWarehousesMap.get(entry.getKey()).getBillingWarehouseId()!=7){
|
| Line 361... |
Line 365... |
| 361 |
nlcLOISD.setOurNlc(maxnlcSD);
|
365 |
nlcLOISD.setOurNlc(maxnlcSD);
|
| 362 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
366 |
nlcLOISD.setSkuAtSource(snapdealItem.getSkuAtSnapdeal());
|
| 363 |
nlcLOISD.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
367 |
nlcLOISD.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
| 364 |
nlcLOISD.setVendorAvailability(available);
|
368 |
nlcLOISD.setVendorAvailability(available);
|
| 365 |
nlcLOISD.setVendorNlc(nlc);
|
369 |
nlcLOISD.setVendorNlc(nlc);
|
| - |
|
370 |
if(!nlcLoiMapSD.containsKey(entry.getKey()))
|
| 366 |
nlcLoiSetSD.add(nlcLOISD);
|
371 |
nlcLoiMapSD.put(entry.getKey(), nlcLOISD);
|
| 367 |
}
|
372 |
}
|
| 368 |
}
|
373 |
}
|
| 369 |
}
|
374 |
}
|
| 370 |
|
375 |
|
| 371 |
if(flipkartItem!=null){
|
376 |
if(flipkartItem!=null){
|
| Line 394... |
Line 399... |
| 394 |
nlcLOIFK.setOurNlc(maxnlcFK);
|
399 |
nlcLOIFK.setOurNlc(maxnlcFK);
|
| 395 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
400 |
nlcLOIFK.setSkuAtSource(flipkartItem.getSkuAtFlipkart());
|
| 396 |
nlcLOIFK.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
401 |
nlcLOIFK.setVendorName(vendorDataMap.get(allWarehousesMap.get(entry.getKey()).getVendor().getId()));
|
| 397 |
nlcLOIFK.setVendorAvailability(available);
|
402 |
nlcLOIFK.setVendorAvailability(available);
|
| 398 |
nlcLOIFK.setVendorNlc(nlc);
|
403 |
nlcLOIFK.setVendorNlc(nlc);
|
| - |
|
404 |
if(!nlcLoiMapFK.containsKey(entry.getKey()))
|
| 399 |
nlcLoiSetFK.add(nlcLOIFK);
|
405 |
nlcLoiMapFK.put(entry.getKey(), nlcLOIFK);
|
| 400 |
}
|
406 |
}
|
| 401 |
}
|
407 |
}
|
| 402 |
}
|
408 |
}
|
| 403 |
|
409 |
|
| 404 |
|
410 |
|
| 405 |
}
|
411 |
}
|
| 406 |
}
|
412 |
}
|
| 407 |
if(nlcLoiSetSD!=null && nlcLoiSetSD.size()>0){
|
413 |
if(nlcLoiMapSD!=null && nlcLoiMapSD.size()>0){
|
| 408 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiSetSD);
|
414 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiMapSD);
|
| 409 |
}
|
415 |
}
|
| 410 |
if(nlcLoiSetFK!=null && nlcLoiSetFK.size()>0){
|
416 |
if(nlcLoiMapFK!=null && nlcLoiMapFK.size()>0){
|
| 411 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiSetFK);
|
417 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiMapFK);
|
| 412 |
}
|
418 |
}
|
| 413 |
}
|
419 |
}
|
| 414 |
|
420 |
|
| 415 |
Map<Long,Long> itemreserve = new HashMap<Long,Long>();
|
421 |
Map<Long,Long> itemreserve = new HashMap<Long,Long>();
|
| 416 |
itemreserve = iteminventory.getReserved();
|
422 |
itemreserve = iteminventory.getReserved();
|
| Line 443... |
Line 449... |
| 443 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
449 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
| 444 |
//continue;
|
450 |
//continue;
|
| 445 |
}
|
451 |
}
|
| 446 |
else{
|
452 |
else{
|
| 447 |
if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal())){
|
453 |
if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal())){
|
| 448 |
Set<NlcLeftOutInventory> newNlcObjSet = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal());
|
454 |
Map<Long, NlcLeftOutInventory> newNlcObjMap = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal());
|
| 449 |
Iterator<NlcLeftOutInventory> it = newNlcObjSet.iterator();
|
455 |
if(newNlcObjMap.containsKey(warehouse.getId())){
|
| 450 |
int i=0;
|
- |
|
| 451 |
while(it.hasNext()){
|
- |
|
| 452 |
NlcLeftOutInventory newObj = it.next();
|
456 |
NlcLeftOutInventory newObj = newNlcObjMap.get(warehouse.getId());
|
| 453 |
if(newObj.getVendorWarehouseId()==warehouse.getId()){
|
- |
|
| 454 |
newObj.setReserved(itemreserve.get(warehouse.getId()));
|
457 |
newObj.setReserved(itemreserve.get(warehouse.getId()));
|
| 455 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(warehouse.getId()));
|
458 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(warehouse.getId()));
|
| 456 |
newNlcObjSet.remove(i);
|
459 |
newNlcObjMap.remove(warehouse.getId());
|
| 457 |
newNlcObjSet.add(newObj);
|
460 |
newNlcObjMap.put(warehouse.getId(), newObj);
|
| - |
|
461 |
|
| 458 |
}
|
462 |
}
|
| 459 |
i++;
|
- |
|
| 460 |
}
|
- |
|
| 461 |
|
- |
|
| 462 |
nlcLoiSetSD = newNlcObjSet;
|
463 |
nlcLoiMapSD = newNlcObjMap;
|
| 463 |
}
|
464 |
}
|
| 464 |
}
|
465 |
}
|
| 465 |
}
|
466 |
}
|
| 466 |
|
467 |
|
| 467 |
if(flipkartItem!=null){
|
468 |
if(flipkartItem!=null){
|
| Line 475... |
Line 476... |
| 475 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
476 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
| 476 |
//continue;
|
477 |
//continue;
|
| 477 |
}
|
478 |
}
|
| 478 |
else{
|
479 |
else{
|
| 479 |
if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart())){
|
480 |
if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart())){
|
| 480 |
Set<NlcLeftOutInventory> newNlcObjSet = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart());
|
481 |
Map<Long, NlcLeftOutInventory> newNlcObjMap = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart());
|
| 481 |
Iterator<NlcLeftOutInventory> it = newNlcObjSet.iterator();
|
482 |
if(newNlcObjMap.containsKey(warehouse.getId())){
|
| 482 |
int i=0;
|
- |
|
| 483 |
while(it.hasNext()){
|
- |
|
| 484 |
NlcLeftOutInventory newObj = it.next();
|
483 |
NlcLeftOutInventory newObj = newNlcObjMap.get(warehouse.getId());
|
| 485 |
if(newObj.getVendorWarehouseId()==warehouse.getId()){
|
- |
|
| 486 |
newObj.setReserved(itemreserve.get(warehouse.getId()));
|
484 |
newObj.setReserved(itemreserve.get(warehouse.getId()));
|
| 487 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(warehouse.getId()));
|
485 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(warehouse.getId()));
|
| 488 |
newNlcObjSet.remove(i);
|
486 |
newNlcObjMap.remove(warehouse.getId());
|
| 489 |
newNlcObjSet.add(newObj);
|
487 |
newNlcObjMap.put(warehouse.getId(), newObj);
|
| - |
|
488 |
|
| 490 |
}
|
489 |
}
|
| 491 |
i++;
|
- |
|
| 492 |
}
|
- |
|
| 493 |
|
- |
|
| 494 |
nlcLoiSetFK = newNlcObjSet;
|
490 |
nlcLoiMapFK = newNlcObjMap;
|
| 495 |
}
|
491 |
}
|
| 496 |
}
|
492 |
}
|
| 497 |
}
|
493 |
}
|
| 498 |
|
494 |
|
| 499 |
|
495 |
|
| 500 |
}
|
496 |
}
|
| 501 |
}
|
497 |
}
|
| 502 |
|
498 |
|
| 503 |
if(nlcLoiSetSD!=null && nlcLoiSetSD.size()>0){
|
499 |
if(nlcLoiMapSD!=null && nlcLoiMapSD.size()>0){
|
| 504 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiSetSD);
|
500 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiMapSD);
|
| 505 |
}
|
501 |
}
|
| 506 |
if(nlcLoiSetFK!=null && nlcLoiSetFK.size()>0){
|
502 |
if(nlcLoiMapFK!=null && nlcLoiMapFK.size()>0){
|
| 507 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiSetFK);
|
503 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiMapFK);
|
| 508 |
}
|
504 |
}
|
| 509 |
|
505 |
|
| 510 |
}else{
|
506 |
}else{
|
| 511 |
for (Map.Entry<Long,Long> entry : itemreserve.entrySet()) {
|
507 |
for (Map.Entry<Long,Long> entry : itemreserve.entrySet()) {
|
| 512 |
if(allWarehousesMap.get(entry.getKey()).getBillingWarehouseId()!=7){
|
508 |
if(allWarehousesMap.get(entry.getKey()).getBillingWarehouseId()!=7){
|
| Line 534... |
Line 530... |
| 534 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
530 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
| 535 |
//continue;
|
531 |
//continue;
|
| 536 |
}
|
532 |
}
|
| 537 |
else{
|
533 |
else{
|
| 538 |
if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal())){
|
534 |
if(snapdealLeftInvDataMap.containsKey(snapdealItem.getSkuAtSnapdeal())){
|
| 539 |
Set<NlcLeftOutInventory> newNlcObjSet = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal());
|
535 |
Map<Long, NlcLeftOutInventory> newNlcObjMap = snapdealLeftInvDataMap.get(snapdealItem.getSkuAtSnapdeal());
|
| 540 |
Iterator<NlcLeftOutInventory> it = newNlcObjSet.iterator();
|
536 |
if(newNlcObjMap.containsKey(entry.getKey())){
|
| 541 |
int i=0;
|
- |
|
| 542 |
while(it.hasNext()){
|
- |
|
| 543 |
NlcLeftOutInventory newObj = it.next();
|
537 |
NlcLeftOutInventory newObj = newNlcObjMap.get(entry.getKey());
|
| 544 |
if(newObj.getVendorWarehouseId()==entry.getKey()){
|
- |
|
| 545 |
newObj.setReserved(itemreserve.get(entry.getKey()));
|
538 |
newObj.setReserved(itemreserve.get(entry.getKey()));
|
| 546 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(entry.getKey()));
|
539 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(entry.getKey()));
|
| 547 |
newNlcObjSet.remove(i);
|
540 |
newNlcObjMap.remove(entry.getKey());
|
| 548 |
newNlcObjSet.add(newObj);
|
541 |
newNlcObjMap.put(entry.getKey(), newObj);
|
| - |
|
542 |
|
| 549 |
}
|
543 |
}
|
| 550 |
i++;
|
- |
|
| 551 |
}
|
- |
|
| 552 |
|
- |
|
| 553 |
nlcLoiSetSD = newNlcObjSet;
|
544 |
nlcLoiMapSD = newNlcObjMap;
|
| 554 |
}
|
545 |
}
|
| 555 |
}
|
546 |
}
|
| 556 |
}
|
547 |
}
|
| 557 |
if(flipkartItem!=null){
|
548 |
if(flipkartItem!=null){
|
| 558 |
if(nlc !=0 && (maxnlcFK >= nlc)){
|
549 |
if(nlc !=0 && (maxnlcFK >= nlc)){
|
| Line 565... |
Line 556... |
| 565 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
556 |
//System.out.println("itemId:" + thriftItem.getId() + "\ttotal_held: " + total_held + "\theldForSource:" + heldForSource + "\treserve:" + reserve);
|
| 566 |
//continue;
|
557 |
//continue;
|
| 567 |
}
|
558 |
}
|
| 568 |
else{
|
559 |
else{
|
| 569 |
if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart())){
|
560 |
if(flipkartLeftInvDataMap.containsKey(flipkartItem.getSkuAtFlipkart())){
|
| 570 |
Set<NlcLeftOutInventory> newNlcObjSet = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart());
|
561 |
Map<Long, NlcLeftOutInventory> newNlcObjMap = flipkartLeftInvDataMap.get(flipkartItem.getSkuAtFlipkart());
|
| 571 |
Iterator<NlcLeftOutInventory> it = newNlcObjSet.iterator();
|
562 |
if(newNlcObjMap.containsKey(entry.getKey())){
|
| 572 |
int i=0;
|
- |
|
| 573 |
while(it.hasNext()){
|
- |
|
| 574 |
NlcLeftOutInventory newObj = it.next();
|
563 |
NlcLeftOutInventory newObj = newNlcObjMap.get(entry.getKey());
|
| 575 |
if(newObj.getVendorWarehouseId()==entry.getKey()){
|
- |
|
| 576 |
newObj.setReserved(itemreserve.get(entry.getKey()));
|
564 |
newObj.setReserved(itemreserve.get(entry.getKey()));
|
| 577 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(entry.getKey()));
|
565 |
newObj.setTotalAvailability(newObj.getVendorAvailability()-itemreserve.get(entry.getKey()));
|
| 578 |
newNlcObjSet.remove(i);
|
566 |
newNlcObjMap.remove(entry.getKey());
|
| 579 |
newNlcObjSet.add(newObj);
|
567 |
newNlcObjMap.put(entry.getKey(), newObj);
|
| - |
|
568 |
|
| 580 |
}
|
569 |
}
|
| 581 |
i++;
|
- |
|
| 582 |
}
|
- |
|
| 583 |
|
- |
|
| 584 |
nlcLoiSetFK = newNlcObjSet;
|
570 |
nlcLoiMapFK = newNlcObjMap;
|
| 585 |
}
|
571 |
}
|
| 586 |
}
|
572 |
}
|
| 587 |
}
|
573 |
}
|
| 588 |
|
574 |
|
| 589 |
}
|
575 |
}
|
| Line 591... |
Line 577... |
| 591 |
else{
|
577 |
else{
|
| 592 |
//System.out.println("skipping inventory for warehouse id " + entry.getKey());
|
578 |
//System.out.println("skipping inventory for warehouse id " + entry.getKey());
|
| 593 |
}
|
579 |
}
|
| 594 |
}
|
580 |
}
|
| 595 |
|
581 |
|
| 596 |
if(nlcLoiSetSD!=null && nlcLoiSetSD.size()>0){
|
582 |
if(nlcLoiMapSD!=null && nlcLoiMapSD.size()>0){
|
| 597 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiSetSD);
|
583 |
snapdealLeftInvDataMap.put(snapdealItem.getSkuAtSnapdeal(), nlcLoiMapSD);
|
| 598 |
}
|
584 |
}
|
| 599 |
if(nlcLoiSetFK!=null && nlcLoiSetFK.size()>0){
|
585 |
if(nlcLoiMapFK!=null && nlcLoiMapFK.size()>0){
|
| 600 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiSetFK);
|
586 |
flipkartLeftInvDataMap.put(flipkartItem.getSkuAtFlipkart(), nlcLoiMapFK);
|
| 601 |
}
|
587 |
}
|
| 602 |
}
|
588 |
}
|
| 603 |
|
589 |
|
| 604 |
|
590 |
|
| 605 |
}
|
591 |
}
|
| 606 |
|
592 |
|
| 607 |
for (Map.Entry<String,Set<NlcLeftOutInventory>> entry : snapdealLeftInvDataMap.entrySet()){
|
593 |
for (Map.Entry<String,Map<Long, NlcLeftOutInventory>> entry : snapdealLeftInvDataMap.entrySet()){
|
| 608 |
for(NlcLeftOutInventory nlcLOI : entry.getValue()){
|
594 |
for(NlcLeftOutInventory nlcLOI : entry.getValue().values()){
|
| 609 |
nlcLeftOutInventoryItemsSD.add(nlcLOI);
|
595 |
nlcLeftOutInventoryItemsSD.add(nlcLOI);
|
| 610 |
}
|
596 |
}
|
| 611 |
}
|
597 |
}
|
| 612 |
for (Map.Entry<String,Set<NlcLeftOutInventory>> entry : flipkartLeftInvDataMap.entrySet()){
|
598 |
for (Map.Entry<String,Map<Long, NlcLeftOutInventory>> entry : flipkartLeftInvDataMap.entrySet()){
|
| 613 |
for(NlcLeftOutInventory nlcLOI : entry.getValue()){
|
599 |
for(NlcLeftOutInventory nlcLOI : entry.getValue().values()){
|
| 614 |
nlcLeftOutInventoryItemsFK.add(nlcLOI);
|
600 |
nlcLeftOutInventoryItemsFK.add(nlcLOI);
|
| 615 |
}
|
601 |
}
|
| 616 |
}
|
602 |
}
|
| 617 |
|
603 |
|
| 618 |
}
|
604 |
}
|