| Line 5... |
Line 5... |
| 5 |
import java.io.FileOutputStream;
|
5 |
import java.io.FileOutputStream;
|
| 6 |
import java.io.IOException;
|
6 |
import java.io.IOException;
|
| 7 |
import java.net.MalformedURLException;
|
7 |
import java.net.MalformedURLException;
|
| 8 |
import java.text.DateFormat;
|
8 |
import java.text.DateFormat;
|
| 9 |
import java.text.DecimalFormat;
|
9 |
import java.text.DecimalFormat;
|
| - |
|
10 |
import java.util.ArrayList;
|
| 10 |
import java.util.Date;
|
11 |
import java.util.Date;
|
| 11 |
import java.util.List;
|
12 |
import java.util.List;
|
| 12 |
|
13 |
|
| 13 |
import org.apache.thrift.TException;
|
14 |
import org.apache.thrift.TException;
|
| 14 |
import org.slf4j.Logger;
|
15 |
import org.slf4j.Logger;
|
| Line 62... |
Line 63... |
| 62 |
ByteArrayOutputStream baosPDF = null;
|
63 |
ByteArrayOutputStream baosPDF = null;
|
| 63 |
in.shop2020.model.v1.order.TransactionService.Client txnClient = tsc.getClient();
|
64 |
in.shop2020.model.v1.order.TransactionService.Client txnClient = tsc.getClient();
|
| 64 |
in.shop2020.model.v1.catalog.InventoryService.Client inventoryClient = csc.getClient();
|
65 |
in.shop2020.model.v1.catalog.InventoryService.Client inventoryClient = csc.getClient();
|
| 65 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = lsc.getClient();
|
66 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = lsc.getClient();
|
| 66 |
|
67 |
|
| - |
|
68 |
List<OrderStatus> statuses = new ArrayList<OrderStatus>();
|
| - |
|
69 |
statuses.add(OrderStatus.BILLED);
|
| - |
|
70 |
statuses.add(OrderStatus.MANIFESTED);
|
| - |
|
71 |
|
| 67 |
List<Order> orders = null;
|
72 |
List<Order> orders = null;
|
| 68 |
Warehouse warehouse = null;
|
73 |
Warehouse warehouse = null;
|
| 69 |
Provider provider = null;
|
74 |
Provider provider = null;
|
| 70 |
try {
|
75 |
try {
|
| 71 |
orders = txnClient.getAllOrders(OrderStatus.BILLED, 0L, new Date().getTime(), warehouseId);
|
76 |
orders = txnClient.getOrdersInBatch(statuses, 0, 0, warehouseId);
|
| 72 |
warehouse = inventoryClient.getWarehouse(warehouseId);
|
77 |
warehouse = inventoryClient.getWarehouse(warehouseId);
|
| 73 |
provider = logisticsClient.getProvider(providerId);
|
78 |
provider = logisticsClient.getProvider(providerId);
|
| 74 |
} catch (TException e) {
|
79 |
} catch (TException e) {
|
| 75 |
logger.error("Error getting information from one of the Thrift Services: ", e);
|
80 |
logger.error("Error getting information from one of the Thrift Services: ", e);
|
| 76 |
return baosPDF;
|
81 |
return baosPDF;
|