branch develop-3.x updated (c8d1d25 -> ffeb546)
This is an automated email from the git hooks/post-receive script. New change to branch develop-3.x in repository tutti. See http://git.codelutin.com/tutti.git from c8d1d25 fixes #7020: [CAPTURE] Erreur lors de l'élévation des poids Merge branch 'feature/7020' into develop-3.x new 29ec254 correction du facteur d'elevation pour les export pdf et csv (refs #7021) new 9d1f409 correction du facteur d'elevation pour l'export generique (refs #7021) new ffeb546 fixes #7021: [CAPTURE] fichier pdf trait : l'élévation des poids ne marche plus Merge branch 'feature/7021' into develop-3.x The 3 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 ffeb5462a132852bba8e2a58b2fd47088fea7ab8 Merge: c8d1d25 9d1f409 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:21:02 2015 +0200 fixes #7021: [CAPTURE] fichier pdf trait : l'élévation des poids ne marche plus Merge branch 'feature/7021' into develop-3.x commit 9d1f409b16eee20995c3b693141c8ab8f10f74d0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:18:41 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) commit 29ec254842767bd32870dcbe32e37681834b33d8 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:17:24 2015 +0200 correction du facteur d'elevation pour les export pdf et csv (refs #7021) Summary of changes: .../tutti/service/export/ExportCatchContext.java | 50 +++++++++++++--------- .../service/export/generic/TuttiExportService.java | 12 +++--- 2 files changed, 36 insertions(+), 26 deletions(-) -- 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-3.x in repository tutti. See http://git.codelutin.com/tutti.git commit 29ec254842767bd32870dcbe32e37681834b33d8 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:17:24 2015 +0200 correction du facteur d'elevation pour les export pdf et csv (refs #7021) --- .../tutti/service/export/ExportCatchContext.java | 50 +++++++++++++--------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportCatchContext.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportCatchContext.java index 51ae285..dd3df62 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportCatchContext.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/ExportCatchContext.java @@ -92,11 +92,11 @@ public class ExportCatchContext { BatchContainer<MarineLitterBatch> marineLitterBatches = weightComputingService.getComputedMarineLitterBatches( fishingOperationId, - catchBatch.getMarineLitterTotalWeight()); - weightComputingService.computeCatchBatchWeights(catchBatch, - rootSpeciesBatch, - rootBenthosBatch, - marineLitterBatches); + catchBatch.getMarineLitterTotalWeight()); + weightComputingService.computeCatchBatchWeights(catchBatch, + rootSpeciesBatch, + rootBenthosBatch, + marineLitterBatches); Multimap<Species, SpeciesBatchFrequency> speciesFrequencies; Multimap<Species, BenthosBatchFrequency> benthosFrequencies; @@ -160,6 +160,20 @@ public class ExportCatchContext { catchBatch.getBenthosTotalUnsortedComputedWeight(); } + public float getSpeciesTotalSortedWeight() { + float result = Numbers.getValueOrComputedValue( + catchBatch.getSpeciesTotalSortedWeight(), + catchBatch.getSpeciesTotalSortedComputedWeight()); + return result; + } + + public float getBenthosTotalSortedWeight() { + float result = Numbers.getValueOrComputedValue( + catchBatch.getBenthosTotalSortedWeight(), + catchBatch.getBenthosTotalSortedComputedWeight()); + return result; + } + public boolean withSpeciesBatches() { return rootSpeciesBatch != null && !rootSpeciesBatch.isEmptyChildren(); } @@ -289,32 +303,28 @@ public class ExportCatchContext { protected float getSpeciesElevationRate() { - float globalRatio = (getCatchTotalWeight() - catchBatch.getCatchTotalUnsortedComputedWeight()) / catchBatch.getCatchTotalSortedComputedWeight(); + float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / catchBatch.getCatchTotalSortedSortedComputedWeight(); - float speciesTotalSortedWeight = Numbers.getValueOrComputedValue( - catchBatch.getSpeciesTotalSortedWeight(), - catchBatch.getSpeciesTotalSortedComputedWeight()); + float speciesTotalSortedWeight = getSpeciesTotalSortedWeight(); - // ratio total species weight / total sorted sampled species weight + // ratio total species weight / total sorted sampled species weight float result = globalRatio * speciesTotalSortedWeight; - if (catchBatch.getSpeciesTotalSampleSortedComputedWeight() > 0) { - result /= catchBatch.getSpeciesTotalSampleSortedComputedWeight(); - } + if (catchBatch.getSpeciesTotalSampleSortedComputedWeight() > 0) { + result /= catchBatch.getSpeciesTotalSampleSortedComputedWeight(); + } return result; } protected float getBenthosElevationRate() { - float globalRatio = (getCatchTotalWeight() - catchBatch.getCatchTotalUnsortedComputedWeight()) / catchBatch.getCatchTotalSortedComputedWeight(); + float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / catchBatch.getCatchTotalSortedSortedComputedWeight(); - float benthosTotalSortedWeight = Numbers.getValueOrComputedValue( - catchBatch.getBenthosTotalSortedWeight(), - catchBatch.getBenthosTotalSortedComputedWeight()); + float benthosTotalSortedWeight = getBenthosTotalSortedWeight(); - // ratio total benthos weight / total sorted sampled benthos weight + // ratio total benthos weight / total sorted sampled benthos weight float result = globalRatio * benthosTotalSortedWeight; - if (catchBatch.getBenthosTotalSampleSortedComputedWeight() > 0) { - result /= catchBatch.getBenthosTotalSampleSortedComputedWeight(); + if (catchBatch.getBenthosTotalSampleSortedComputedWeight() > 0) { + result /= catchBatch.getBenthosTotalSampleSortedComputedWeight(); } return result; } -- 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-3.x in repository tutti. See http://git.codelutin.com/tutti.git commit 9d1f409b16eee20995c3b693141c8ab8f10f74d0 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:18:41 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) --- .../tutti/service/export/generic/TuttiExportService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/TuttiExportService.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/TuttiExportService.java index 57c4721..a3d27b9 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/TuttiExportService.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/TuttiExportService.java @@ -608,14 +608,13 @@ public class TuttiExportService extends AbstractTuttiService { catchBatch.getBenthosTotalSampleSortedComputedWeight(); Float totalSortedWeight = catchBatch.getCatchTotalSortedComputedWeight(); + Float totalSortedSortedWeight = catchBatch.getCatchTotalSortedSortedComputedWeight(); - //FIXME tchemit 2013-07-12 J'utilise en fait la formule (Poids de la capture totale - poids du HV dans la capture totale) / (poids total capture triée) - // (Poids de la capture totale - poids du HV dans la capture totale) / (poids total capture triée - poids du HV dans la capture totale) + // tchemit 2015-04-28 see http://forge.codelutin.com/issues/7021 + float catchRaisingFactor = totalSortedWeight == null || totalSortedSortedWeight == null ? 1 : totalSortedWeight / totalSortedSortedWeight; - Float catchRaisingFactor = totalWeight == null || totalUnsortedWeight == null || totalSortedWeight == null ? 1 : (totalWeight - totalUnsortedWeight) / totalSortedWeight; - - Float speciesCatchRaisingFactor = totalSampleSortedSpeciesWeight == null || totalSortedSpeciesWeight == null || totalSampleSortedSpeciesWeight == null ? 1 : (totalSampleSortedSpeciesWeight == 0 ? 0 : (totalSortedSpeciesWeight / totalSampleSortedSpeciesWeight) * catchRaisingFactor); - Float benthosCatchRaisingFactor = totalSampleSortedBenthosWeight == null || totalSortedBenthosWeight == null || totalSampleSortedBenthosWeight == null ? 1 : (totalSampleSortedBenthosWeight == 0 ? 0 : (totalSortedBenthosWeight / totalSampleSortedBenthosWeight) * catchRaisingFactor); + Float speciesCatchRaisingFactor = totalSampleSortedSpeciesWeight == null || totalSortedSpeciesWeight == null ? 1 : (totalSampleSortedSpeciesWeight == 0 ? 0 : (totalSortedSpeciesWeight / totalSampleSortedSpeciesWeight) * catchRaisingFactor); + Float benthosCatchRaisingFactor = totalSampleSortedBenthosWeight == null || totalSortedBenthosWeight == null ? 1 : (totalSampleSortedBenthosWeight == 0 ? 0 : (totalSortedBenthosWeight / totalSampleSortedBenthosWeight) * catchRaisingFactor); if (log.isDebugEnabled()) { String message = "\ncatchTotalWeight : " + totalWeight + @@ -623,6 +622,7 @@ public class TuttiExportService extends AbstractTuttiService { "\ntotalSampleSortedSpeciesWeight : " + totalSampleSortedSpeciesWeight + "\ntotalSampleSortedBenthosWeight : " + totalSampleSortedBenthosWeight + "\ntotalSortedWeight : " + totalSortedWeight + + "\ntotalSortedSortedWeight : " + totalSortedSortedWeight + "\ncatchRaisingFactor : " + catchRaisingFactor + "\nspeciesCatchRaisingFactor : " + speciesCatchRaisingFactor + "\nbenthosCatchRaisingFactor : " + benthosCatchRaisingFactor; -- 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-3.x in repository tutti. See http://git.codelutin.com/tutti.git commit ffeb5462a132852bba8e2a58b2fd47088fea7ab8 Merge: c8d1d25 9d1f409 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:21:02 2015 +0200 fixes #7021: [CAPTURE] fichier pdf trait : l'élévation des poids ne marche plus Merge branch 'feature/7021' into develop-3.x .../tutti/service/export/ExportCatchContext.java | 50 +++++++++++++--------- .../service/export/generic/TuttiExportService.java | 12 +++--- 2 files changed, 36 insertions(+), 26 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm