| Line 173... |
Line 173... |
| 173 |
// column order must match ItemLoaderService.createLoaderModel
|
173 |
// column order must match ItemLoaderService.createLoaderModel
|
| 174 |
private static final List<String> CATALOG_TEMPLATE_HEADERS = Arrays.asList("Product Group",
|
174 |
private static final List<String> CATALOG_TEMPLATE_HEADERS = Arrays.asList("Product Group",
|
| 175 |
"Category Id As per System", "Category", "HSNCode(Ensure that hsncode exists)", "Brand", "Model Number",
|
175 |
"Category Id As per System", "Category", "HSNCode(Ensure that hsncode exists)", "Brand", "Model Number",
|
| 176 |
"Model Name", "Color", "MRP", "SP", "MOP", "DP", "TP", "NLC", "Startdate", "Preferred Vendor", "Risky",
|
176 |
"Model Name", "Color", "MRP", "SP", "MOP", "DP", "TP", "NLC", "Startdate", "Preferred Vendor", "Risky",
|
| 177 |
"Weight in Kg", "Item type(1 for Serialized and 2 for non-serialized)", "TaxRate",
|
177 |
"Weight in Kg", "Item type(1 for Serialized and 2 for non-serialized)", "TaxRate",
|
| 178 |
"Brand Identifier (OEM model/SKU code - mandatory for smartphones of flagged brands)");
|
178 |
"Brand Identifier (OEM model/SKU code - optional)");
|
| 179 |
|
179 |
|
| 180 |
@GetMapping(value = "/catalog/template.xlsx")
|
180 |
@GetMapping(value = "/catalog/template.xlsx")
|
| 181 |
public ResponseEntity<byte[]> downloadCatalogTemplate() throws Exception {
|
181 |
public ResponseEntity<byte[]> downloadCatalogTemplate() throws Exception {
|
| 182 |
try (XSSFWorkbook workbook = new XSSFWorkbook(); ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
|
182 |
try (XSSFWorkbook workbook = new XSSFWorkbook(); ByteArrayOutputStream baos = new ByteArrayOutputStream()) {
|
| 183 |
XSSFSheet sheet = workbook.createSheet("items");
|
183 |
XSSFSheet sheet = workbook.createSheet("items");
|