| Line 7... |
Line 7... |
| 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.PickupStore;
|
11 |
import in.shop2020.logistics.PickupStore;
|
| - |
|
12 |
import in.shop2020.model.v1.catalog.CatalogService;
|
| - |
|
13 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| - |
|
14 |
import in.shop2020.model.v1.catalog.Item;
|
| 12 |
import in.shop2020.model.v1.order.LineItem;
|
15 |
import in.shop2020.model.v1.order.LineItem;
|
| 13 |
import in.shop2020.model.v1.order.Order;
|
16 |
import in.shop2020.model.v1.order.Order;
|
| 14 |
import in.shop2020.model.v1.order.OrderStatus;
|
17 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 15 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
18 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 16 |
import in.shop2020.model.v1.user.Address;
|
19 |
import in.shop2020.model.v1.user.Address;
|
| Line 24... |
Line 27... |
| 24 |
import in.shop2020.serving.model.ShipmentUpdate;
|
27 |
import in.shop2020.serving.model.ShipmentUpdate;
|
| 25 |
import in.shop2020.serving.services.AramexTrackingService;
|
28 |
import in.shop2020.serving.services.AramexTrackingService;
|
| 26 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
29 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
| 27 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
30 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
| 28 |
import in.shop2020.thrift.clients.CRMClient;
|
31 |
import in.shop2020.thrift.clients.CRMClient;
|
| - |
|
32 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 29 |
import in.shop2020.thrift.clients.HelperClient;
|
33 |
import in.shop2020.thrift.clients.HelperClient;
|
| 30 |
import in.shop2020.thrift.clients.LogisticsClient;
|
34 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 31 |
import in.shop2020.thrift.clients.PaymentClient;
|
35 |
import in.shop2020.thrift.clients.PaymentClient;
|
| 32 |
import in.shop2020.thrift.clients.TransactionClient;
|
36 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 33 |
import in.shop2020.thrift.clients.UserClient;
|
37 |
import in.shop2020.thrift.clients.UserClient;
|
| Line 86... |
Line 90... |
| 86 |
private String line1;
|
90 |
private String line1;
|
| 87 |
private String line2;
|
91 |
private String line2;
|
| 88 |
private String city;
|
92 |
private String city;
|
| 89 |
private String state;
|
93 |
private String state;
|
| 90 |
private String pin;
|
94 |
private String pin;
|
| - |
|
95 |
private String freebieItem;
|
| - |
|
96 |
private String dealText;
|
| - |
|
97 |
private String parentOrderIdForFreebieOrder;
|
| - |
|
98 |
private String freebieOrderId;
|
| 91 |
|
99 |
|
| 92 |
public UserOrderInfoController() {
|
100 |
public UserOrderInfoController() {
|
| 93 |
super();
|
101 |
super();
|
| 94 |
setOfcancellableStates = new HashSet<OrderStatus>();
|
102 |
setOfcancellableStates = new HashSet<OrderStatus>();
|
| 95 |
setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
|
103 |
setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
|
| Line 105... |
Line 113... |
| 105 |
try {
|
113 |
try {
|
| 106 |
PaymentClient paymentServiceClient = new PaymentClient();
|
114 |
PaymentClient paymentServiceClient = new PaymentClient();
|
| 107 |
TransactionClient transactionServiceClient = new TransactionClient();
|
115 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 108 |
|
116 |
|
| 109 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
117 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
| - |
|
118 |
if(order.getFreebieItemId()>0) {
|
| - |
|
119 |
CatalogService.Client catalogClient = new CatalogClient().getClient();
|
| - |
|
120 |
Item item = catalogClient.getItem(order.getFreebieItemId());
|
| - |
|
121 |
freebieItem = item.getBrand() + " " + item.getModelName() + " " + item.getModelNumber() + " " + item.getColor();
|
| - |
|
122 |
}
|
| 110 |
|
123 |
|
| - |
|
124 |
if(order.getLineitems().get(0).getDealText()!=null && !order.getLineitems().get(0).getDealText().isEmpty()) {
|
| - |
|
125 |
dealText = order.getLineitems().get(0).getDealText();
|
| - |
|
126 |
}
|
| - |
|
127 |
List<in.shop2020.model.v1.order.Attribute> attributes =
|
| - |
|
128 |
transactionServiceClient.getClient().getAllAttributesForOrderId(orderId);
|
| - |
|
129 |
|
| - |
|
130 |
for(in.shop2020.model.v1.order.Attribute attribute: attributes){
|
| - |
|
131 |
if(attribute.getName().equals("parentOrderIdForFreebie")){
|
| - |
|
132 |
parentOrderIdForFreebieOrder = attribute.getValue();
|
| - |
|
133 |
} else if (attribute.getName().equals("freebieOrderId")){
|
| - |
|
134 |
freebieOrderId = attribute.getValue();
|
| - |
|
135 |
}
|
| - |
|
136 |
}
|
| - |
|
137 |
|
| 111 |
payments = paymentServiceClient.getClient()
|
138 |
payments = paymentServiceClient.getClient()
|
| 112 |
.getPaymentForTxnId(order.getTransactionId());
|
139 |
.getPaymentForTxnId(order.getTransactionId());
|
| 113 |
|
140 |
|
| 114 |
|
141 |
|
| 115 |
|
142 |
|
| Line 154... |
Line 181... |
| 154 |
log.error("Unable to get payments for transctionId : " + order.getTransactionId(), e);
|
181 |
log.error("Unable to get payments for transctionId : " + order.getTransactionId(), e);
|
| 155 |
} catch (InterruptedException e) {
|
182 |
} catch (InterruptedException e) {
|
| 156 |
log.error("Thread was interrupted", e);
|
183 |
log.error("Thread was interrupted", e);
|
| 157 |
} catch (UserContextException e) {
|
184 |
} catch (UserContextException e) {
|
| 158 |
log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
|
185 |
log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
|
| - |
|
186 |
} catch(CatalogServiceException csex) {
|
| - |
|
187 |
log.error("Unable to get item details for itemId: " + order.getFreebieItemId(), csex);
|
| 159 |
}
|
188 |
}
|
| 160 |
return INDEX;
|
189 |
return INDEX;
|
| 161 |
}
|
190 |
}
|
| 162 |
|
191 |
|
| 163 |
private boolean canEditOrderAddress() {
|
192 |
private boolean canEditOrderAddress() {
|
| Line 525... |
Line 554... |
| 525 |
}
|
554 |
}
|
| 526 |
|
555 |
|
| 527 |
public void setPin(String pin) {
|
556 |
public void setPin(String pin) {
|
| 528 |
this.pin = pin;
|
557 |
this.pin = pin;
|
| 529 |
}
|
558 |
}
|
| - |
|
559 |
|
| - |
|
560 |
public String getFreebieItem() {
|
| - |
|
561 |
return freebieItem;
|
| - |
|
562 |
}
|
| - |
|
563 |
|
| - |
|
564 |
public void setFreebieItem(String freebieItem) {
|
| - |
|
565 |
this.freebieItem = freebieItem;
|
| - |
|
566 |
}
|
| - |
|
567 |
|
| - |
|
568 |
public String getDealText() {
|
| - |
|
569 |
return dealText;
|
| - |
|
570 |
}
|
| - |
|
571 |
|
| - |
|
572 |
public void setDealText(String dealText) {
|
| - |
|
573 |
this.dealText = dealText;
|
| - |
|
574 |
}
|
| - |
|
575 |
|
| - |
|
576 |
public String getParentOrderIdForFreebieOrder() {
|
| - |
|
577 |
return parentOrderIdForFreebieOrder;
|
| - |
|
578 |
}
|
| - |
|
579 |
|
| - |
|
580 |
public void setParentOrderIdForFreebieOrder(String parentOrderIdForFreebieOrder) {
|
| - |
|
581 |
this.parentOrderIdForFreebieOrder = parentOrderIdForFreebieOrder;
|
| - |
|
582 |
}
|
| - |
|
583 |
|
| - |
|
584 |
public String getFreebieOrderId() {
|
| - |
|
585 |
return freebieOrderId;
|
| - |
|
586 |
}
|
| - |
|
587 |
|
| - |
|
588 |
public void setFreebieOrderId(String freebieOrderId) {
|
| - |
|
589 |
this.freebieOrderId = freebieOrderId;
|
| - |
|
590 |
}
|
| - |
|
591 |
|
| 530 |
}
|
592 |
}
|
| 531 |
|
593 |
|