Subversion Repositories SmartDukaan

Rev

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

Rev 9033 Rev 9034
Line 133... Line 133...
133
		}
133
		}
134
		logger.info("Before Processing orders ");
134
		logger.info("Before Processing orders ");
135
		String [] nextLine;
135
		String [] nextLine;
136
		StringBuffer sb = new StringBuffer();
136
		StringBuffer sb = new StringBuffer();
137
		int orders_processed = 0;
137
		int orders_processed = 0;
-
 
138
		String order_string = "";
138
		try {
139
		try {
139
			User user = null;
140
			User user = null;
140
			TransactionClient tsc = null;
141
			TransactionClient tsc = null;
141
			SourceDetail sourceDetail = null;
142
			SourceDetail sourceDetail = null;
142
			logger.info("Before Fetching sourcedetail");
143
			logger.info("Before Fetching sourcedetail");
Line 588... Line 589...
588
						continue;
589
						continue;
589
					}
590
					}
590
				}
591
				}
591
			}
592
			}
592
			response.setHeader("Content-Type", "text/javascript");
593
			response.setHeader("Content-Type", "text/javascript");
-
 
594
			
-
 
595
			if(orders_processed==1){
-
 
596
				order_string = "Order";
-
 
597
			}
-
 
598
			else{
-
 
599
				order_string = "Orders";
-
 
600
			}
593
 
601
 
594
			ServletOutputStream sos;
602
			ServletOutputStream sos;
595
			try {
603
			try {
596
				sos = response.getOutputStream();
604
				sos = response.getOutputStream();
597
				if(sb.toString().equalsIgnoreCase("")){
605
				if(sb.toString().equalsIgnoreCase("")){
598
					sos.write((orders_processed + " Orders Created").toString().getBytes());
606
					sos.write((orders_processed + " " + order_string + " Created").toString().getBytes());
599
				}
607
				}
600
				else{
608
				else{
601
						sos.write((orders_processed +" Orders Created \n"+ sb.toString()).getBytes());
609
						sos.write((orders_processed +" " + order_string + " Created \n"+ sb.toString()).getBytes());
602
				}
610
				}
603
				sos.flush();
611
				sos.flush();
604
			} catch (IOException e) {
612
			} catch (IOException e) {
605
				System.out.println("Unable to stream the manifest file");
613
				System.out.println("Unable to stream the manifest file");
606
			}   
614
			}   
Line 620... Line 628...
620
				"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
628
				"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
621
				"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
629
				"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","amar.kumar@shop2020.in"};
622
		*/		
630
		*/		
623
		try {
631
		try {
624
			logger.info("Before Sending Emails");
632
			logger.info("Before Sending Emails");
625
			String order_string;
-
 
626
			if(orders_processed==1){
-
 
627
				order_string = "Order";
-
 
628
			}
-
 
629
			else{
-
 
630
				order_string = "Orders";
-
 
631
			}
633
			
632
			if(sb.toString().equalsIgnoreCase("")){
634
			if(sb.toString().equalsIgnoreCase("")){
633
				String emailSubjectTxt = orders_processed + " Flipkart" + order_string + "Created "+sdf.format(cal.getTime());
635
				String emailSubjectTxt = orders_processed + " Flipkart" + order_string + "Created "+sdf.format(cal.getTime());
634
				mailer.sendSSLMessage(sendTo, emailSubjectTxt,"Orders Created Successfully (No Alerts)", emailFromAddress, password, new ArrayList<File>());
636
				mailer.sendSSLMessage(sendTo, emailSubjectTxt,"Orders Created Successfully (No Alerts)", emailFromAddress, password, new ArrayList<File>());
635
				logger.info("Sending Email Flipkart Orders Created Successfully (No Alerts)");
637
				logger.info("Sending Email Flipkart Orders Created Successfully (No Alerts)");
636
			}
638
			}