| Line 318... |
Line 318... |
| 318 |
}
|
318 |
}
|
| 319 |
else{
|
319 |
else{
|
| 320 |
//System.out.println("Skipping Order not FBB or FBA" + amazonOrder.getAmazonOrderID()+" "+date_key+" "+ amazonOrder.getOrderItem().get(0).getSKU() +" " + amazonOrder.getOrderItem().get(0).getItemStatus() + " " + amazonOrder.getOrderItem().get(0).getQuantity());
|
320 |
//System.out.println("Skipping Order not FBB or FBA" + amazonOrder.getAmazonOrderID()+" "+date_key+" "+ amazonOrder.getOrderItem().get(0).getSKU() +" " + amazonOrder.getOrderItem().get(0).getItemStatus() + " " + amazonOrder.getOrderItem().get(0).getQuantity());
|
| 321 |
continue;
|
321 |
continue;
|
| 322 |
}
|
322 |
}
|
| 323 |
String asin = amazonOrder.getOrderItem().get(0).getASIN();
|
- |
|
| 324 |
Integer qty=0;
|
323 |
Integer qty=0;
|
| 325 |
if(amazonOrder.getOrderItem().get(0).getQuantity()!=0){
|
324 |
if(amazonOrder.getOrderItem().get(0).getQuantity()!=0){
|
| 326 |
qty = new Integer(amazonOrder.getOrderItem().get(0).getQuantity());
|
325 |
qty = new Integer(amazonOrder.getOrderItem().get(0).getQuantity());
|
| 327 |
}
|
326 |
}
|
| 328 |
Float itemSale = null;
|
327 |
Float itemSale = null;
|
| Line 367... |
Line 366... |
| 367 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.getTotalPromotionSale() + (itemSale - itemDiscount));
|
366 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.getTotalPromotionSale() + (itemSale - itemDiscount));
|
| 368 |
}
|
367 |
}
|
| 369 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
368 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
| 370 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
369 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
| 371 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale - itemDiscount);
|
370 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale - itemDiscount);
|
| 372 |
fbaSalesSnapshot.setAsin(asin);
|
- |
|
| 373 |
Map<String,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = orderDateItemIdFbaSaleSnapshotMap.get(date_key);
|
371 |
Map<String,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = orderDateItemIdFbaSaleSnapshotMap.get(date_key);
|
| 374 |
ItemIdFbaSaleSnapshotMap.put(amazonOrder.getOrderItem().get(0).getSKU(), fbaSalesSnapshot);
|
372 |
ItemIdFbaSaleSnapshotMap.put(amazonOrder.getOrderItem().get(0).getSKU(), fbaSalesSnapshot);
|
| 375 |
//System.out.println("Adding Order to list entry exists " + amazonOrder.getAmazonOrderID()+" "+date_key+" "+ amazonOrder.getOrderItem().get(0).getSKU() +" " + amazonOrder.getOrderItem().get(0).getItemStatus() + " " + amazonOrder.getOrderItem().get(0).getQuantity());
|
373 |
//System.out.println("Adding Order to list entry exists " + amazonOrder.getAmazonOrderID()+" "+date_key+" "+ amazonOrder.getOrderItem().get(0).getSKU() +" " + amazonOrder.getOrderItem().get(0).getItemStatus() + " " + amazonOrder.getOrderItem().get(0).getQuantity());
|
| 376 |
orderDateItemIdFbaSaleSnapshotMap.put(date_key,ItemIdFbaSaleSnapshotMap);
|
374 |
orderDateItemIdFbaSaleSnapshotMap.put(date_key,ItemIdFbaSaleSnapshotMap);
|
| 377 |
}
|
375 |
}
|
| 378 |
else{
|
376 |
else{
|
| 379 |
fbaSalesSnapshot = new FbaSalesSnapshot();
|
377 |
fbaSalesSnapshot = new FbaSalesSnapshot();
|
| 380 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
378 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
| 381 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
379 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
| 382 |
fbaSalesSnapshot.setTotalSale(itemSale - itemDiscount);
|
380 |
fbaSalesSnapshot.setTotalSale(itemSale - itemDiscount);
|
| 383 |
fbaSalesSnapshot.setAsin(asin);
|
- |
|
| 384 |
if(itemDiscount!=0){
|
381 |
if(itemDiscount!=0){
|
| 385 |
fbaSalesSnapshot.setPromotionOrderCount(qty);
|
382 |
fbaSalesSnapshot.setPromotionOrderCount(qty);
|
| 386 |
fbaSalesSnapshot.setTotalPromotionSale(itemSale - itemDiscount);
|
383 |
fbaSalesSnapshot.setTotalPromotionSale(itemSale - itemDiscount);
|
| 387 |
}
|
384 |
}
|
| 388 |
else{
|
385 |
else{
|
| Line 399... |
Line 396... |
| 399 |
Map<String,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = new HashMap<String,FbaSalesSnapshot>();
|
396 |
Map<String,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = new HashMap<String,FbaSalesSnapshot>();
|
| 400 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|
397 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|
| 401 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
398 |
fbaSalesSnapshot.setFcLocation(fcLocation);
|
| 402 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
399 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
| 403 |
fbaSalesSnapshot.setTotalSale(itemSale);
|
400 |
fbaSalesSnapshot.setTotalSale(itemSale);
|
| 404 |
fbaSalesSnapshot.setAsin(asin);
|
- |
|
| 405 |
if(itemDiscount!=0){
|
401 |
if(itemDiscount!=0){
|
| 406 |
fbaSalesSnapshot.setTotalPromotionSale(itemSale - itemDiscount);
|
402 |
fbaSalesSnapshot.setTotalPromotionSale(itemSale - itemDiscount);
|
| 407 |
fbaSalesSnapshot.setPromotionOrderCount(qty);
|
403 |
fbaSalesSnapshot.setPromotionOrderCount(qty);
|
| 408 |
}
|
404 |
}
|
| 409 |
else{
|
405 |
else{
|
| Line 660... |
Line 656... |
| 660 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
656 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
| 661 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|
657 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|
| 662 |
amazonfbasalessnapshot.setTotalSale(entry1.getValue().getTotalSale());
|
658 |
amazonfbasalessnapshot.setTotalSale(entry1.getValue().getTotalSale());
|
| 663 |
amazonfbasalessnapshot.setPromotionSale(entry1.getValue().getTotalPromotionSale());
|
659 |
amazonfbasalessnapshot.setPromotionSale(entry1.getValue().getTotalPromotionSale());
|
| 664 |
amazonfbasalessnapshot.setIsOutOfStock(oos);
|
660 |
amazonfbasalessnapshot.setIsOutOfStock(oos);
|
| 665 |
amazonfbasalessnapshot.setAsin(entry1.getValue().getAsin());
|
- |
|
| 666 |
if(itemIdSalePriceMap.containsKey(item_id) && itemIdSalePriceMap.get(item_id).getPrice()!=0){
|
661 |
if(itemIdSalePriceMap.containsKey(item_id) && itemIdSalePriceMap.get(item_id).getPrice()!=0){
|
| 667 |
amazonfbasalessnapshot.setSalePrice(itemIdSalePriceMap.get(item_id).getPrice());
|
662 |
amazonfbasalessnapshot.setSalePrice(itemIdSalePriceMap.get(item_id).getPrice());
|
| 668 |
amazonfbasalessnapshot.setSalePriceSnapshotDate(itemIdSalePriceMap.get(item_id).getDate().getTime());
|
663 |
amazonfbasalessnapshot.setSalePriceSnapshotDate(itemIdSalePriceMap.get(item_id).getDate().getTime());
|
| 669 |
}
|
664 |
}
|
| 670 |
else{
|
665 |
else{
|