branch develop-4.x updated (b47b376 -> 33f75da)
This is an automated email from the git hooks/post-receive script. New change to branch develop-4.x in repository observe. See http://git.codelutin.com/observe.git from b47b376 La maintenance se fait désormais sur master-4.x new 189f0e5 Bien réinitialiser tous les champs précédemment calculé lors d'une opération de consolidation (See #7692) new 33f75da [PS] Calculs taille/poids : Problème sur recalcul (termine #7692) Merge branch 'feature/7692' into develop-4.x 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 33f75da8208dc84978bd3723f40d20e78ebf369d Merge: b47b376 189f0e5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 4 18:26:33 2015 +0100 [PS] Calculs taille/poids : Problème sur recalcul (termine #7692) Merge branch 'feature/7692' into develop-4.x commit 189f0e576821ad19e34eb96e2c7d77a3de9fd21e Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 4 18:26:27 2015 +0100 Bien réinitialiser tous les champs précédemment calculé lors d'une opération de consolidation (See #7692) Summary of changes: .../fr/ird/observe/ConsolidateDataService.java | 87 +++++++++++++++++----- 1 file changed, 69 insertions(+), 18 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.x in repository observe. See http://git.codelutin.com/observe.git commit 189f0e576821ad19e34eb96e2c7d77a3de9fd21e Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 4 18:26:27 2015 +0100 Bien réinitialiser tous les champs précédemment calculé lors d'une opération de consolidation (See #7692) --- .../fr/ird/observe/ConsolidateDataService.java | 87 +++++++++++++++++----- 1 file changed, 69 insertions(+), 18 deletions(-) diff --git a/observe-business/src/main/java/fr/ird/observe/ConsolidateDataService.java b/observe-business/src/main/java/fr/ird/observe/ConsolidateDataService.java index 39cd13d..0382414 100644 --- a/observe-business/src/main/java/fr/ird/observe/ConsolidateDataService.java +++ b/observe-business/src/main/java/fr/ird/observe/ConsolidateDataService.java @@ -266,6 +266,8 @@ public class ConsolidateDataService { targetLengthMonitor.setBean(targetLength); + resetTargetLength(targetLength); + updateLengthWeightAble( tx, maree, @@ -295,6 +297,8 @@ public class ConsolidateDataService { nonTargetSampleMonitor.setBean(nonTargetLength); + resetNonTargetLength(nonTargetLength); + updateLengthWeightAble( tx, maree, @@ -318,27 +322,11 @@ public class ConsolidateDataService { nonTargetCatchMonitor.setBean(nonTargetCatch); - // suppression de tous les champs précédemment calculés + // suppression de tous les champs précédemment calculées - if (nonTargetCatch.isCatchWeightComputed()) { - nonTargetCatch.setCatchWeight(null); - nonTargetCatch.setCatchWeightComputedSource(null); - } - - if (nonTargetCatch.isTotalCountComputed()) { - nonTargetCatch.setTotalCount(null); - nonTargetCatch.setTotalCountComputedSource(null); - } + resetNonTargetCatch(nonTargetCatch); - if (nonTargetCatch.isMeanWeightComputed()) { - nonTargetCatch.setMeanWeight(null); - nonTargetCatch.setMeanWeightComputedSource(null); - } - if (nonTargetCatch.isMeanLengthComputed()) { - nonTargetCatch.setMeanLength(null); - nonTargetCatch.setMeanLengthComputedSource(null); - } updateNonTargetCatch( tx, @@ -356,6 +344,69 @@ public class ConsolidateDataService { return needUpdate; } + protected void resetNonTargetCatch(NonTargetCatch nonTargetCatch) { + + if (nonTargetCatch.isCatchWeightComputed()) { + nonTargetCatch.setCatchWeight(null); + nonTargetCatch.setCatchWeightComputedSource(null); + } + + if (nonTargetCatch.isTotalCountComputed()) { + nonTargetCatch.setTotalCount(null); + nonTargetCatch.setTotalCountComputedSource(null); + } + + if (nonTargetCatch.isMeanWeightComputed()) { + nonTargetCatch.setMeanWeight(null); + nonTargetCatch.setMeanWeightComputedSource(null); + } + + if (nonTargetCatch.isMeanLengthComputed()) { + nonTargetCatch.setMeanLength(null); + nonTargetCatch.setMeanLengthComputedSource(null); + } + + } + protected void resetNonTargetLength(NonTargetLength nonTargetLength) { + + if (nonTargetLength.isLengthSource()) { + + // Reset de la valeur calculée + nonTargetLength.setLength(null); + nonTargetLength.setLengthSource(false); + + } + + if (nonTargetLength.isWeightSource()) { + + // Reset de la valeur calculée + nonTargetLength.setWeight(null); + nonTargetLength.setWeightSource(false); + + } + + } + + protected void resetTargetLength(TargetLength targetLength) { + + if (targetLength.isLengthSource()) { + + // Reset de la valeur calculée + targetLength.setLength(null); + targetLength.setLengthSource(false); + + } + + if (targetLength.isWeightSource()) { + + // Reset de la valeur calculée + targetLength.setWeight(null); + targetLength.setWeightSource(false); + + } + + } + protected boolean allNonTargetCatchDataFilled(NonTargetCatch nonTargetCatch) { return Iterables.all( Sets.newHashSet(nonTargetCatch.getCatchWeight(), -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.x in repository observe. See http://git.codelutin.com/observe.git commit 33f75da8208dc84978bd3723f40d20e78ebf369d Merge: b47b376 189f0e5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 4 18:26:33 2015 +0100 [PS] Calculs taille/poids : Problème sur recalcul (termine #7692) Merge branch 'feature/7692' into develop-4.x .../fr/ird/observe/ConsolidateDataService.java | 87 +++++++++++++++++----- 1 file changed, 69 insertions(+), 18 deletions(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.
participants (1)
-
codelutin.com scm