Subversion Repositories SmartDukaan

Rev

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

Rev 9719 Rev 9730
Line 46... Line 46...
46
		try {
46
		try {
47
			tsc = new TransactionClient();
47
			tsc = new TransactionClient();
48
			minCreationDate = tsc.getClient().getMinCreatedTimeStampUndeliveredOrdersForSource(OrderSource.SNAPDEAL.getValue());
48
			minCreationDate = tsc.getClient().getMinCreatedTimeStampUndeliveredOrdersForSource(OrderSource.SNAPDEAL.getValue());
49
		} catch (Exception e) {
49
		} catch (Exception e) {
50
			logger.error("Unable to establish connection to the transaction service while getting Minimum Order Created Timstamp for Undelivered Orders ", e);
50
			logger.error("Unable to establish connection to the transaction service while getting Minimum Order Created Timstamp for Undelivered Orders ", e);
51
		}//Dec 14, 2013 12:00:00 AM
51
		}//Dec 14, 2013 12:00:00 AM  1383291412000l
52
 
52
 
53
		SimpleDateFormat snapdealDateFormat = new SimpleDateFormat("yyyy-MM-dd");
53
		SimpleDateFormat snapdealDateFormat = new SimpleDateFormat("yyyy-MM-dd");
54
		SimpleDateFormat gotSnapdealDateFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss aaa");
54
		SimpleDateFormat gotSnapdealDateFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss aaa");
55
		SimpleDateFormat ourDBDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
55
		SimpleDateFormat ourDBDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
56
		String startDate= "";
56
		String startDate= "";
Line 101... Line 101...
101
		}
101
		}
102
 
102
 
103
		//http://shipping.snapdeal.com/vendor/ONESHIP/product-shipment/shippedData/fetch/?shippedStartDate=2014%2F01%2F01&shippedEndDate=2014%2F01%2F08&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED
103
		//http://shipping.snapdeal.com/vendor/ONESHIP/product-shipment/shippedData/fetch/?shippedStartDate=2014%2F01%2F01&shippedEndDate=2014%2F01%2F08&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED
104
 
104
 
105
		logger.info("Getting Delivery Information for DropShip Snapdeal Orders");
105
		logger.info("Getting Delivery Information for DropShip Snapdeal Orders");
-
 
106
		String dropshipUrl = "http://shipping.snapdeal.com/vendor/DROPSHIP/product-shipment/shippedData/fetch/?shippedStartDate="+startDate+"&shippedEndDate="+endDate+"&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED";
-
 
107
		logger.info("Drop Ship Url "+dropshipUrl);
-
 
108
		
106
		get = new HttpGet("http://shipping.snapdeal.com/vendor/DROPSHIP/product-shipment/shippedData/fetch/?shippedStartDate="+startDate+"&shippedEndDate="+endDate+"&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED");
109
		get = new HttpGet(dropshipUrl);
107
 
110
 
108
		try {
111
		try {
109
			response = client.execute(get);
112
			response = client.execute(get);
110
		} catch (Exception e) {
113
		} catch (Exception e) {
111
			logger.error("Unable to get Http Response for snapdeal dropship delivered orders", e);
114
			logger.error("Unable to get Http Response for snapdeal dropship delivered orders", e);
Line 157... Line 160...
157
				}
160
				}
158
			}
161
			}
159
		}
162
		}
160
 
163
 
161
		logger.info("Getting Delivery Information for OneShip Snapdeal Orders");
164
		logger.info("Getting Delivery Information for OneShip Snapdeal Orders");
-
 
165
		String oneShipUrl = "http://shipping.snapdeal.com/vendor/ONESHIP/product-shipment/shippedData/fetch/?shippedStartDate="+startDate+"&shippedEndDate="+endDate+"&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED";
-
 
166
		logger.info("One Ship Url "+oneShipUrl);
-
 
167
		
162
		get = new HttpGet("http://shipping.snapdeal.com/vendor/ONESHIP/product-shipment/shippedData/fetch/?shippedStartDate="+startDate+"&shippedEndDate="+endDate+"&specialPanelAccess=&statusCode=COURIER_DELIVERED&statusColumn=deliveredOn&dispatchCategoryId=0&sCode=COURIER_DELIVERED");
168
		get = new HttpGet(oneShipUrl);	
163
 
169
		
164
		try {
170
		try {
165
			response = client.execute(get);
171
			response = client.execute(get);
166
		} catch (Exception e) {
172
		} catch (Exception e) {
167
			logger.error("Unable to get Http Response for snapdeal oneship delivered orders", e);
173
			logger.error("Unable to get Http Response for snapdeal oneship delivered orders", e);
168
		} 
174
		}