branch feature/7021 created (now c5de89c)
This is an automated email from the git hooks/post-receive script. New change to branch feature/7021 in repository tutti. See http://git.codelutin.com/tutti.git at c5de89c correction du facteur d'elevation pour l'export generique (refs #7021) This branch includes the following new commits: new e4c94e0 correction du facteur d'elevation pour les export pdf et csv (refs #7021) new c5de89c 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 c5de89c27ea03c7f4411672642567ad14ab9d1e1 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 12:42:05 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) commit e4c94e052f65c08263934eafb3008d5905e09c3d 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) -- 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 feature/7021 in repository tutti. See http://git.codelutin.com/tutti.git commit e4c94e052f65c08263934eafb3008d5905e09c3d 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) --- .../fr/ifremer/tutti/service/export/ExportCatchContext.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 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 e082942..3a9d6e9 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 @@ -153,13 +153,6 @@ 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() + @@ -310,7 +303,7 @@ public class ExportCatchContext { protected float getSpeciesElevationRate() { - float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / (getCatchTotalWeight() - getCatchTotalRejectedWeight()); + float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / catchBatch.getCatchTotalSortedSortedComputedWeight(); float speciesTotalSortedWeight = getSpeciesTotalSortedWeight(); @@ -324,7 +317,7 @@ public class ExportCatchContext { protected float getBenthosElevationRate() { - float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / (getCatchTotalWeight() - getCatchTotalRejectedWeight()); + float globalRatio = catchBatch.getCatchTotalSortedComputedWeight() / catchBatch.getCatchTotalSortedSortedComputedWeight(); float benthosTotalSortedWeight = getBenthosTotalSortedWeight(); -- 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 feature/7021 in repository tutti. See http://git.codelutin.com/tutti.git commit c5de89c27ea03c7f4411672642567ad14ab9d1e1 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Apr 28 12:42:05 2015 +0200 correction du facteur d'elevation pour l'export generique (refs #7021) --- .../service/export/generic/TuttiExportService.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 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 12185b9..308fe99 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,14 +589,9 @@ public class TuttiExportService extends AbstractTuttiService { catchBatch.getCatchTotalWeight(), catchBatch.getCatchTotalComputedWeight()); - Float totalRejectedWeight = Numbers.getValueOrComputedValue( - catchBatch.getCatchTotalRejectedWeight(), - catchBatch.getCatchTotalRejectedComputedWeight()); - Float totalUnsortedWeight = catchBatch.getCatchTotalUnsortedComputedWeight(); - Float totalSortedSpeciesWeight = Numbers.getValueOrComputedValue( catchBatch.getSpeciesTotalSortedWeight(), catchBatch.getSpeciesTotalSortedComputedWeight()); @@ -612,23 +607,21 @@ public class TuttiExportService extends AbstractTuttiService { catchBatch.getBenthosTotalSampleSortedComputedWeight(); Float totalSortedWeight = catchBatch.getCatchTotalSortedComputedWeight(); - - //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 totalSortedSortedWeight = catchBatch.getCatchTotalSortedSortedComputedWeight(); // tchemit 2015-04-28 see http://forge.codelutin.com/issues/7021 - float catchRaisingFactor = totalWeight == null || totalSortedWeight == null || totalRejectedWeight == null ? 1 : (totalWeight - totalRejectedWeight) / totalSortedWeight; + float catchRaisingFactor = totalSortedWeight == null || totalSortedSortedWeight == null ? 1 : totalSortedWeight / totalSortedSortedWeight; - 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 + + "\ntotalSortedWeight : " + totalSortedWeight + + "\ntotalSortedSortedWeight : " + totalSortedSortedWeight+ "\ncatchTotalUnsortedWeight : " + totalUnsortedWeight + "\ntotalSampleSortedSpeciesWeight : " + totalSampleSortedSpeciesWeight + "\ntotalSampleSortedBenthosWeight : " + totalSampleSortedBenthosWeight + - "\ntotalSortedWeight : " + totalSortedWeight + "\ncatchRaisingFactor : " + catchRaisingFactor + "\nspeciesCatchRaisingFactor : " + speciesCatchRaisingFactor + "\nbenthosCatchRaisingFactor : " + benthosCatchRaisingFactor; -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm