Subversion Repositories SmartDukaan

Rev

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

Rev 6111 Rev 6135
Line 13... Line 13...
13
import in.shop2020.model.v1.order.Order;
13
import in.shop2020.model.v1.order.Order;
14
import in.shop2020.model.v1.order.OrderStatus;
14
import in.shop2020.model.v1.order.OrderStatus;
15
import in.shop2020.model.v1.order.OrderStatusGroups;
15
import in.shop2020.model.v1.order.OrderStatusGroups;
16
import in.shop2020.model.v1.order.RechargeOrder;
16
import in.shop2020.model.v1.order.RechargeOrder;
17
import in.shop2020.serving.utils.FormattingUtils;
17
import in.shop2020.serving.utils.FormattingUtils;
-
 
18
import in.shop2020.serving.utils.Utils;
18
import in.shop2020.thrift.clients.LogisticsClient;
19
import in.shop2020.thrift.clients.LogisticsClient;
19
import in.shop2020.thrift.clients.TransactionClient;
20
import in.shop2020.thrift.clients.TransactionClient;
20
 
21
 
21
import org.apache.log4j.Logger;
22
import org.apache.log4j.Logger;
22
import org.apache.struts2.convention.annotation.InterceptorRef;
23
import org.apache.struts2.convention.annotation.InterceptorRef;
Line 46... Line 47...
46
    private FormattingUtils formattingUtils = new FormattingUtils();
47
    private FormattingUtils formattingUtils = new FormattingUtils();
47
    
48
    
48
    Map<Long, String> providerNames = new HashMap<Long, String>();
49
    Map<Long, String> providerNames = new HashMap<Long, String>();
49
    List<RechargeOrder> rechargeOrders = null;
50
    List<RechargeOrder> rechargeOrders = null;
50
    List<String> orderDate = new ArrayList<String>();
51
    List<String> orderDate = new ArrayList<String>();
-
 
52
 
-
 
53
    private static Map<Long, String> rechargeProviderMap = new HashMap<Long, String>() ;
51
	
54
	
52
   // private  static final OrderStatusGroups statusGroup = new OrderStatusGroups();
55
   // private  static final OrderStatusGroups statusGroup = new OrderStatusGroups();
53
    //private  static final List<OrderStatus> openOrderStatuses = statusGroup.getOpenOrders();
56
    //private  static final List<OrderStatus> openOrderStatuses = statusGroup.getOpenOrders();
54
    //private  static final List<OrderStatus> shippedOrderStatuses = statusGroup.getShippedOrders();
57
    //private  static final List<OrderStatus> shippedOrderStatuses = statusGroup.getShippedOrders();
55
    
58
    
Line 74... Line 77...
74
              //  providerNames.put(provider.getId(), provider.getName());
77
              //  providerNames.put(provider.getId(), provider.getName());
75
            
78
            
76
        } catch (Exception e)   {
79
        } catch (Exception e)   {
77
            logger.error("Error while getting the recharge orders for the user", e);
80
            logger.error("Error while getting the recharge orders for the user", e);
78
        }
81
        }
79
        SimpleDateFormat dateformat = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss aa");
-
 
80
        
-
 
81
        if(rechargeOrders != null && !rechargeOrders.isEmpty()){
82
        if(rechargeOrders != null && !rechargeOrders.isEmpty()){
82
            for(RechargeOrder rechargeOrder: rechargeOrders)    {
83
            for(RechargeOrder rechargeOrder: rechargeOrders) {
83
                Date orderedOn = new Date(rechargeOrder.getCreationTimestamp());
84
                rechargeProviderMap.put(rechargeOrder.getId(), Utils.getRechargeProviderName(rechargeOrder.getOperatorId()));
84
                orderDate.add(dateformat.format(orderedOn));
-
 
85
            }
85
            }
86
        }
86
        }
87
		return "index";
87
		return "index";
88
    }
88
    }
89
    
89
    
Line 98... Line 98...
98
    }
98
    }
99
    
99
    
100
    public List<String> getOrderDate()  {
100
    public List<String> getOrderDate()  {
101
        return orderDate;
101
        return orderDate;
102
    }
102
    }
-
 
103
    
-
 
104
    public String getProviderName(Long rechargeOrderId) {
-
 
105
        return rechargeProviderMap.get(rechargeOrderId);
-
 
106
    }
103
}
107
}
104
108