branch develop updated (cb1949a -> 403a962)
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 cb1949a on ne modifie pas le modèle tant qu'on est dans le thread de l'action longue (refs #7020) new 403a962 correction du facteur d'elevation pour les export pdf et csv (refs #7021) 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 403a962c104d5475bb4423e304c0dd65a60ba3c7 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 12:41:12 2015 +0200 correction du facteur d'elevation pour les export pdf et csv (refs #7021) Summary of changes: .../tutti/service/export/ExportCatchContext.java | 50 +++++++++++++--------- 1 file changed, 30 insertions(+), 20 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 in repository tutti. See http://git.codelutin.com/tutti.git commit 403a962c104d5475bb4423e304c0dd65a60ba3c7 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 12:41:12 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..ea76014 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 = (getCatchTotalWeight() - catchBatch.getCatchTotalUnsortedComputedWeight()) / catchBatch.getCatchTotalSortedComputedWeight(); - 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>.
participants (1)
-
codelutin.com scm