This is an automated email from the git hooks/post-receive script. New change to branch feature/1380-terminate_export in repository lima. See https://gitlab.nuiton.org/chorem/lima.git at 716dbd4 refs #1380 ferme la boite de dialogue de mise en attente dans tous les cas This branch includes the following new commits: new 6942d31 refs 1380 execute l'export même si aucune entitée new 716dbd4 refs #1380 ferme la boite de dialogue de mise en attente dans tous les cas The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 716dbd4737a4999cfb7c456c6f41f1e192ae3328 Author: David Cossé <cosse@codelutin.com> Date: Wed Jan 18 22:47:30 2017 +0100 refs #1380 ferme la boite de dialogue de mise en attente dans tous les cas commit 6942d31cbccb5bcb717b5447587e312bcdcf1626 Author: David Cossé <cosse@codelutin.com> Date: Wed Jan 18 22:46:47 2017 +0100 refs 1380 execute l'export même si aucune entitée -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1380-terminate_export in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit 6942d31cbccb5bcb717b5447587e312bcdcf1626 Author: David Cossé <cosse@codelutin.com> Date: Wed Jan 18 22:46:47 2017 +0100 refs 1380 execute l'export même si aucune entitée --- .../lima/business/ejb/ExportServiceImpl.java | 73 ++++++++-------------- 1 file changed, 25 insertions(+), 48 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java b/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java index ca0d7bb..7ceea96 100644 --- a/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java +++ b/lima-business/src/main/java/org/chorem/lima/business/ejb/ExportServiceImpl.java @@ -50,11 +50,9 @@ import org.chorem.lima.entity.Account; import org.chorem.lima.entity.AccountTopiaDao; import org.chorem.lima.entity.Entry; import org.chorem.lima.entity.EntryBook; -import org.chorem.lima.entity.EntryBookTopiaDao; import org.chorem.lima.entity.EntryTopiaDao; import org.chorem.lima.entity.FinancialStatement; import org.chorem.lima.entity.FinancialTransaction; -import org.chorem.lima.entity.FinancialTransactionTopiaDao; import org.chorem.lima.entity.FiscalPeriod; import org.chorem.lima.entity.Identity; import org.chorem.lima.entity.VatStatement; @@ -125,10 +123,9 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ AccountTopiaDao accountTopiaDao = getDaoHelper().getAccountDao(); List<Account> entities = accountTopiaDao.findAll(); - if (entities != null && !entities.isEmpty()) { - AccountModel model = new AccountModel(); - processExport(charset, exportedClass, exportResult, entities, model); - } + + AccountModel model = new AccountModel(); + processExport(charset, exportedClass, exportResult, entities, model); return results; } @@ -138,10 +135,8 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ Class exportedClass = EntryBook.class; ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); - EntryBookTopiaDao entryBookTopiaDao = getDaoHelper().getEntryBookDao(); - List<EntryBook> entities = entryBookTopiaDao.findAll(); + List<EntryBook> entities = getDaoHelper().getEntryBookDao().findAll(); - entities = entities == null ? Lists.newArrayList() : entities; EntryBookModel model = new EntryBookModel(); processExport(charset, exportedClass, exportResult, entities, model); @@ -156,7 +151,6 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ List<FiscalPeriod> entities = fiscalPeriodService.getAllFiscalPeriods(); - entities = entities == null ? Lists.newArrayList() : entities; FiscalPeriodModel model = new FiscalPeriodModel(); processExport(charset, exportedClass, exportResult, entities, model); @@ -168,11 +162,8 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ Class<FinancialTransaction> exportedClass = FinancialTransaction.class; ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); - FinancialTransactionTopiaDao financialTransactionTopiaDao = - getDaoHelper().getFinancialTransactionDao(); - List<FinancialTransaction> entities = financialTransactionTopiaDao.findAll(); + List<FinancialTransaction> entities = getDaoHelper().getFinancialTransactionDao().findAll(); - entities = entities == null ? Lists.newArrayList() : entities; FinancialTransactionModel model = new FinancialTransactionModel(entryBookService); processExport(charset, exportedClass, exportResult, entities, model); @@ -185,9 +176,8 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ Class<Entry> exportedClass = Entry.class; ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); - EntryTopiaDao dao = getDaoHelper().getEntryDao(); - List<Entry> entities = dao.findAll(); - entities = entities == null ? Lists.newArrayList() : entities; + List<Entry> entities = getDaoHelper().getEntryDao().findAll(); + EntryModel model = new EntryModel(accountService, entryBookService, financialTransactionService , humanReadable); processExport(charset, exportedClass, exportResult, entities, model); @@ -210,12 +200,11 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); List<FinancialStatement> rootFinancialStatements = financialStatementService.getRootFinancialStatements(); - if (rootFinancialStatements != null) { - FinancialStatementModel model = new FinancialStatementModel(); - List<FinancialStatement> financialStatements = new ArrayList<>(); - addAllSubFinancialStatements(financialStatements, rootFinancialStatements); - processExport(charset, exportedClass, exportResult, financialStatements, model); - } + FinancialStatementModel model = new FinancialStatementModel(); + List<FinancialStatement> financialStatements = new ArrayList<>(); + addAllSubFinancialStatements(financialStatements, rootFinancialStatements); + processExport(charset, exportedClass, exportResult, financialStatements, model); + return results; } @@ -236,12 +225,10 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); List<VatStatement> rootVatStatements = vatStatementService.getRootVatStatements(); - if (rootVatStatements != null) { - VatStatementModel model = new VatStatementModel(); - List<VatStatement> vatStatements = new ArrayList<>(); - getAllSubVATStatements(vatStatements, rootVatStatements); - processExport(charset, exportedClass, exportResult, vatStatements, model); - } + VatStatementModel model = new VatStatementModel(); + List<VatStatement> vatStatements = new ArrayList<>(); + getAllSubVATStatements(vatStatements, rootVatStatements); + processExport(charset, exportedClass, exportResult, vatStatements, model); return results; } @@ -282,10 +269,9 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); List<Account> accounts = accountService.getAllAccounts(); - if (accounts != null && !accounts.isEmpty()) { - AccountEBPModel model = new AccountEBPModel(); - processExport(charset, exportedClass, exportResult, accounts, model); - } + + AccountEBPModel model = new AccountEBPModel(); + processExport(charset, exportedClass, exportResult, accounts, model); return results; } @@ -296,12 +282,9 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); List<Entry> entries = getDaoHelper().getEntryDao().findAll(); - if (entries != null && !entries.isEmpty()) { - EntryEBPModel model = new EntryEBPModel(); - processExport(charset, exportedClass, exportResult, entries, model); - + EntryEBPModel model = new EntryEBPModel(); + processExport(charset, exportedClass, exportResult, entries, model); - } return results; } @@ -312,11 +295,8 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ ExportResult exportResult = results.createAddAndGetExportResult(exportedClass); List<EntryBook> entryBooks = entryBookService.getAllEntryBooks(); - if (entryBooks != null && !entryBooks.isEmpty()) { - - EntryBookModel model = new EntryBookModel(); - processExport(charset, exportedClass, exportResult, entryBooks, model); - } + EntryBookModel model = new EntryBookModel(); + processExport(charset, exportedClass, exportResult, entryBooks, model); return results; } @@ -335,11 +315,8 @@ public class ExportServiceImpl extends AbstractLimaService implements ExportServ entries.addAll(entriesAtNew); entries.addAll(entities); - if (!entries.isEmpty()) { - FiscalControlExportModel model = new FiscalControlExportModel(); - processExport(charset, exportedClass, exportResult, entities, model); - } - + FiscalControlExportModel model = new FiscalControlExportModel(); + processExport(charset, exportedClass, exportResult, entities, model); return exportResult; } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1380-terminate_export in repository lima. See https://gitlab.nuiton.org/chorem/lima.git commit 716dbd4737a4999cfb7c456c6f41f1e192ae3328 Author: David Cossé <cosse@codelutin.com> Date: Wed Jan 18 22:47:30 2017 +0100 refs #1380 ferme la boite de dialogue de mise en attente dans tous les cas --- .../src/main/java/org/chorem/lima/ui/importexport/ImportExport.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java index 299fa6b..8327202 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/importexport/ImportExport.java @@ -358,9 +358,6 @@ public class ImportExport { log.debug("importMode : " + importMode); } - //hidde wait dialog panel - waitView.setVisible(false); - // display result dialog if (verboseMode) { ImportExportResults globalResult = get(); @@ -386,6 +383,9 @@ public class ImportExport { if (log.isErrorEnabled()) { log.error("Can't get result message", ex); } + } finally { + //hidde wait dialog panel + waitView.dispose(); } } }.execute(); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm