| Line 6... |
Line 6... |
| 6 |
import in.shop2020.crm.SearchFilter;
|
6 |
import in.shop2020.crm.SearchFilter;
|
| 7 |
import in.shop2020.crm.Ticket;
|
7 |
import in.shop2020.crm.Ticket;
|
| 8 |
import in.shop2020.crm.TicketCategory;
|
8 |
import in.shop2020.crm.TicketCategory;
|
| 9 |
import in.shop2020.crm.TicketPriority;
|
9 |
import in.shop2020.crm.TicketPriority;
|
| 10 |
import in.shop2020.crm.TicketStatus;
|
10 |
import in.shop2020.crm.TicketStatus;
|
| - |
|
11 |
import in.shop2020.logistics.LogisticsServiceException;
|
| 11 |
import in.shop2020.logistics.PickupStore;
|
12 |
import in.shop2020.logistics.PickupStore;
|
| - |
|
13 |
import in.shop2020.logistics.Provider;
|
| 12 |
import in.shop2020.model.v1.catalog.CatalogService;
|
14 |
import in.shop2020.model.v1.catalog.CatalogService;
|
| 13 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
15 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| 14 |
import in.shop2020.model.v1.catalog.Item;
|
16 |
import in.shop2020.model.v1.catalog.Item;
|
| - |
|
17 |
import in.shop2020.model.v1.order.AmazonOrder;
|
| 15 |
import in.shop2020.model.v1.order.HotspotStore;
|
18 |
import in.shop2020.model.v1.order.HotspotStore;
|
| 16 |
import in.shop2020.model.v1.order.LineItem;
|
19 |
import in.shop2020.model.v1.order.LineItem;
|
| 17 |
import in.shop2020.model.v1.order.Order;
|
20 |
import in.shop2020.model.v1.order.Order;
|
| 18 |
import in.shop2020.model.v1.order.OrderStatus;
|
21 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 19 |
import in.shop2020.model.v1.order.StoreOrderDetail;
|
22 |
import in.shop2020.model.v1.order.StoreOrderDetail;
|
| Line 101... |
Line 104... |
| 101 |
private String parentOrderIdForFreebieOrder;
|
104 |
private String parentOrderIdForFreebieOrder;
|
| 102 |
private String freebieOrderId;
|
105 |
private String freebieOrderId;
|
| 103 |
private double cashAmount;
|
106 |
private double cashAmount;
|
| 104 |
private double cardAmount;
|
107 |
private double cardAmount;
|
| 105 |
private StoreOrderDetail storeOrderDetail;
|
108 |
private StoreOrderDetail storeOrderDetail;
|
| - |
|
109 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| - |
|
110 |
private AmazonOrder amazonOrder;
|
| - |
|
111 |
private Provider provider;
|
| - |
|
112 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 106 |
|
113 |
|
| 107 |
public UserOrderInfoController() {
|
114 |
public UserOrderInfoController() {
|
| 108 |
super();
|
115 |
super();
|
| 109 |
setOfcancellableStates = new HashSet<OrderStatus>();
|
116 |
setOfcancellableStates = new HashSet<OrderStatus>();
|
| 110 |
setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
|
117 |
setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
|
| Line 118... |
Line 125... |
| 118 |
|
125 |
|
| 119 |
public String index() {
|
126 |
public String index() {
|
| 120 |
try {
|
127 |
try {
|
| 121 |
PaymentClient paymentServiceClient = new PaymentClient();
|
128 |
PaymentClient paymentServiceClient = new PaymentClient();
|
| 122 |
TransactionClient transactionServiceClient = new TransactionClient();
|
129 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| - |
|
130 |
LogisticsClient logisticsServiceClient = new LogisticsClient();
|
| 123 |
|
131 |
|
| 124 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
132 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
| - |
|
133 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| - |
|
134 |
amazonOrder = transactionServiceClient.getClient().getAmazonOrder(orderId);
|
| - |
|
135 |
provider = logisticsServiceClient.getClient().getProvider(order.getLogistics_provider_id());
|
| - |
|
136 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 125 |
if(order.getSource() == 2) {
|
137 |
if(order.getSource() == 2) {
|
| 126 |
storeOrderDetail = transactionServiceClient.getClient().getStoreOrderDetail(order.getId(),order.getStoreId());
|
138 |
storeOrderDetail = transactionServiceClient.getClient().getStoreOrderDetail(order.getId(),order.getStoreId());
|
| 127 |
if(order.getStatus().getValue() == 15 || order.getStatus().getValue() == 34) {
|
139 |
if(order.getStatus().getValue() == 15 || order.getStatus().getValue() == 34) {
|
| 128 |
setCashAmount(storeOrderDetail.getCashRefundAmount());
|
140 |
setCashAmount(storeOrderDetail.getCashRefundAmount());
|
| 129 |
setCardAmount(storeOrderDetail.getCardRefundAmount());
|
141 |
setCardAmount(storeOrderDetail.getCardRefundAmount());
|
| Line 204... |
Line 216... |
| 204 |
} catch (UserContextException e) {
|
216 |
} catch (UserContextException e) {
|
| 205 |
log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
|
217 |
log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
|
| 206 |
} catch(CatalogServiceException csex) {
|
218 |
} catch(CatalogServiceException csex) {
|
| 207 |
log.error("Unable to get item details for itemId: " + order.getFreebieItemId(), csex);
|
219 |
log.error("Unable to get item details for itemId: " + order.getFreebieItemId(), csex);
|
| 208 |
}
|
220 |
}
|
| - |
|
221 |
catch (LogisticsServiceException e) {
|
| - |
|
222 |
log.error("Unable to get provider for logictics provider id : " + order.getLogistics_provider_id(), e);
|
| - |
|
223 |
}
|
| 209 |
return INDEX;
|
224 |
return INDEX;
|
| 210 |
}
|
225 |
}
|
| 211 |
|
226 |
|
| 212 |
private boolean canEditOrderAddress() {
|
227 |
private boolean canEditOrderAddress() {
|
| 213 |
return false;
|
228 |
return false;
|
| Line 726... |
Line 741... |
| 726 |
}
|
741 |
}
|
| 727 |
|
742 |
|
| 728 |
public void setStoreOrderDetail(StoreOrderDetail storeOrderDetail) {
|
743 |
public void setStoreOrderDetail(StoreOrderDetail storeOrderDetail) {
|
| 729 |
this.storeOrderDetail = storeOrderDetail;
|
744 |
this.storeOrderDetail = storeOrderDetail;
|
| 730 |
}
|
745 |
}
|
| - |
|
746 |
|
| - |
|
747 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| - |
|
748 |
public AmazonOrder getAmazonOrder() {
|
| - |
|
749 |
return amazonOrder;
|
| - |
|
750 |
}
|
| - |
|
751 |
|
| - |
|
752 |
public void setAmazonOrder(AmazonOrder amazonOrder) {
|
| - |
|
753 |
this.amazonOrder = amazonOrder;
|
| - |
|
754 |
}
|
| - |
|
755 |
|
| - |
|
756 |
public Provider getProvider() {
|
| - |
|
757 |
return provider;
|
| - |
|
758 |
}
|
| - |
|
759 |
|
| - |
|
760 |
public void setProvider(Provider provider) {
|
| - |
|
761 |
this.provider = provider;
|
| - |
|
762 |
}
|
| - |
|
763 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 731 |
|
764 |
|
| 732 |
}
|
765 |
}
|
| 733 |
|
766 |
|