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 7a4bd15b280fe5b92111c501f35c418d97b407d5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Mon Sep 8 15:30:44 2014 +0200 fixes #5754: [EXPORT GENERIQUE] le benthos ne commence plus à 1001 mais à 1 dans la table catch/Num_Ordre_V_HV_H2 --- .../service/export/generic/CatchExportModel.java | 41 ++++++++-------------- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/CatchExportModel.java b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/CatchExportModel.java index a65960e..6ecde0a 100644 --- a/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/CatchExportModel.java +++ b/tutti-service/src/main/java/fr/ifremer/tutti/service/export/generic/CatchExportModel.java @@ -22,8 +22,6 @@ package fr.ifremer.tutti.service.export.generic; * #L% */ -import fr.ifremer.tutti.util.Numbers; -import fr.ifremer.tutti.util.Weights; import fr.ifremer.tutti.persistence.entities.data.BatchContainer; import fr.ifremer.tutti.persistence.entities.data.BenthosBatch; import fr.ifremer.tutti.persistence.entities.data.BenthosBatchFrequency; @@ -40,6 +38,8 @@ import fr.ifremer.tutti.persistence.entities.referential.Species; import fr.ifremer.tutti.service.DecoratorService; import fr.ifremer.tutti.service.PersistenceService; import fr.ifremer.tutti.service.TuttiCsvUtil; +import fr.ifremer.tutti.util.Numbers; +import fr.ifremer.tutti.util.Weights; import org.apache.commons.collections4.CollectionUtils; import java.io.Serializable; @@ -128,7 +128,6 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc float raisingFactor = speciesCatchRaisingFactor; - if (!vracBatch) { // for HV, always use a 1.0 raising factor @@ -145,8 +144,8 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc row, rows, speciesBatch, - totalBatchWeight, - vracBatch); + totalBatchWeight + ); } for (BenthosBatch benthosBatch : rootBenthosBatch.getChildren()) { @@ -177,8 +176,8 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc row, rows, benthosBatch, - totalBatchWeight, - vracBatch); + totalBatchWeight + ); } // compute final raising factor @@ -226,8 +225,7 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc CatchExportRow currentRow, List<CatchExportRow> rows, SpeciesBatch speciesBatch, - float totalBatchWeight, - boolean vracBatch) { + float totalBatchWeight) { currentRow.addComment(speciesBatch.getComment()); @@ -236,15 +234,6 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc Integer rankOrder = speciesBatch.getRankOrder(); - if (!vracBatch && currentRow.getSampleCategory().isEmpty()) { - - //FIXME Remove this when improve export for import - // See http://forge.codelutin.com/issues/5175 - // Add 1000 to each hors-vrac batch rankOrder - - rankOrder += 1000; - } - addBatchSampleCategory(currentRow, speciesBatch.getSampleCategoryId(), speciesBatch.getSampleCategoryValue(), @@ -333,8 +322,8 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc childRow, rows, childBatch, - totalBatchWeight, - vracBatch); + totalBatchWeight); + ExportSampleCategory exportSampleCategory = childRow.getSampleCategory().get(categoryIndex); if (exportSampleCategory != null) { float categoryWeight = Numbers.getValueOrComputedValue( @@ -351,8 +340,7 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc CatchExportRow currentRow, List<CatchExportRow> rows, BenthosBatch benthosBatch, - float totalBatchWeight, - boolean vracBatch) { + float totalBatchWeight) { currentRow.addComment(benthosBatch.getComment()); @@ -362,11 +350,12 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc Integer rankOrder = benthosBatch.getRankOrder(); - if (!vracBatch && currentRow.getSampleCategory().isEmpty()) { + if (currentRow.getSampleCategory().isEmpty()) { //FIXME Remove this when improve export for import // See http://forge.codelutin.com/issues/5175 - // Add 1000 to each hors-vrac batch rank-order + // See http://forge.codelutin.com/issues/5754 + // Add 1000 to each benthos only batch rank-order rankOrder += 1000; } @@ -459,8 +448,8 @@ public class CatchExportModel extends TuttiCsvUtil.AbstractTuttiExportModel<Catc childRow, rows, childBatch, - totalBatchWeight, - vracBatch); + totalBatchWeight); + ExportSampleCategory exportSampleCategory = childRow.getSampleCategory().get(categoryIndex); float categoryWeight = Numbers.getValueOrComputedValue( exportSampleCategory.getCategoryWeight(), -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.