| ... |
... |
@@ -126,13 +126,14 @@ public class TripConsolidateEngine { |
|
126
|
126
|
SampleMeasure.PROPERTY_WEIGHT,
|
|
127
|
127
|
SampleMeasure.PROPERTY_IS_WEIGHT_COMPUTED);
|
|
128
|
128
|
|
|
129
|
|
- BeanMonitor nonTargetCatchMonitor = new BeanMonitor(
|
|
|
129
|
+ BeanMonitor catchMonitor = new BeanMonitor(
|
|
130
|
130
|
Catch.PROPERTY_MEAN_LENGTH,
|
|
131
|
131
|
Catch.PROPERTY_MEAN_LENGTH_COMPUTED_SOURCE,
|
|
132
|
132
|
Catch.PROPERTY_MEAN_WEIGHT,
|
|
133
|
133
|
Catch.PROPERTY_MEAN_WEIGHT_COMPUTED_SOURCE,
|
|
134
|
134
|
Catch.PROPERTY_CATCH_WEIGHT,
|
|
135
|
135
|
Catch.PROPERTY_CATCH_WEIGHT_COMPUTED_SOURCE,
|
|
|
136
|
+ Catch.PROPERTY_WEIGHT_MEASURE_METHOD,
|
|
136
|
137
|
Catch.PROPERTY_TOTAL_COUNT,
|
|
137
|
138
|
Catch.PROPERTY_TOTAL_COUNT_COMPUTED_SOURCE);
|
|
138
|
139
|
|
| ... |
... |
@@ -196,7 +197,7 @@ public class TripConsolidateEngine { |
|
196
|
197
|
activityContext.activityObs = activity;
|
|
197
|
198
|
activityContext.sampleMeasureObsMonitor = sampleMeasureMonitor;
|
|
198
|
199
|
activityContext.sampleObsMonitor = sampleMonitor;
|
|
199
|
|
- activityContext.catchObsMonitor = nonTargetCatchMonitor;
|
|
|
200
|
+ activityContext.catchObsMonitor = catchMonitor;
|
|
200
|
201
|
activityContext.floatingObjectConsolidateEngine = floatingObjectConsolidateEngine;
|
|
201
|
202
|
activityContext.activityPrefix = activityPrefix;
|
|
202
|
203
|
try {
|
| ... |
... |
@@ -267,6 +268,7 @@ public class TripConsolidateEngine { |
|
267
|
268
|
for (Catch aCatch : set.getCatches()) {
|
|
268
|
269
|
activityContext.watchCatch(aCatch);
|
|
269
|
270
|
updateCatch(activityContext, aCatch);
|
|
|
271
|
+ updateCatchWeightMeasureMethod(aCatch);
|
|
270
|
272
|
activityContext.flushCatch();
|
|
271
|
273
|
}
|
|
272
|
274
|
}
|
| ... |
... |
@@ -355,6 +357,14 @@ public class TripConsolidateEngine { |
|
355
|
357
|
computeCatchMeanValues(aCatch, lengthWeightParameter);
|
|
356
|
358
|
}
|
|
357
|
359
|
|
|
|
360
|
+ private void updateCatchWeightMeasureMethod(Catch aCatch) {
|
|
|
361
|
+ if (aCatch.getWeightMeasureMethod() != null && (aCatch.getCatchWeight() == null || aCatch.getCatchWeightComputedSource() != null)) {
|
|
|
362
|
+ // remove measure method when no catchWeight or catchWeight is computed
|
|
|
363
|
+ // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2628
|
|
|
364
|
+ aCatch.setWeightMeasureMethod(null);
|
|
|
365
|
+ }
|
|
|
366
|
+ }
|
|
|
367
|
+
|
|
358
|
368
|
private void updateCatchByLengthWeightRelation(Catch aCatch,
|
|
359
|
369
|
LengthWeightParameter lengthWeightParameter) {
|
|
360
|
370
|
// calcul via le paramétrage taille - poids
|