| Line 1... |
Line 1... |
| 1 |
package in.shop2020.serving.controllers;
|
1 |
package in.shop2020.serving.controllers;
|
| 2 |
|
2 |
|
| 3 |
import in.shop2020.datalogger.EventType;
|
3 |
import in.shop2020.datalogger.EventType;
|
| - |
|
4 |
import in.shop2020.model.v1.inventory.Warehouse;
|
| 4 |
import in.shop2020.model.v1.order.Attribute;
|
5 |
import in.shop2020.model.v1.order.Attribute;
|
| 5 |
import in.shop2020.model.v1.order.Order;
|
6 |
import in.shop2020.model.v1.order.Order;
|
| 6 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
7 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 7 |
import in.shop2020.model.v1.user.Address;
|
8 |
import in.shop2020.model.v1.user.Address;
|
| 8 |
import in.shop2020.model.v1.user.Cart;
|
9 |
import in.shop2020.model.v1.user.Cart;
|
| Line 17... |
Line 18... |
| 17 |
import in.shop2020.serving.services.IPaymentService;
|
18 |
import in.shop2020.serving.services.IPaymentService;
|
| 18 |
import in.shop2020.serving.services.InnovitiPaymentService;
|
19 |
import in.shop2020.serving.services.InnovitiPaymentService;
|
| 19 |
//import in.shop2020.serving.services.PayuPaymentService;
|
20 |
//import in.shop2020.serving.services.PayuPaymentService;
|
| 20 |
import in.shop2020.serving.utils.DesEncrypter;
|
21 |
import in.shop2020.serving.utils.DesEncrypter;
|
| 21 |
import in.shop2020.serving.utils.Utils;
|
22 |
import in.shop2020.serving.utils.Utils;
|
| - |
|
23 |
import in.shop2020.thrift.clients.InventoryClient;
|
| 22 |
import in.shop2020.thrift.clients.TransactionClient;
|
24 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 23 |
import in.shop2020.thrift.clients.UserClient;
|
25 |
import in.shop2020.thrift.clients.UserClient;
|
| 24 |
import in.shop2020.utils.DataLogger;
|
26 |
import in.shop2020.utils.DataLogger;
|
| 25 |
import in.shop2020.utils.FedExShipAccountInfo;
|
27 |
import in.shop2020.utils.FedExShipAccountInfo;
|
| 26 |
|
28 |
|
| Line 453... |
Line 455... |
| 453 |
TransactionClient transactionServiceClient = new TransactionClient();
|
455 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 454 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
456 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
| 455 |
= transactionServiceClient.getClient();
|
457 |
= transactionServiceClient.getClient();
|
| 456 |
transactionClient.updateShipmentAddress(orderId, addressId);
|
458 |
transactionClient.updateShipmentAddress(orderId, addressId);
|
| 457 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
459 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
| - |
|
460 |
Warehouse warehouse = null;
|
| - |
|
461 |
try{
|
| - |
|
462 |
InventoryClient isc = new InventoryClient();
|
| - |
|
463 |
warehouse = isc.getClient().getWarehouse(t_order.getWarehouse_id());
|
| - |
|
464 |
} catch(Exception e) {
|
| - |
|
465 |
log.error("Unable to get warehouse for id : " + t_order.getWarehouse_id(), e);
|
| - |
|
466 |
//TODO throw e;
|
| - |
|
467 |
}
|
| 458 |
if(t_order.getLogistics_provider_id()==7L){
|
468 |
if(t_order.getLogistics_provider_id()==7L){
|
| 459 |
FedExShipAccountInfo fedexAccountInfo = FedExShipAccountInfo.getFedExInfo();
|
469 |
FedExShipAccountInfo fedexAccountInfo = FedExShipAccountInfo.getFedExInfo(warehouse.getLogisticsLocation());
|
| 460 |
ProcessShipmentReply processShipmentReply = ShipWebServiceClient.getShipmentCreationReply(t_order,fedexAccountInfo.getClientDetail(),fedexAccountInfo.getWad(),fedexAccountInfo.getEndPointAddress());
|
470 |
ProcessShipmentReply processShipmentReply = ShipWebServiceClient.getShipmentCreationReply(t_order,fedexAccountInfo.getClientDetail(),fedexAccountInfo.getWad(),fedexAccountInfo.getEndPointAddress());
|
| 461 |
CompletedShipmentDetail completedShipmentDetails = processShipmentReply.getCompletedShipmentDetail();
|
471 |
CompletedShipmentDetail completedShipmentDetails = processShipmentReply.getCompletedShipmentDetail();
|
| 462 |
CompletedPackageDetail completedPackageDetails = completedShipmentDetails.getCompletedPackageDetails(0);
|
472 |
CompletedPackageDetail completedPackageDetails = completedShipmentDetails.getCompletedPackageDetails(0);
|
| 463 |
TrackingId trackId= completedPackageDetails.getTrackingIds(0);
|
473 |
TrackingId trackId= completedPackageDetails.getTrackingIds(0);
|
| 464 |
t_order = transactionClient.updateOrderAWB(t_order.getId(), trackId.getTrackingNumber());
|
474 |
t_order = transactionClient.updateOrderAWB(t_order.getId(), trackId.getTrackingNumber());
|