This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.4.x in repository tutti. See http://git.codelutin.com/tutti.git commit 4a20c317c240f5c3448efca6ea23066cdb16c749 Author: Tony CHEMIT <chemit@codelutin.com> Date: Fri Feb 19 07:01:27 2016 +0100 Simplification du code de calcul du raising factor final --- .../producer/CsvProducerForCatch.java | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/producer/CsvProducerForCatch.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/producer/CsvProducerForCatch.java index cbcd40f..cd0e728 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/producer/CsvProducerForCatch.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/genericformat/producer/CsvProducerForCatch.java @@ -84,7 +84,9 @@ public class CsvProducerForCatch extends CsvProducer<CatchRow, CatchModel> { // see http://forge.codelutin.com/issues/5110 for (CatchRow row : rows) { - float finalRaisingFactor = computeFinalRaisingFactor(row, speciesCatchRaisingFactor, benthosCatchRaisingFactor); + Float raisingFactor = row.isBenthos() ? benthosCatchRaisingFactor : speciesCatchRaisingFactor; + + float finalRaisingFactor = computeFinalRaisingFactor(row, raisingFactor); row.setFinalRaisingFactor(finalRaisingFactor); } @@ -105,6 +107,13 @@ public class CsvProducerForCatch extends CsvProducer<CatchRow, CatchModel> { addBenthosBatches(operationExportContext, rootBenthosBatch, benthosCatchRaisingFactor, batchWeightUnit, rows); + for (CatchRow row : rows) { + + float finalRaisingFactor = computeFinalRaisingFactor(row, benthosCatchRaisingFactor); + row.setFinalRaisingFactor(finalRaisingFactor); + + } + return rows; } @@ -121,6 +130,13 @@ public class CsvProducerForCatch extends CsvProducer<CatchRow, CatchModel> { addSpeciesBatches(operationExportContext, rootSpeciesBatch, speciesCatchRaisingFactor, batchWeightUnit, rows); + for (CatchRow row : rows) { + + float finalRaisingFactor = computeFinalRaisingFactor(row, speciesCatchRaisingFactor); + row.setFinalRaisingFactor(finalRaisingFactor); + + } + return rows; } @@ -466,13 +482,13 @@ public class CsvProducerForCatch extends CsvProducer<CatchRow, CatchModel> { } } - protected float computeFinalRaisingFactor(CatchRow row, Float speciesCatchRaisingFactor, Float benthosCatchRaisingFactor) { + protected float computeFinalRaisingFactor(CatchRow row, Float raisingFactor) { float finalRaisingFactor; if (row.isVrac()) { - finalRaisingFactor = row.isBenthos() ? benthosCatchRaisingFactor : speciesCatchRaisingFactor; + finalRaisingFactor = raisingFactor; } else { -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.