diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/sendaAmigo/ImportarClientesController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/sendaAmigo/ImportarClientesController.java index 2b726dd9c..e032d8a9c 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/sendaAmigo/ImportarClientesController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/sendaAmigo/ImportarClientesController.java @@ -52,7 +52,7 @@ public class ImportarClientesController extends MyGenericForwardComposer { } - public void onClick$btnSalvar(Event ev) throws InterruptedException { + public void onUpload(UploadEvent event) throws IOException, InterruptedException { if (empresasList.getSelectedCount() <= 0){ Messagebox.show(Labels.getLabel("importarClientesController.MSG.suscribirErro"), Labels.getLabel("importarClientesController.window.title"), @@ -60,7 +60,12 @@ public class ImportarClientesController extends MyGenericForwardComposer { return; } - String[] resultado = importacaoClientesService.salvarClientes(clientes, (List)(Object)empresasList.getSelectedsItens()); + Media media = event.getMedia(); + + Reader reader = media.getReaderData(); + String[] resultado = importacaoClientesService.lerArquivo(reader, (List)(Object)empresasList.getSelectedsItens()); + reader.close(); + String gravados = resultado[0]; Messagebox.show(gravados, Labels.getLabel("importarClientesController.window.title"), @@ -71,18 +76,7 @@ public class ImportarClientesController extends MyGenericForwardComposer { InputStream is = new ByteArrayInputStream(erros.getBytes()); Filedownload.save(is, "application/txt", "erros_importacao.txt"); } - - lblQtdeClientesImportar.setValue(""); - } - - public void onUpload(UploadEvent event) throws IOException { - Media media = event.getMedia(); - - Reader reader = media.getReaderData(); - clientes = importacaoClientesService.lerArquivo(reader); - reader.close(); - - lblQtdeClientesImportar.setValue(String.valueOf(clientes.size())); + } public List getLsEmpresa() { diff --git a/src/java/spring-config.xml b/src/java/spring-config.xml index 34bfb5212..4a316c7fb 100644 --- a/src/java/spring-config.xml +++ b/src/java/spring-config.xml @@ -352,6 +352,7 @@ ${database.dialect} + ${database.batch_size} ${database.showSql} true diff --git a/web/WEB-INF/zk.xml b/web/WEB-INF/zk.xml index 5af667010..6800aa1ab 100644 --- a/web/WEB-INF/zk.xml +++ b/web/WEB-INF/zk.xml @@ -12,8 +12,9 @@ false + 50000 - + ThreadLocal Synchronization Listener org.zkoss.zkplus.util.ThreadLocalListener diff --git a/web/gui/configuraciones_comerciales/importarClientes.zul b/web/gui/configuraciones_comerciales/importarClientes.zul index 9ca31c5bb..c838d1cce 100644 --- a/web/gui/configuraciones_comerciales/importarClientes.zul +++ b/web/gui/configuraciones_comerciales/importarClientes.zul @@ -10,8 +10,6 @@ apply="${importarClientesController}" contentStyle="overflow:auto" height="470px" width="830px" border="normal"> -