Subversion Repositories SmartDukaan

Rev

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

Rev 9548 Rev 9550
Line 63... Line 63...
63
public class CreateSnapDealInventoryFeed {
63
public class CreateSnapDealInventoryFeed {
64
	private static long time = System.currentTimeMillis();
64
	private static long time = System.currentTimeMillis();
65
	private static String SNAPDEAL_INVENTORY_SHEET;
65
	private static String SNAPDEAL_INVENTORY_SHEET;
66
	private static Map<Long, SnapdealItemForInventory> allItemsInventoryMap = new HashMap<Long, SnapdealItemForInventory>();
66
	private static Map<Long, SnapdealItemForInventory> allItemsInventoryMap = new HashMap<Long, SnapdealItemForInventory>();
67
	private static ArrayList<Inventory> currentInventoryItemList;
67
	private static ArrayList<Inventory> currentInventoryItemList;
68
	static Map<Long,Long> itemIdpendingOrdersMap = new HashMap<Long,Long>();
68
	static Map<Long,Long> itemIdpendingOrdersMap;
69
	private static Map<String,InventoryHistory> inventoryhistoryItemMap;
69
	private static Map<String,InventoryHistory> inventoryhistoryItemMap;
70
	private static DefaultHttpClient client = new DefaultHttpClient();
70
	private static DefaultHttpClient client = new DefaultHttpClient();
71
	static Map<String,SnapdealItemDetails> snapdealItemMap = new HashMap<String,SnapdealItemDetails>();
71
	static Map<String,SnapdealItemDetails> snapdealItemMap = new HashMap<String,SnapdealItemDetails>();
72
	static Map<Long,SnapdealItemDetails> itemSnapdealMap = new HashMap<Long,SnapdealItemDetails>();
72
	static Map<Long,SnapdealItemDetails> itemSnapdealMap = new HashMap<Long,SnapdealItemDetails>();
73
	static Map<String,PendingOrderInventoryHistory> PendingOrdersInventoryHistoryMap = new HashMap<String,PendingOrderInventoryHistory>();
73
	static Map<String,PendingOrderInventoryHistory> PendingOrdersInventoryHistoryMap = new HashMap<String,PendingOrderInventoryHistory>();
74
	static long lastUpdatedInventoryTime = 0;
74
	static long lastUpdatedInventoryTime = 0;
75
	static{
75
	static{
-
 
76
		itemIdpendingOrdersMap = new HashMap<Long,Long>();
76
		CatalogClient catalogServiceClient = null;
77
		CatalogClient catalogServiceClient = null;
77
		try {
78
		try {
78
			catalogServiceClient = new CatalogClient();
79
			catalogServiceClient = new CatalogClient();
79
		} catch (TTransportException e1) {
80
		} catch (TTransportException e1) {
80
			// TODO Auto-generated catch block
81
			// TODO Auto-generated catch block
Line 559... Line 560...
559
			created_orders = 0;
560
			created_orders = 0;
560
			pending_orders = 0;
561
			pending_orders = 0;
561
			try {
562
			try {
562
				snapdealitem = snapdealItemMap.get(inventory.getSellerSku());
563
				snapdealitem = snapdealItemMap.get(inventory.getSellerSku());
563
				if(snapdealitem==null){
564
				if(snapdealitem==null){
564
					notMappedItems.add("inventory.getSellerSku() "+inventory.getProductName());
565
					notMappedItems.add(inventory.getSellerSku()+" "+inventory.getProductName());
-
 
566
					System.out.println("Not Mapped  " + inventory.getSellerSku());
565
					continue;
567
					continue;
566
				}
568
				}
567
				sku = snapdealitem.getItem_id();
569
				sku = snapdealitem.getItem_id();
568
				if(sku!=0){
570
				if(sku!=0){
569
					try{
571
					try{