| Line 168... |
Line 168... |
| 168 |
}
|
168 |
}
|
| 169 |
}
|
169 |
}
|
| 170 |
else{
|
170 |
else{
|
| 171 |
System.out.println("No inventory in FBA");
|
171 |
System.out.println("No inventory in FBA");
|
| 172 |
}
|
172 |
}
|
| - |
|
173 |
Map<Long,Double> itemIdOurPriceMap = new HashMap<Long,Double>();
|
| 173 |
Map<Long,Double> itemIdSalePriceMap = new HashMap<Long,Double>();
|
174 |
Map<Long,Double> itemIdSalePriceMap = new HashMap<Long,Double>();
|
| 174 |
Map<Long,Double> itemIdminFBAPriceMap = new HashMap<Long,Double>();
|
175 |
Map<Long,Double> itemIdminFBAPriceMap = new HashMap<Long,Double>();
|
| 175 |
Map<Long,Double> itemIdminMFNPriceMap = new HashMap<Long,Double>();
|
176 |
Map<Long,Double> itemIdminMFNPriceMap = new HashMap<Long,Double>();
|
| 176 |
count=1;
|
177 |
count=1;
|
| 177 |
while ((nextLine = inventoryhealthreportreader.readNext()) != null ) {
|
178 |
while ((nextLine = inventoryhealthreportreader.readNext()) != null ) {
|
| 178 |
if(count!=1){
|
179 |
if(count!=1){
|
| 179 |
//System.out.println(nextLine[1] +" "+ nextLine[31] +" " + nextLine[32] + " " + nextLine[34]);
|
180 |
//System.out.println(nextLine[1] +" "+ nextLine[31] +" " + nextLine[32] + " " + nextLine[34]);
|
| 180 |
Long item_id = Long.parseLong(nextLine[1].replaceAll("FBA",""));
|
181 |
Long item_id = Long.parseLong(nextLine[1].replaceAll("FBA",""));
|
| - |
|
182 |
Double ourPrice = Double.parseDouble(nextLine[30]);
|
| 181 |
Double salePrice = Double.parseDouble(nextLine[31]);
|
183 |
Double salePrice = Double.parseDouble(nextLine[31]);
|
| 182 |
Double minFBAPrice = Double.parseDouble(nextLine[32]);
|
184 |
Double minFBAPrice = Double.parseDouble(nextLine[32]);
|
| 183 |
Double minMFNPrice = Double.parseDouble(nextLine[34]);
|
185 |
Double minMFNPrice = Double.parseDouble(nextLine[34]);
|
| - |
|
186 |
itemIdOurPriceMap.put(item_id,ourPrice);
|
| 184 |
itemIdSalePriceMap.put(item_id,salePrice);
|
187 |
itemIdSalePriceMap.put(item_id,salePrice);
|
| 185 |
itemIdminFBAPriceMap.put(item_id,minFBAPrice);
|
188 |
itemIdminFBAPriceMap.put(item_id,minFBAPrice);
|
| 186 |
itemIdminMFNPriceMap.put(item_id,minMFNPrice);
|
189 |
itemIdminMFNPriceMap.put(item_id,minMFNPrice);
|
| 187 |
}
|
190 |
}
|
| 188 |
count++;
|
191 |
count++;
|
| Line 231... |
Line 234... |
| 231 |
amazonfbasalessnapshot.setMinMfnPrice(itemIdminMFNPriceMap.get(item_id));
|
234 |
amazonfbasalessnapshot.setMinMfnPrice(itemIdminMFNPriceMap.get(item_id));
|
| 232 |
}
|
235 |
}
|
| 233 |
else{
|
236 |
else{
|
| 234 |
amazonfbasalessnapshot.setMinMfnPrice(0.0);
|
237 |
amazonfbasalessnapshot.setMinMfnPrice(0.0);
|
| 235 |
}
|
238 |
}
|
| - |
|
239 |
if(itemIdOurPriceMap.containsKey(item_id) && itemIdOurPriceMap.get(item_id)!=0){
|
| - |
|
240 |
amazonfbasalessnapshot.setOurPrice(itemIdOurPriceMap.get(item_id));
|
| - |
|
241 |
}
|
| - |
|
242 |
else{
|
| - |
|
243 |
amazonfbasalessnapshot.setOurPrice(itemIdOurPriceMap.get(item_id));
|
| - |
|
244 |
}
|
| 236 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
245 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
| 237 |
transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
|
246 |
transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
|
| 238 |
}
|
247 |
}
|
| 239 |
}
|
248 |
}
|
| 240 |
} catch (IOException e) {
|
249 |
} catch (IOException e) {
|