Subversion Repositories SmartDukaan

Rev

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

Rev 11268 Rev 11518
Line 8... Line 8...
8
import java.io.IOException;
8
import java.io.IOException;
9
import java.io.InputStreamReader;
9
import java.io.InputStreamReader;
10
import java.io.UnsupportedEncodingException;
10
import java.io.UnsupportedEncodingException;
11
import java.text.SimpleDateFormat;
11
import java.text.SimpleDateFormat;
12
import java.util.ArrayList;
12
import java.util.ArrayList;
-
 
13
import java.util.Calendar;
13
import java.util.Date;
14
import java.util.Date;
14
import java.util.HashMap;
15
import java.util.HashMap;
15
import java.util.List;
16
import java.util.List;
16
import java.util.Map;
17
import java.util.Map;
17
 
18
 
Line 43... Line 44...
43
		Map<String,List<List<String>>> orderDataMap = new HashMap<String,List<List<String>>>();
44
		Map<String,List<List<String>>> orderDataMap = new HashMap<String,List<List<String>>>();
44
		List<List<String>> deliveredOrderDataList = new ArrayList<List<String>>();
45
		List<List<String>> deliveredOrderDataList = new ArrayList<List<String>>();
45
		List<List<String>> cancelledOrderDataList = new ArrayList<List<String>>();
46
		List<List<String>> cancelledOrderDataList = new ArrayList<List<String>>();
46
		long minCreationDate = 0l;
47
		long minCreationDate = 0l;
47
		long currentTime = System.currentTimeMillis();
48
		long currentTime = System.currentTimeMillis();
-
 
49
		
-
 
50
		Calendar cal = Calendar.getInstance();
-
 
51
		cal.add(Calendar.DAY_OF_MONTH, -60);
-
 
52
		minCreationDate = cal.getTimeInMillis();
48
		TransactionClient tsc = null;
53
		/*TransactionClient tsc = null;
49
		try {
54
		try {
50
			tsc = new TransactionClient();
55
			tsc = new TransactionClient();
51
			minCreationDate = tsc.getClient().getMinCreatedTimeStampUndeliveredOrdersForSource(OrderSource.SNAPDEAL.getValue());
56
			minCreationDate = tsc.getClient().getMinCreatedTimeStampUndeliveredOrdersForSource(OrderSource.SNAPDEAL.getValue());
52
			/*minCreationDate = 1383291412000l;*/
57
			minCreationDate = 1393612200000l;
53
		} catch (Exception e) {
58
		} catch (Exception e) {
54
			logger.error("Unable to establish connection to the transaction service while getting Minimum Order Created Timstamp for Undelivered Orders ", e);
59
			logger.error("Unable to establish connection to the transaction service while getting Minimum Order Created Timstamp for Undelivered Orders ", e);
55
		}//Dec 14, 2013 12:00:00 AM  1383291412000l
60
		}//Dec 14, 2013 12:00:00 AM  1383291412000l
56
 
61
*/
57
		SimpleDateFormat snapdealDateFormat = new SimpleDateFormat("yyyy-MM-dd");
62
		SimpleDateFormat snapdealDateFormat = new SimpleDateFormat("yyyy-MM-dd");
58
		SimpleDateFormat gotSnapdealDateFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss aaa");
63
		SimpleDateFormat gotSnapdealDateFormat = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss aaa");
59
		SimpleDateFormat ourDBDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
64
		SimpleDateFormat ourDBDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
60
		String startDate= "";
65
		String startDate= "";
61
		Date start_date = new Date(minCreationDate);
66
		Date start_date = new Date(minCreationDate);