Gestione formato CSV e EXCEL su export ANAGRAFICHE ARTICOLI

(cherry picked from commit dae03dc91f)
This commit is contained in:
2025-10-20 18:06:17 +02:00
parent 18403554e7
commit 60fb37ad8b

View File

@@ -2,6 +2,7 @@ package it.integry.ems.product.export;
import it.integry.ems.export.base.BaseEntityExporter;
import it.integry.ems.export.base.EntityExportResponse;
import it.integry.ems.export.base.ExportFromQuery;
import it.integry.ems.export.base.IEntityExporter;
import it.integry.ems.product.export.services.*;
import org.springframework.web.context.ContextLoader;
@@ -34,6 +35,10 @@ public class ArticoliExporter extends BaseEntityExporter implements IEntityExpor
case SLIM2K:
Slim2kService slim2kService = context.getBean(Slim2kService.class);
return slim2kService.export(type, format);
case EXCEL:
case CSV:
ExportFromQuery expq = ContextLoader.getCurrentWebApplicationContext().getBean(ExportFromQuery.class);
return expq.export(username, type, format, whereCond);
default:
throw new Exception(String.format("Formato %s non supportato", format));
}
@@ -49,7 +54,9 @@ public class ArticoliExporter extends BaseEntityExporter implements IEntityExpor
WBC_STOCK_LIST("GET_STOCK_LIST"),
YOCABE("YOCABE"),
SLIM2K("SLIM2K"),
WOOCOMMERCE_STOCK("WOOCOMMERCE_STOCK");
WOOCOMMERCE_STOCK("WOOCOMMERCE_STOCK"),
EXCEL("EXCEL"),
CSV("CSV");
private String text;