| Line 18... |
Line 18... |
| 18 |
import in.shop2020.serving.utils.DesEncrypter;
|
18 |
import in.shop2020.serving.utils.DesEncrypter;
|
| 19 |
import in.shop2020.serving.utils.Utils;
|
19 |
import in.shop2020.serving.utils.Utils;
|
| 20 |
import in.shop2020.thrift.clients.TransactionClient;
|
20 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 21 |
import in.shop2020.thrift.clients.UserClient;
|
21 |
import in.shop2020.thrift.clients.UserClient;
|
| 22 |
import in.shop2020.utils.DataLogger;
|
22 |
import in.shop2020.utils.DataLogger;
|
| - |
|
23 |
import in.shop2020.utils.FedExShipAccountInfo;
|
| 23 |
|
24 |
|
| 24 |
import java.util.ArrayList;
|
25 |
import java.util.ArrayList;
|
| 25 |
import java.util.Arrays;
|
26 |
import java.util.Arrays;
|
| 26 |
import java.util.List;
|
27 |
import java.util.List;
|
| 27 |
|
28 |
|
| Line 30... |
Line 31... |
| 30 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
31 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
| 31 |
import org.apache.struts2.convention.annotation.Result;
|
32 |
import org.apache.struts2.convention.annotation.Result;
|
| 32 |
import org.apache.struts2.convention.annotation.Results;
|
33 |
import org.apache.struts2.convention.annotation.Results;
|
| 33 |
import org.apache.thrift.TException;
|
34 |
import org.apache.thrift.TException;
|
| 34 |
import org.apache.thrift.transport.TTransportException;
|
35 |
import org.apache.thrift.transport.TTransportException;
|
| - |
|
36 |
|
| - |
|
37 |
import com.ShipWebServiceClient;
|
| - |
|
38 |
import com.fedex.ship.stub.CompletedPackageDetail;
|
| - |
|
39 |
import com.fedex.ship.stub.CompletedShipmentDetail;
|
| - |
|
40 |
import com.fedex.ship.stub.ProcessShipmentReply;
|
| - |
|
41 |
import com.fedex.ship.stub.TrackingId;
|
| - |
|
42 |
|
| 35 |
import nl.captcha.Captcha;
|
43 |
import nl.captcha.Captcha;
|
| 36 |
|
44 |
|
| 37 |
@SuppressWarnings("serial")
|
45 |
@SuppressWarnings("serial")
|
| 38 |
@InterceptorRefs({
|
46 |
@InterceptorRefs({
|
| 39 |
@InterceptorRef("myDefault"),
|
47 |
@InterceptorRef("myDefault"),
|
| Line 409... |
Line 417... |
| 409 |
try {
|
417 |
try {
|
| 410 |
TransactionClient transactionServiceClient = new TransactionClient();
|
418 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 411 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
419 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
| 412 |
= transactionServiceClient.getClient();
|
420 |
= transactionServiceClient.getClient();
|
| 413 |
transactionClient.updateShipmentAddress(orderId, addressId);
|
421 |
transactionClient.updateShipmentAddress(orderId, addressId);
|
| - |
|
422 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
| - |
|
423 |
if(t_order.getLogistics_provider_id()==7L){
|
| - |
|
424 |
FedExShipAccountInfo fedexAccountInfo = FedExShipAccountInfo.getFedExInfo();
|
| - |
|
425 |
ProcessShipmentReply processShipmentReply = ShipWebServiceClient.getShipmentCreationReply(t_order,fedexAccountInfo.getClientDetail(),fedexAccountInfo.getWad(),fedexAccountInfo.getEndPointAddress());
|
| - |
|
426 |
CompletedShipmentDetail completedShipmentDetails = processShipmentReply.getCompletedShipmentDetail();
|
| - |
|
427 |
CompletedPackageDetail completedPackageDetails = completedShipmentDetails.getCompletedPackageDetails(0);
|
| - |
|
428 |
TrackingId trackId= completedPackageDetails.getTrackingIds(0);
|
| - |
|
429 |
t_order = transactionClient.updateOrderAWB(t_order.getId(), trackId.getTrackingNumber());
|
| - |
|
430 |
}
|
| 414 |
} catch (TTransportException e) {
|
431 |
} catch (TTransportException e) {
|
| 415 |
log.error("Could not update address: " + addressId + " for orderId: " + orderId, e);
|
432 |
log.error("Could not update address: " + addressId + " for orderId: " + orderId, e);
|
| 416 |
} catch (NumberFormatException e) {
|
433 |
} catch (NumberFormatException e) {
|
| 417 |
log.error("Could not update address: " + addressId + " for orderId: " + orderId, e);
|
434 |
log.error("Could not update address: " + addressId + " for orderId: " + orderId, e);
|
| 418 |
} catch (TransactionServiceException e) {
|
435 |
} catch (TransactionServiceException e) {
|