[tutti] branch develop updated (5af5f4d -> d74f143)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository tutti. See http://git.codelutin.com/tutti.git from 5af5f4d refs-50 new d74f143 refs-50 #5866: Campagne CAMANOC en cours : erreur à la génération du pdf à analyser The 1 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 d74f1434f7840484408b677ab27970c15e598bca Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 29 15:00:37 2014 +0200 refs-50 #5866: Campagne CAMANOC en cours : erreur à la génération du pdf à analyser Summary of changes: .../tutti/service/export/pdf/CatchesPdfExportService.java | 9 +++++++++ .../src/main/resources/i18n/tutti-service_fr_FR.properties | 1 + 2 files changed, 10 insertions(+) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See http://git.codelutin.com/tutti.git commit d74f1434f7840484408b677ab27970c15e598bca Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 29 15:00:37 2014 +0200 refs-50 #5866: Campagne CAMANOC en cours : erreur à la génération du pdf à analyser --- .../tutti/service/export/pdf/CatchesPdfExportService.java | 9 +++++++++ .../src/main/resources/i18n/tutti-service_fr_FR.properties | 1 + 2 files changed, 10 insertions(+) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/pdf/CatchesPdfExportService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/pdf/CatchesPdfExportService.java index cdd88d9..f82c2c4 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/pdf/CatchesPdfExportService.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/pdf/CatchesPdfExportService.java @@ -39,8 +39,10 @@ import freemarker.ext.beans.BeansWrapper; import freemarker.template.Configuration; import freemarker.template.Template; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.nuiton.jaxx.application.ApplicationBusinessException; import org.nuiton.jaxx.application.ApplicationTechnicalException; import org.xhtmlrenderer.pdf.ITextRenderer; @@ -212,6 +214,13 @@ public class CatchesPdfExportService extends AbstractTuttiService { code = species.getRefTaxCode(); } + + if (StringUtils.isEmpty(code)) { + + + throw new ApplicationBusinessException(t("tutti.pdf.export.missing.species.code", species.getReferenceTaxonId(), species.getName())); + } + PdfExportBatchEntry pdfEntry = new PdfExportBatchEntry(code, species.getName(), speciesWithVerncularCode.getVernacularCode(), diff --git a/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties b/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties index 14cec28..dd2ceb6 100644 --- a/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties +++ b/tutti-service/src/main/resources/i18n/tutti-service_fr_FR.properties @@ -11,6 +11,7 @@ tutti.property.fishingOperationLocation=Lieu tutti.property.fishingOperationNumber=Numéro de trait tutti.property.fractionName=Fraction tutti.property.gear=Engin +tutti.pdf.export.missing.species.code=Une espèce (referenceId %s, nom scientifique %s) n'a ni code campagne, ni code refTax. tutti.property.gearShootingStartDate=Date de début de traîne tutti.property.genusSpecies=Nom scientifique tutti.property.internationalRegistrationCode=Immatriculation internationale (ou nationale si non trouvée) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm