Subversion Repositories SmartDukaan

Rev

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

Rev 1310 Rev 1316
Line 706... Line 706...
706
		TransactionServiceClient transactionServiceClient = null;
706
		TransactionServiceClient transactionServiceClient = null;
707
		in.shop2020.model.v1.order.TransactionService.Client orderClient = null;
707
		in.shop2020.model.v1.order.TransactionService.Client orderClient = null;
708
		
708
		
709
		List<Order> orders = null;
709
		List<Order> orders = null;
710
		List<String> orderDate = new ArrayList<String>();
710
		List<String> orderDate = new ArrayList<String>();
-
 
711
		Map<Long, String> providerNames = new HashMap<Long, String>();
711
		
712
		
712
		try{
713
		try{
713
			transactionServiceClient = new TransactionServiceClient();
714
			transactionServiceClient = new TransactionServiceClient();
714
			orderClient = transactionServiceClient.getClient();
715
			orderClient = transactionServiceClient.getClient();
715
			orders = orderClient.getOrdersForCustomer(userId, 0, (new Date()).getTime(), OrderStatus.DELIVERY_SUCCESS);
716
			orders = orderClient.getOrdersForCustomer(userId, 0, (new Date()).getTime(), OrderStatus.DELIVERY_SUCCESS);
-
 
717
 
-
 
718
			LogisticsServiceClient logisticsServiceClient = new LogisticsServiceClient();
-
 
719
			in.shop2020.logistics.LogisticsService.Client logisticsClient = logisticsServiceClient.getClient();
-
 
720
			List<Provider> providers = logisticsClient.getAllProviders();
-
 
721
			for(Provider provider: providers)
-
 
722
				providerNames.put(provider.getId(), provider.getName());
716
			
723
 
717
			SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss aa");
724
			SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss aa");
718
			
725
			
719
			if(orders != null && !orders.isEmpty()){
726
			if(orders != null && !orders.isEmpty()){
720
				for(Order order: orders){
727
				for(Order order: orders){
721
					Date orderedOn = new Date(order.getCreated_timestamp());
728
					Date orderedOn = new Date(order.getCreated_timestamp());
Line 725... Line 732...
725
		}catch (Exception e){
732
		}catch (Exception e){
726
			
733
			
727
		}
734
		}
728
		context.put("orders", orders);
735
		context.put("orders", orders);
729
		context.put("orderDate", orderDate);
736
		context.put("orderDate", orderDate);
-
 
737
		context.put("providerNames", providerNames);
730
		
738
		
731
		htmlString = getHtmlFromVelocity(templateFile, context);
739
		htmlString = getHtmlFromVelocity(templateFile, context);
732
		return htmlString;
740
		return htmlString;
733
	}
741
	}
734
	public String getMyaccountHeaderHtml() {
742
	public String getMyaccountHeaderHtml() {