| Line 85... |
Line 85... |
| 85 |
itemSale = (float) 0;
|
85 |
itemSale = (float) 0;
|
| 86 |
itemDiscount = (float) 0;
|
86 |
itemDiscount = (float) 0;
|
| 87 |
qty = 0;
|
87 |
qty = 0;
|
| 88 |
}
|
88 |
}
|
| 89 |
if(orderDateItemIdFbaSaleSnapshotMap.containsKey(date_key)){
|
89 |
if(orderDateItemIdFbaSaleSnapshotMap.containsKey(date_key)){
|
| - |
|
90 |
Map<Long,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap;
|
| 90 |
if(orderDateItemIdFbaSaleSnapshotMap.get(date_key).containsKey(itemid)){
|
91 |
if(orderDateItemIdFbaSaleSnapshotMap.get(date_key).containsKey(itemid)){
|
| 91 |
FbaSalesSnapshot fbaSalesSnapshot = orderDateItemIdFbaSaleSnapshotMap.get(date_key).get(itemid);
|
92 |
FbaSalesSnapshot fbaSalesSnapshot = orderDateItemIdFbaSaleSnapshotMap.get(date_key).get(itemid);
|
| 92 |
if(itemDiscount!=0){
|
93 |
if(itemDiscount!=0){
|
| 93 |
fbaSalesSnapshot.setPromotionOrderCount(fbaSalesSnapshot.getPromotionOrderCount()+qty);
|
94 |
fbaSalesSnapshot.setPromotionOrderCount(fbaSalesSnapshot.getPromotionOrderCount()+qty);
|
| 94 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.getTotalPromotionSale() + (itemSale - itemDiscount));
|
95 |
fbaSalesSnapshot.setTotalPromotionSale(fbaSalesSnapshot.getTotalPromotionSale() + (itemSale - itemDiscount));
|
| 95 |
}
|
96 |
}
|
| 96 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
97 |
fbaSalesSnapshot.setTotalOrderCount(fbaSalesSnapshot.getTotalOrderCount() + qty);
|
| 97 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale - itemDiscount);
|
98 |
fbaSalesSnapshot.setTotalSale(fbaSalesSnapshot.getTotalSale() + itemSale - itemDiscount);
|
| - |
|
99 |
ItemIdFbaSaleSnapshotMap = orderDateItemIdFbaSaleSnapshotMap.get(date_key);
|
| - |
|
100 |
ItemIdFbaSaleSnapshotMap.put(itemid,fbaSalesSnapshot);
|
| 98 |
orderDateItemIdFbaSaleSnapshotMap.get(date_key).put(itemid,fbaSalesSnapshot);
|
101 |
orderDateItemIdFbaSaleSnapshotMap.put(date_key,ItemIdFbaSaleSnapshotMap);
|
| 99 |
}
|
102 |
}
|
| 100 |
else{
|
103 |
else{
|
| 101 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|
104 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|
| 102 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
105 |
fbaSalesSnapshot.setTotalOrderCount(qty);
|
| 103 |
fbaSalesSnapshot.setTotalSale(itemSale - itemDiscount);
|
106 |
fbaSalesSnapshot.setTotalSale(itemSale - itemDiscount);
|
| Line 107... |
Line 110... |
| 107 |
}
|
110 |
}
|
| 108 |
else{
|
111 |
else{
|
| 109 |
fbaSalesSnapshot.setPromotionOrderCount(0);
|
112 |
fbaSalesSnapshot.setPromotionOrderCount(0);
|
| 110 |
fbaSalesSnapshot.setTotalPromotionSale((float) 0);
|
113 |
fbaSalesSnapshot.setTotalPromotionSale((float) 0);
|
| 111 |
}
|
114 |
}
|
| - |
|
115 |
ItemIdFbaSaleSnapshotMap = orderDateItemIdFbaSaleSnapshotMap.get(date_key);
|
| - |
|
116 |
ItemIdFbaSaleSnapshotMap.put(itemid,fbaSalesSnapshot);
|
| 112 |
orderDateItemIdFbaSaleSnapshotMap.get(date_key).put(itemid,fbaSalesSnapshot);
|
117 |
orderDateItemIdFbaSaleSnapshotMap.put(date_key,ItemIdFbaSaleSnapshotMap);
|
| 113 |
}
|
118 |
}
|
| 114 |
}
|
119 |
}
|
| 115 |
else{
|
120 |
else{
|
| 116 |
Map<Long,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = new HashMap<Long,FbaSalesSnapshot>();
|
121 |
Map<Long,FbaSalesSnapshot> ItemIdFbaSaleSnapshotMap = new HashMap<Long,FbaSalesSnapshot>();
|
| 117 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|
122 |
FbaSalesSnapshot fbaSalesSnapshot = new FbaSalesSnapshot();
|