Subversion Repositories SmartDukaan

Rev

Rev 4837 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4837 Rev 4983
Line 46... Line 46...
46
    
46
    
47
    Map<Long, String> providerNames = new HashMap<Long, String>();
47
    Map<Long, String> providerNames = new HashMap<Long, String>();
48
    List<Order> orders = null;
48
    List<Order> orders = null;
49
    List<String> orderDate = new ArrayList<String>();
49
    List<String> orderDate = new ArrayList<String>();
50
	
50
	
-
 
51
    private  static final OrderStatusGroups statusGroup = new OrderStatusGroups();
-
 
52
    private  static final List<OrderStatus> openOrderStatuses = statusGroup.getOpenOrders();
-
 
53
    private  static final List<OrderStatus> shippedOrderStatuses = statusGroup.getShippedOrders();
-
 
54
    
51
	public MyaccountController() {
55
	public MyaccountController() {
52
		super();
56
		super();
53
	}
57
	}
54
    
58
    
55
	public String index(){
59
	public String index(){
56
    	logger.info("this.request=" + this.request);
60
    	logger.info("this.request=" + this.request);
57
    	
61
    	
58
        try {
62
        try {
59
        	OrderStatusGroups statusGroup = new OrderStatusGroups();
-
 
60
        	List<OrderStatus> openOrderStatuses = statusGroup.getOpenOrders();
-
 
61
            TransactionClient transactionServiceClient = new TransactionClient();
63
            TransactionClient transactionServiceClient = new TransactionClient();
62
            in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
64
            in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
63
            orders = orderClient.getOrdersForCustomer(userinfo.getUserId(), 0, (new Date()).getTime(), openOrderStatuses);
65
            orders = orderClient.getOrdersForCustomer(userinfo.getUserId(), 0, (new Date()).getTime(), openOrderStatuses);
64
            //Reverse the list of order. Last come first displayed 
66
            //Reverse the list of order. Last come first displayed 
65
            Collections.reverse(orders);
67
            Collections.reverse(orders);
Line 97... Line 99...
97
    }
99
    }
98
    
100
    
99
    public List<String> getOrderDate()  {
101
    public List<String> getOrderDate()  {
100
        return orderDate;
102
        return orderDate;
101
    }
103
    }
-
 
104
    
-
 
105
    public boolean showAwbforOrder(OrderStatus status)  {
-
 
106
    	if(shippedOrderStatuses.contains(status)){
-
 
107
    		return true;
-
 
108
		}
-
 
109
        return false;
-
 
110
    }
102
}
111
}
103
112