branch develop-3.x updated (c8d1d25 -> 5ad38ab)
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 5c4062c correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) new bf6203c correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) new 5ad38ab 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 5ad38ab0cd10b23dbde923180ff6a3e0e0951320 Merge: c8d1d25 bf6203c Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:20:38 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 bf6203c4ee9e76314914d248568413f0e93dee25 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:20:35 2015 +0200 correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) commit 5c4062cea9a2fd2bf3dceed665897af7564a912c Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:09:02 2015 +0200 correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) Summary of changes: .../tutti/service/export/ExportCatchContext.java | 57 ++++++++++++++-------- .../service/export/generic/TuttiExportService.java | 8 ++- 2 files changed, 44 insertions(+), 21 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 5c4062cea9a2fd2bf3dceed665897af7564a912c Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:09:02 2015 +0200 correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) --- .../tutti/service/export/ExportCatchContext.java | 57 ++++++++++++++-------- 1 file changed, 37 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..e082942 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; @@ -153,6 +153,13 @@ public class ExportCatchContext { return result; } + public float getCatchTotalRejectedWeight() { + float result = Numbers.getValueOrComputedValue( + catchBatch.getCatchTotalRejectedWeight(), + catchBatch.getCatchTotalRejectedComputedWeight()); + return result; + } + public float getCatchTotalSortedWeight() { return catchBatch.getSpeciesTotalSampleSortedComputedWeight() + catchBatch.getBenthosTotalSampleSortedComputedWeight() + @@ -160,6 +167,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 +310,28 @@ public class ExportCatchContext { protected float getSpeciesElevationRate() { - float globalRatio = (getCatchTotalWeight() - catchBatch.getCatchTotalUnsortedComputedWeight()) / catchBatch.getCatchTotalSortedComputedWeight(); + float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / (getCatchTotalWeight() - getCatchTotalRejectedWeight()); - 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() / (getCatchTotalWeight() - getCatchTotalRejectedWeight()); - 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 bf6203c4ee9e76314914d248568413f0e93dee25 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:20:35 2015 +0200 correction du ration d'élévation pour un lot (pris en compte du vrac non trié) (refs #7021) --- .../ifremer/tutti/service/export/generic/TuttiExportService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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..12185b9 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 @@ -589,6 +589,10 @@ public class TuttiExportService extends AbstractTuttiService { catchBatch.getCatchTotalWeight(), catchBatch.getCatchTotalComputedWeight()); + Float totalRejectedWeight = Numbers.getValueOrComputedValue( + catchBatch.getCatchTotalRejectedWeight(), + catchBatch.getCatchTotalRejectedComputedWeight()); + Float totalUnsortedWeight = catchBatch.getCatchTotalUnsortedComputedWeight(); @@ -611,8 +615,10 @@ public class TuttiExportService extends AbstractTuttiService { //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; - 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 = totalWeight == null || totalSortedWeight == null || totalRejectedWeight == null ? 1 : (totalWeight - totalRejectedWeight) / 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); -- 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 5ad38ab0cd10b23dbde923180ff6a3e0e0951320 Merge: c8d1d25 bf6203c Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 11:20:38 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 | 57 ++++++++++++++-------- .../service/export/generic/TuttiExportService.java | 8 ++- 2 files changed, 44 insertions(+), 21 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm