Subversion Repositories SmartDukaan

Rev

Rev 9787 | Rev 10529 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9787 Rev 9802
Line 355... Line 355...
355
					e.printStackTrace();
355
					e.printStackTrace();
356
				}
356
				}
357
				count++;
357
				count++;
358
			}
358
			}
359
			boolean oos;
359
			boolean oos;
-
 
360
			List<AmazonFbaSalesSnapshot> fbaSalesSnapShotList = new ArrayList<AmazonFbaSalesSnapshot>();
360
			for (Entry<Date, Map<Long, FbaSalesSnapshot>> entry : orderDateItemIdFbaSaleSnapshotMap.entrySet()){
361
			for (Entry<Date, Map<Long, FbaSalesSnapshot>> entry : orderDateItemIdFbaSaleSnapshotMap.entrySet()){
361
				Date orderDate = entry.getKey();
362
				Date orderDate = entry.getKey();
362
				for(Entry<Long, FbaSalesSnapshot> entry1 :entry.getValue().entrySet()){
363
				for(Entry<Long, FbaSalesSnapshot> entry1 :entry.getValue().entrySet()){
363
					//System.out.println("Item ID is " + entry1.getKey());
364
					//System.out.println("Item ID is " + entry1.getKey());
364
					Long inventory = inventoryClient.getAmazonFbaItemInventory(entry1.getKey());
365
					Long inventory = inventoryClient.getAmazonFbaItemInventory(entry1.getKey());
Line 419... Line 420...
419
						Date date =  new Date(amazonfbasalessnapshot.getDateOfSale());
420
						Date date =  new Date(amazonfbasalessnapshot.getDateOfSale());
420
						SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); 
421
						SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy"); 
421
						System.out.println(" Item details are " + sdf.format(date) + " "+ amazonfbasalessnapshot.getItem_id() + " " + amazonfbasalessnapshot.getTotalOrderCount());
422
						System.out.println(" Item details are " + sdf.format(date) + " "+ amazonfbasalessnapshot.getItem_id() + " " + amazonfbasalessnapshot.getTotalOrderCount());
422
					}
423
					}
423
					amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
424
					amazonfbasalessnapshot.setAmazonFbaInventory(inventory);
424
					transactionClient.addOrUpdateAmazonFbaSalesSnapshot(amazonfbasalessnapshot);
425
					fbaSalesSnapShotList.add(amazonfbasalessnapshot);
425
				}
426
				}
426
			}
427
			}
-
 
428
			transactionServiceClient.getClient().bulkAddOrUpdateAmazonFbaSalesSnapshot(fbaSalesSnapShotList);
427
		} catch (IOException e) {
429
		} catch (IOException e) {
428
			// TODO Auto-generated catch block
430
			// TODO Auto-generated catch block
429
			e.printStackTrace();
431
			e.printStackTrace();
430
		} catch (ParseException e) {
432
		} catch (ParseException e) {
431
			// TODO Auto-generated catch block
433
			// TODO Auto-generated catch block