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>.