branch develop updated (cb1949a -> bf4cbc8)
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 4d49203 correction du facteur d'elevation pour les export pdf et csv (refs #7021) new bf4cbc8 correction du facteur d'elevation pour l'export generique (refs #7021) 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 bf4cbc828907e2b0972b732de178e05f5b1510d2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:27:27 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) commit 4d492039083abda9602daab6fc506d1bd5066c10 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 +++++++++++++--------- .../exportactions/CreateCatchBatchRowsAction.java | 13 ++---- 2 files changed, 33 insertions(+), 30 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 4d492039083abda9602daab6fc506d1bd5066c10 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 in repository tutti. See http://git.codelutin.com/tutti.git commit bf4cbc828907e2b0972b732de178e05f5b1510d2 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 13:27:27 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) --- .../exportactions/CreateCatchBatchRowsAction.java | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/exportactions/CreateCatchBatchRowsAction.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/exportactions/CreateCatchBatchRowsAction.java index f1fca69..90e2a42 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/exportactions/CreateCatchBatchRowsAction.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/exportactions/CreateCatchBatchRowsAction.java @@ -228,18 +228,11 @@ public class CreateCatchBatchRowsAction extends ExportFishingOperationActionSupp private Float computeCatchRaisingfactor(CatchBatch catchBatch) { - Float totalWeight = Numbers.getValueOrComputedValue( - catchBatch.getCatchTotalWeight(), - catchBatch.getCatchTotalComputedWeight()); - - Float totalUnsortedWeight = catchBatch.getCatchTotalUnsortedComputedWeight(); - 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) - - Float catchRaisingFactor = totalWeight == null || totalUnsortedWeight == null || totalSortedWeight == null ? 1 : (totalWeight - totalUnsortedWeight) / totalSortedWeight; + // tchemit 2015-04-28 see http://forge.codelutin.com/issues/7021 + float catchRaisingFactor = totalSortedWeight == null || totalSortedSortedWeight == null ? 1 : totalSortedWeight / totalSortedSortedWeight; return catchRaisingFactor; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm