| Line 294... |
Line 294... |
| 294 |
e.printStackTrace();
|
294 |
e.printStackTrace();
|
| 295 |
}
|
295 |
}
|
| 296 |
count++;
|
296 |
count++;
|
| 297 |
}
|
297 |
}
|
| 298 |
boolean oos;
|
298 |
boolean oos;
|
| - |
|
299 |
List<AmazonFbaSalesSnapshot> fbaSalesSnapShotList = new ArrayList<AmazonFbaSalesSnapshot>();
|
| 299 |
for (Entry<Date, Map<Long, FbaSalesSnapshot>> entry : orderDateItemIdFbaSaleSnapshotMap.entrySet()){
|
300 |
for (Entry<Date, Map<Long, FbaSalesSnapshot>> entry : orderDateItemIdFbaSaleSnapshotMap.entrySet()){
|
| 300 |
Date orderDate = entry.getKey();
|
301 |
Date orderDate = entry.getKey();
|
| 301 |
for(Entry<Long, FbaSalesSnapshot> entry1 :entry.getValue().entrySet()){
|
302 |
for(Entry<Long, FbaSalesSnapshot> entry1 :entry.getValue().entrySet()){
|
| 302 |
//System.out.println("Item ID is " + entry1.getKey());
|
303 |
//System.out.println("Item ID is " + entry1.getKey());
|
| 303 |
Long inventory = inventoryClient.getAmazonFbaItemInventory(entry1.getKey());
|
304 |
Long inventory = inventoryClient.getAmazonFbaItemInventory(entry1.getKey());
|
| Line 358... |
Line 359... |
| 358 |
Date date = new Date(amazonfbasalessnapshot.getDateOfSale());
|
359 |
Date date = new Date(amazonfbasalessnapshot.getDateOfSale());
|
| 359 |
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
|
360 |
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
|
| 360 |
System.out.println(" Item details are " + sdf.format(date) + " "+ amazonfbasalessnapshot.getItem_id() + " " + amazonfbasalessnapshot.getTotalOrderCount());
|
361 |
System.out.println(" Item details are " + sdf.format(date) + " "+ amazonfbasalessnapshot.getItem_id() + " " + amazonfbasalessnapshot.getTotalOrderCount());
|
| 361 |
}
|
362 |
}
|
| 362 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
363 |
amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
|
| 363 |
transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
|
364 |
fbaSalesSnapShotList.add(amazonfbasalessnapshot);
|
| 364 |
}
|
365 |
}
|
| 365 |
}
|
366 |
}
|
| - |
|
367 |
transactionServiceClient.getClient().bulkAddOrUpdateAmazonFbaSalesSnapshot(fbaSalesSnapShotList);
|
| 366 |
} catch (IOException e) {
|
368 |
} catch (IOException e) {
|
| 367 |
// TODO Auto-generated catch block
|
369 |
// TODO Auto-generated catch block
|
| 368 |
e.printStackTrace();
|
370 |
e.printStackTrace();
|
| 369 |
} catch (ParseException e) {
|
371 |
} catch (ParseException e) {
|
| 370 |
// TODO Auto-generated catch block
|
372 |
// TODO Auto-generated catch block
|