| Line 5... |
Line 5... |
| 5 |
import in.shop2020.crm.SearchFilter;
|
5 |
import in.shop2020.crm.SearchFilter;
|
| 6 |
import in.shop2020.crm.Ticket;
|
6 |
import in.shop2020.crm.Ticket;
|
| 7 |
import in.shop2020.crm.TicketCategory;
|
7 |
import in.shop2020.crm.TicketCategory;
|
| 8 |
import in.shop2020.crm.TicketPriority;
|
8 |
import in.shop2020.crm.TicketPriority;
|
| 9 |
import in.shop2020.crm.TicketStatus;
|
9 |
import in.shop2020.crm.TicketStatus;
|
| - |
|
10 |
import in.shop2020.logistics.PickupStore;
|
| 10 |
import in.shop2020.model.v1.order.LineItem;
|
11 |
import in.shop2020.model.v1.order.LineItem;
|
| 11 |
import in.shop2020.model.v1.order.Order;
|
12 |
import in.shop2020.model.v1.order.Order;
|
| 12 |
import in.shop2020.model.v1.order.OrderStatus;
|
13 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 13 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
14 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 14 |
import in.shop2020.model.v1.user.Address;
|
15 |
import in.shop2020.model.v1.user.Address;
|
| Line 18... |
Line 19... |
| 18 |
import in.shop2020.payments.Payment;
|
19 |
import in.shop2020.payments.Payment;
|
| 19 |
import in.shop2020.payments.PaymentException;
|
20 |
import in.shop2020.payments.PaymentException;
|
| 20 |
import in.shop2020.payments.PaymentService.Client;
|
21 |
import in.shop2020.payments.PaymentService.Client;
|
| 21 |
import in.shop2020.serving.auth.CRMAuthorizingRealm;
|
22 |
import in.shop2020.serving.auth.CRMAuthorizingRealm;
|
| 22 |
import in.shop2020.serving.model.ShipmentUpdate;
|
23 |
import in.shop2020.serving.model.ShipmentUpdate;
|
| 23 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
- |
|
| 24 |
import in.shop2020.serving.services.AramexTrackingService;
|
24 |
import in.shop2020.serving.services.AramexTrackingService;
|
| - |
|
25 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
| 25 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
26 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
| 26 |
import in.shop2020.thrift.clients.CRMClient;
|
27 |
import in.shop2020.thrift.clients.CRMClient;
|
| - |
|
28 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 27 |
import in.shop2020.thrift.clients.PaymentClient;
|
29 |
import in.shop2020.thrift.clients.PaymentClient;
|
| 28 |
import in.shop2020.thrift.clients.TransactionClient;
|
30 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 29 |
import in.shop2020.thrift.clients.UserClient;
|
31 |
import in.shop2020.thrift.clients.UserClient;
|
| 30 |
import in.shop2020.utils.ModelUtils;
|
32 |
import in.shop2020.utils.ModelUtils;
|
| 31 |
|
33 |
|
| Line 38... |
Line 40... |
| 38 |
import java.util.concurrent.Executors;
|
40 |
import java.util.concurrent.Executors;
|
| 39 |
import java.util.concurrent.TimeUnit;
|
41 |
import java.util.concurrent.TimeUnit;
|
| 40 |
|
42 |
|
| 41 |
import net.htmlparser.jericho.Source;
|
43 |
import net.htmlparser.jericho.Source;
|
| 42 |
|
44 |
|
| - |
|
45 |
import org.apache.commons.lang.StringUtils;
|
| 43 |
import org.apache.log4j.Logger;
|
46 |
import org.apache.log4j.Logger;
|
| 44 |
import org.apache.thrift.TException;
|
47 |
import org.apache.thrift.TException;
|
| 45 |
import org.apache.thrift.transport.TTransportException;
|
48 |
import org.apache.thrift.transport.TTransportException;
|
| 46 |
|
49 |
|
| 47 |
/**
|
50 |
/**
|
| Line 103... |
Line 106... |
| 103 |
}
|
106 |
}
|
| 104 |
else if (order.getLogistics_provider_id() == 3) {
|
107 |
else if (order.getLogistics_provider_id() == 3) {
|
| 105 |
shipmentUpdates = delhiveryTrackingService.getUpdates(order.getAirwaybill_no());
|
108 |
shipmentUpdates = delhiveryTrackingService.getUpdates(order.getAirwaybill_no());
|
| 106 |
}
|
109 |
}
|
| 107 |
else {
|
110 |
else {
|
| - |
|
111 |
shipmentUpdates = new ArrayList<ShipmentUpdate>();
|
| 108 |
log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
|
112 |
log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
|
| 109 |
}
|
113 |
}
|
| 110 |
return true;
|
114 |
return true;
|
| 111 |
}
|
115 |
}
|
| 112 |
}), 5, TimeUnit.SECONDS);
|
116 |
}), 5, TimeUnit.SECONDS);
|
| Line 276... |
Line 280... |
| 276 |
|
280 |
|
| 277 |
public int convertDouble(double value) {
|
281 |
public int convertDouble(double value) {
|
| 278 |
return (int)value;
|
282 |
return (int)value;
|
| 279 |
}
|
283 |
}
|
| 280 |
|
284 |
|
| - |
|
285 |
public String getShippingAddressOfStore(long storeId) {
|
| - |
|
286 |
try {
|
| - |
|
287 |
in.shop2020.logistics.LogisticsService.Client client = new LogisticsClient().getClient();
|
| - |
|
288 |
PickupStore store = client.getPickupStore(storeId);
|
| - |
|
289 |
return StringUtils.join(new String[] {
|
| - |
|
290 |
store.getName(),
|
| - |
|
291 |
store.getLine1(),
|
| - |
|
292 |
store.getLine2(),
|
| - |
|
293 |
store.getPin(),
|
| - |
|
294 |
store.getCity(),
|
| - |
|
295 |
store.getState(),
|
| - |
|
296 |
store.getPhone()}, ",");
|
| - |
|
297 |
} catch (Exception e) {
|
| - |
|
298 |
return "";
|
| - |
|
299 |
}
|
| - |
|
300 |
}
|
| - |
|
301 |
|
| 281 |
public String getAddress(Order order) {
|
302 |
public String getAddress(Order order) {
|
| 282 |
return ModelUtils.extractAddressFromOrder(order);
|
303 |
return ModelUtils.extractAddressFromOrder(order);
|
| 283 |
}
|
304 |
}
|
| 284 |
|
305 |
|
| 285 |
public String getPaymentMethod(List<Attribute> paymentAttributes) {
|
306 |
public String getPaymentMethod(List<Attribute> paymentAttributes) {
|