| Line 67... |
Line 67... |
| 67 |
logger.error("Error while initializing one of the thrift clients", e);
|
67 |
logger.error("Error while initializing one of the thrift clients", e);
|
| 68 |
}
|
68 |
}
|
| 69 |
}
|
69 |
}
|
| 70 |
|
70 |
|
| 71 |
public ByteArrayOutputStream generateManifestFile(long warehouseId, long providerId, boolean isCod, List<Long> orderIds, String runner) {
|
71 |
public ByteArrayOutputStream generateManifestFile(long warehouseId, long providerId, boolean isCod, List<Long> orderIds, String runner) {
|
| 72 |
logger.info("Generating manifest file for warehouse "+warehouseId+" providerId "+providerId+"cod= "+isCod);
|
72 |
logger.info("Generating manifest file for warehouse "+warehouseId+" providerId "+providerId+" cod= "+isCod);
|
| 73 |
ByteArrayOutputStream baosPDF = null;
|
73 |
ByteArrayOutputStream baosPDF = null;
|
| 74 |
in.shop2020.model.v1.order.TransactionService.Client txnClient = tsc.getClient();
|
74 |
in.shop2020.model.v1.order.TransactionService.Client txnClient = tsc.getClient();
|
| 75 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = lsc.getClient();
|
75 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = lsc.getClient();
|
| 76 |
|
76 |
|
| 77 |
List<OrderStatus> statuses = new ArrayList<OrderStatus>();
|
77 |
List<OrderStatus> statuses = new ArrayList<OrderStatus>();
|
| Line 269... |
Line 269... |
| 269 |
logger.error("Error while creating the manifest file", e);
|
269 |
logger.error("Error while creating the manifest file", e);
|
| 270 |
}
|
270 |
}
|
| 271 |
|
271 |
|
| 272 |
|
272 |
|
| 273 |
String cod_str = isCod?"COD":"PREPAID";
|
273 |
String cod_str = isCod?"COD":"PREPAID";
|
| 274 |
String filename_manifest = "/tmp/manifest-"+warehouseId+"-"+providerId+"-"+cod_str+"-"+Calendar.getInstance().getTimeInMillis()+".pdf";
|
274 |
String filename_manifest = "/manifest-reports/manifest-"+warehouseId+"-"+providerId+"-"+cod_str+"-"+Calendar.getInstance().getTimeInMillis()+".pdf";
|
| 275 |
File f = new File(filename_manifest);
|
275 |
File f = new File(filename_manifest);
|
| 276 |
try{
|
276 |
try{
|
| 277 |
FileOutputStream fos = new FileOutputStream(f);
|
277 |
FileOutputStream fos = new FileOutputStream(f);
|
| 278 |
baosPDF.writeTo(fos);
|
278 |
baosPDF.writeTo(fos);
|
| 279 |
}
|
279 |
}
|