| Line 224... |
Line 224... |
| 224 |
return quantity;
|
224 |
return quantity;
|
| 225 |
}
|
225 |
}
|
| 226 |
|
226 |
|
| 227 |
public String download() throws Exception {
|
227 |
public String download() throws Exception {
|
| 228 |
InputStream is = getClass().getClassLoader().getResourceAsStream("orderformat.xlsx");
|
228 |
InputStream is = getClass().getClassLoader().getResourceAsStream("orderformat.xlsx");
|
| 229 |
logger.info("is stream is " + (is==null?"null" : "not null"));
|
- |
|
| 230 |
XSSFWorkbook workBook = new XSSFWorkbook(is);
|
229 |
XSSFWorkbook workBook = new XSSFWorkbook(is);
|
| 231 |
XSSFDataFormat df1 = workBook.createDataFormat();
|
230 |
XSSFDataFormat df1 = workBook.createDataFormat();
|
| 232 |
CellStyle cs = workBook.createCellStyle();
|
231 |
CellStyle cs = workBook.createCellStyle();
|
| 233 |
cs.setDataFormat(df1.getFormat("dd-mm-yy HH:mm"));
|
232 |
cs.setDataFormat(df1.getFormat("dd-mm-yy HH:mm"));
|
| 234 |
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
233 |
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
| Line 297... |
Line 296... |
| 297 |
row.createCell(i++).setCellValue("COD");
|
296 |
row.createCell(i++).setCellValue("COD");
|
| 298 |
} else {
|
297 |
} else {
|
| 299 |
row.createCell(i++).setCellValue("PREPAID");
|
298 |
row.createCell(i++).setCellValue("PREPAID");
|
| 300 |
}
|
299 |
}
|
| 301 |
row.createCell(i++).setCellValue(o.getStatus().getValue());
|
300 |
row.createCell(i++).setCellValue(o.getStatus().getValue());
|
| - |
|
301 |
row.createCell(i++).setCellValue(o.getCustomer_id());
|
| - |
|
302 |
row.createCell(i++).setCellValue(o.getCustomer_name());
|
| 302 |
row.createCell(i++).setCellValue(o.getCustomer_city());
|
303 |
row.createCell(i++).setCellValue(o.getCustomer_city());
|
| 303 |
row.createCell(i++).setCellValue(o.getLineitems().get(0).getItem_id());
|
304 |
row.createCell(i++).setCellValue(o.getLineitems().get(0).getItem_id());
|
| 304 |
row.createCell(i++).setCellValue((o.getLineitems().get(0).getBrand() + " " + getValidName(o.getLineitems().get(0).getModel_name()) +" " + getValidName(o.getLineitems().get(0).getModel_number()).replaceAll(" ", " ")));
|
305 |
row.createCell(i++).setCellValue((o.getLineitems().get(0).getBrand() + " " + getValidName(o.getLineitems().get(0).getModel_name()) +" " + getValidName(o.getLineitems().get(0).getModel_number()).replaceAll(" ", " ")));
|
| 305 |
rowNum++;
|
306 |
rowNum++;
|
| 306 |
}
|
307 |
}
|