| Line 355... |
Line 355... |
| 355 |
}
|
355 |
}
|
| 356 |
}
|
356 |
}
|
| 357 |
else{
|
357 |
else{
|
| 358 |
System.out.println("No inventory in FBA");
|
358 |
System.out.println("No inventory in FBA");
|
| 359 |
}
|
359 |
}
|
| - |
|
360 |
Map<Long,Double> itemIdOurPriceMap = new HashMap<Long,Double>();
|
| 360 |
Map<Long,Double> itemIdSalePriceMap = new HashMap<Long,Double>();
|
361 |
Map<Long,Double> itemIdSalePriceMap = new HashMap<Long,Double>();
|
| 361 |
Map<Long,Double> itemIdminFBAPriceMap = new HashMap<Long,Double>();
|
362 |
Map<Long,Double> itemIdminFBAPriceMap = new HashMap<Long,Double>();
|
| 362 |
Map<Long,Double> itemIdminMFNPriceMap = new HashMap<Long,Double>();
|
363 |
Map<Long,Double> itemIdminMFNPriceMap = new HashMap<Long,Double>();
|
| 363 |
count=1;
|
364 |
count=1;
|
| 364 |
while ((nextLine = inventoryhealthreportreader.readNext()) != null ) {
|
365 |
while ((nextLine = inventoryhealthreportreader.readNext()) != null ) {
|
| 365 |
if(count!=1){
|
366 |
if(count!=1){
|
| 366 |
//System.out.println(nextLine[1] +" "+ nextLine[31] +" " + nextLine[32] + " " + nextLine[34]);
|
367 |
//System.out.println(nextLine[1] +" "+ nextLine[31] +" " + nextLine[32] + " " + nextLine[34]);
|
| 367 |
Long item_id = Long.parseLong(nextLine[1].replaceAll("FBA",""));
|
368 |
Long item_id = Long.parseLong(nextLine[1].replaceAll("FBA",""));
|
| - |
|
369 |
Double ourPrice = Double.parseDouble(nextLine[31]);
|
| 368 |
Double salePrice = Double.parseDouble(nextLine[31]);
|
370 |
Double salePrice = Double.parseDouble(nextLine[31]);
|
| 369 |
Double minFBAPrice = Double.parseDouble(nextLine[32]);
|
371 |
Double minFBAPrice = Double.parseDouble(nextLine[32]);
|
| 370 |
Double minMFNPrice = Double.parseDouble(nextLine[34]);
|
372 |
Double minMFNPrice = Double.parseDouble(nextLine[34]);
|
| - |
|
373 |
itemIdOurPriceMap.put(item_id,ourPrice);
|
| 371 |
itemIdSalePriceMap.put(item_id,salePrice);
|
374 |
itemIdSalePriceMap.put(item_id,salePrice);
|
| 372 |
itemIdminFBAPriceMap.put(item_id,minFBAPrice);
|
375 |
itemIdminFBAPriceMap.put(item_id,minFBAPrice);
|
| 373 |
itemIdminMFNPriceMap.put(item_id,minMFNPrice);
|
376 |
itemIdminMFNPriceMap.put(item_id,minMFNPrice);
|
| 374 |
}
|
377 |
}
|
| 375 |
count++;
|
378 |
count++;
|
| Line 418... |
Line 421... |
| 418 |
amazonfbasalessnapshot.setMinMfnPrice(itemIdminMFNPriceMap.get(item_id));
|
421 |
amazonfbasalessnapshot.setMinMfnPrice(itemIdminMFNPriceMap.get(item_id));
|
| 419 |
}
|
422 |
}
|
| 420 |
else{
|
423 |
else{
|
| 421 |
amazonfbasalessnapshot.setMinMfnPrice(0.0);
|
424 |
amazonfbasalessnapshot.setMinMfnPrice(0.0);
|
| 422 |
}
|
425 |
}
|
| - |
|
426 |
if(itemIdOurPriceMap.containsKey(item_id) && itemIdOurPriceMap.get(item_id)!=0){
|
| - |
|
427 |
amazonfbasalessnapshot.setOurPrice(itemIdOurPriceMap.get(item_id));
|
| - |
|
428 |
}
|
| - |
|
429 |
else{
|
| - |
|
430 |
amazonfbasalessnapshot.setOurPrice(itemIdOurPriceMap.get(item_id));
|
| - |
|
431 |
}
|
| 423 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
432 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
| 424 |
transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
|
433 |
transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
|
| 425 |
}
|
434 |
}
|
| 426 |
}
|
435 |
}
|
| 427 |
} catch (IOException e) {
|
436 |
} catch (IOException e) {
|