| Line 23... |
Line 23... |
| 23 |
import com.itextpdf.text.Font.FontFamily;
|
23 |
import com.itextpdf.text.Font.FontFamily;
|
| 24 |
import com.itextpdf.text.pdf.PdfPCell;
|
24 |
import com.itextpdf.text.pdf.PdfPCell;
|
| 25 |
import com.itextpdf.text.pdf.PdfPTable;
|
25 |
import com.itextpdf.text.pdf.PdfPTable;
|
| 26 |
import com.itextpdf.text.pdf.PdfWriter;
|
26 |
import com.itextpdf.text.pdf.PdfWriter;
|
| 27 |
|
27 |
|
| 28 |
import in.shop2020.thrift.clients.WarehouseServiceClient;
|
28 |
import in.shop2020.thrift.clients.WarehouseClient;
|
| 29 |
import in.shop2020.warehouse.LineItem;
|
29 |
import in.shop2020.warehouse.LineItem;
|
| 30 |
import in.shop2020.warehouse.PurchaseOrder;
|
30 |
import in.shop2020.warehouse.PurchaseOrder;
|
| 31 |
import in.shop2020.warehouse.Supplier;
|
31 |
import in.shop2020.warehouse.Supplier;
|
| 32 |
import in.shop2020.warehouse.WarehouseService.Client;
|
32 |
import in.shop2020.warehouse.WarehouseService.Client;
|
| 33 |
|
33 |
|
| Line 202... |
Line 202... |
| 202 |
return totalCell;
|
202 |
return totalCell;
|
| 203 |
}
|
203 |
}
|
| 204 |
|
204 |
|
| 205 |
public static void main(String[] args) throws Exception {
|
205 |
public static void main(String[] args) throws Exception {
|
| 206 |
long purchaseOrderId = 10;
|
206 |
long purchaseOrderId = 10;
|
| 207 |
WarehouseServiceClient warehouseServiceClient = new WarehouseServiceClient();
|
207 |
WarehouseClient warehouseServiceClient = new WarehouseClient();
|
| 208 |
Client client = warehouseServiceClient.getClient();
|
208 |
Client client = warehouseServiceClient.getClient();
|
| 209 |
in.shop2020.warehouse.PurchaseOrder purchaseOrder = client.getPurchaseOrder(purchaseOrderId);
|
209 |
in.shop2020.warehouse.PurchaseOrder purchaseOrder = client.getPurchaseOrder(purchaseOrderId);
|
| 210 |
Supplier supplier = client.getSupplier(purchaseOrder.getSupplierId());
|
210 |
Supplier supplier = client.getSupplier(purchaseOrder.getSupplierId());
|
| 211 |
String filename = generatePdfSheet(purchaseOrder, supplier);
|
211 |
String filename = generatePdfSheet(purchaseOrder, supplier);
|
| 212 |
System.out.println("PO generated in: " + filename);
|
212 |
System.out.println("PO generated in: " + filename);
|