| Line 63... |
Line 63... |
| 63 |
Long itemid = Long.parseLong(nextLine[11].replaceAll("FBA",""));
|
63 |
Long itemid = Long.parseLong(nextLine[11].replaceAll("FBA",""));
|
| 64 |
Integer qty = new Integer(nextLine[14]);
|
64 |
Integer qty = new Integer(nextLine[14]);
|
| 65 |
Float itemSale=null;
|
65 |
Float itemSale=null;
|
| 66 |
if(nextLine[16].length()!=0){
|
66 |
if(nextLine[16].length()!=0){
|
| 67 |
itemSale = new Float(nextLine[16]);
|
67 |
itemSale = new Float(nextLine[16]);
|
| - |
|
68 |
}
|
| - |
|
69 |
else{
|
| 68 |
continue;
|
70 |
continue;
|
| 69 |
}
|
71 |
}
|
| 70 |
System.out.println("Item Sale " + itemSale );
|
72 |
System.out.println("Item Sale " + itemSale );
|
| 71 |
Float itemDiscount;
|
73 |
Float itemDiscount;
|
| 72 |
if(nextLine[22].length()!=0){
|
74 |
if(nextLine[22].length()!=0){
|
| Line 77... |
Line 79... |
| 77 |
}
|
79 |
}
|
| 78 |
if(orderDateItemIdFbaSaleSnapshotMap.containsKey(date_key)){
|
80 |
if(orderDateItemIdFbaSaleSnapshotMap.containsKey(date_key)){
|
| 79 |
if(orderDateItemIdFbaSaleSnapshotMap.get(date_key).containsKey(itemid)){
|
81 |
if(orderDateItemIdFbaSaleSnapshotMap.get(date_key).containsKey(itemid)){
|
| 80 |
FbaSalesSnapshot fbaSalesSnapshot = orderDateItemIdFbaSaleSnapshotMap.get(date_key).get(itemid);
|
82 |
FbaSalesSnapshot fbaSalesSnapshot = orderDateItemIdFbaSaleSnapshotMap.get(date_key).get(itemid);
|
| 81 |
if(itemDiscount!=0){
|
83 |
if(itemDiscount!=0){
|
| 82 |
fbaSalesSnapshot.setPromotionOrderCount(qty);
|
84 |
fbaSalesSnapshot.setPromotionOrderCount(fbaSalesSnapshot.getPromotionOrderCount() + qty);
|
| 83 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.totalPromotionSale + (itemSale - itemDiscount));
|
85 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.getTotalPromotionSale() + (itemSale - itemDiscount));
|
| 84 |
}
|
- |
|
| 85 |
else{
|
- |
|
| 86 |
fbaSalesSnapshot.setPromotionOrderCount(0);
|
- |
|
| 87 |
fbaSalesSnapshot.setTotalPromotionSale((float) 0);
|
- |
|
| 88 |
}
|
86 |
}
|
| 89 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
87 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
| 90 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale);
|
88 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale);
|
| 91 |
orderDateItemIdFbaSaleSnapshotMap.get(date_key).put(itemid,fbaSalesSnapshot);
|
89 |
orderDateItemIdFbaSaleSnapshotMap.get(date_key).put(itemid,fbaSalesSnapshot);
|
| 92 |
}
|
90 |
}
|
| Line 201... |
Line 199... |
| 201 |
}
|
199 |
}
|
| 202 |
else{
|
200 |
else{
|
| 203 |
oos=false;
|
201 |
oos=false;
|
| 204 |
}
|
202 |
}
|
| 205 |
Long item_id = entry1.getKey();
|
203 |
Long item_id = entry1.getKey();
|
| 206 |
System.out.println(orderDate +","+entry1.getKey()+","+entry1.getValue()+","+ inventory +","+ oos+","+itemIdSalePriceMap.get(item_id)+","+itemIdminFBAPriceMap.get(item_id)+","+itemIdminMFNPriceMap.get(item_id));
|
204 |
System.out.println(orderDate +","+entry1.getKey().toString()+","+entry1.getValue()+","+ inventory +","+ oos+","+itemIdSalePriceMap.get(item_id)+","+itemIdminFBAPriceMap.get(item_id)+","+itemIdminMFNPriceMap.get(item_id));
|
| 207 |
AmazonFbaSalesSnapshot amazonfbasalessnapshot = new AmazonFbaSalesSnapshot();
|
205 |
AmazonFbaSalesSnapshot amazonfbasalessnapshot = new AmazonFbaSalesSnapshot();
|
| 208 |
amazonfbasalessnapshot.setDateOfSale(orderDate.getTime());
|
206 |
amazonfbasalessnapshot.setDateOfSale(orderDate.getTime());
|
| 209 |
amazonfbasalessnapshot.setItem_id(entry1.getKey());
|
207 |
amazonfbasalessnapshot.setItem_id(entry1.getKey());
|
| 210 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
208 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getPromotionOrderCount());
|
| 211 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|
209 |
amazonfbasalessnapshot.setTotalOrderCount(entry1.getValue().getTotalOrderCount());
|