Tony CHEMIT pushed to branch develop-7.x at ultreiaio / ird-observe
Commits:
4 changed files:
- client-core/src/main/java/fr/ird/observe/client/ui/tree/navigation/NavigationTreeCellRenderer.java
- persistence/src/main/java/fr/ird/observe/entities/seine/ActivitySeineImpl.java
- persistence/src/main/models/Observe.model
- services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java
Changes:
| ... | ... | @@ -26,6 +26,7 @@ import fr.ird.observe.client.ui.tree.navigation.nodes.NavigationTreeNodeSupport; |
| 26 | 26 |
import org.apache.logging.log4j.Logger;
|
| 27 | 27 |
import org.apache.logging.log4j.LogManager;
|
| 28 | 28 |
import org.jdesktop.swingx.renderer.StringValue;
|
| 29 |
+import org.jdesktop.swingx.tree.DefaultXTreeCellRenderer;
|
|
| 29 | 30 |
|
| 30 | 31 |
import javax.swing.Icon;
|
| 31 | 32 |
import javax.swing.JLabel;
|
| ... | ... | @@ -41,7 +42,7 @@ import java.awt.Dimension; |
| 41 | 42 |
* @author Tony Chemit - dev@tchemit.fr
|
| 42 | 43 |
* @since 6.0
|
| 43 | 44 |
*/
|
| 44 |
-public class NavigationTreeCellRenderer extends DefaultTreeCellRenderer implements StringValue {
|
|
| 45 |
+public class NavigationTreeCellRenderer extends DefaultXTreeCellRenderer implements StringValue {
|
|
| 45 | 46 |
|
| 46 | 47 |
/** Logger */
|
| 47 | 48 |
private static final Logger log = LogManager.getLogger(NavigationTreeCellRenderer.class);
|
| ... | ... | @@ -48,17 +48,10 @@ public class ActivitySeineImpl extends ActivitySeineAbstract { |
| 48 | 48 |
|
| 49 | 49 |
private static final List<String> CALEE_OPERATIONS = Collections.singletonList(ACTIVITY_FIN_DE_PECHE);
|
| 50 | 50 |
|
| 51 |
- private static final List<String> DCP_OPERATIONS = Arrays.asList("13", "14", "15");
|
|
| 52 |
- |
|
| 53 | 51 |
private static final List<String> SYSTEM_OPERATIONS = Arrays.asList("0", "11", "11", ACTIVITY_FIN_DE_VEILLE);
|
| 54 | 52 |
|
| 55 | 53 |
private static final String PROPERTY_CHANGED_ZONE_OPERATION = "changedZoneOperation";
|
| 56 | 54 |
|
| 57 |
- @Override
|
|
| 58 |
- public boolean isDCPOperation() {
|
|
| 59 |
- return vesselActivitySeine != null && DCP_OPERATIONS.contains(vesselActivitySeine.getCode());
|
|
| 60 |
- }
|
|
| 61 |
- |
|
| 62 | 55 |
@Override
|
| 63 | 56 |
public boolean isSetOperation() {
|
| 64 | 57 |
return vesselActivitySeine != null && CALEE_OPERATIONS.contains(vesselActivitySeine.getCode());
|
| ... | ... | @@ -163,6 +156,4 @@ public class ActivitySeineImpl extends ActivitySeineAbstract { |
| 163 | 156 |
.toString();
|
| 164 | 157 |
}
|
| 165 | 158 |
|
| 166 |
-}
|
|
| 167 |
- |
|
| 168 |
- |
|
| 159 |
+}
|
|
| \ No newline at end of file |
| ... | ... | @@ -660,7 +660,6 @@ currentFpaZone {*:0..1} referentiel.FpaZone |
| 660 | 660 |
previousFpaZone {*:0..1} referentiel.FpaZone
|
| 661 | 661 |
nextFpaZone {*:0..1} referentiel.FpaZone
|
| 662 | 662 |
dataQuality {*:0..1} referentiel.DataQuality
|
| 663 |
-isDCPOperation() boolean
|
|
| 664 | 663 |
isSetOperation() boolean
|
| 665 | 664 |
isObservedSystemOperation() boolean
|
| 666 | 665 |
getSchoolType() !fr.ird.observe.dto.data.seine.SchoolType
|
| ... | ... | @@ -225,9 +225,10 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements |
| 225 | 225 |
|
| 226 | 226 |
String activityPrefix =String.format("%s - Activity [%s/%s] ", routePrefix, ++activityIndex, activityMax);
|
| 227 | 227 |
|
| 228 |
- if (!activitySeine.isSetOperation() && !activitySeine.isDCPOperation()) {
|
|
| 229 |
- log.info(String.format("%s Skip activity (No set nor dcp): %s", activityPrefix, activitySeine.getTopiaId()));
|
|
| 230 |
- continue;
|
|
| 228 |
+ boolean floatingObjectEmpty = activitySeine.isFloatingObjectEmpty();
|
|
| 229 |
+ if (!activitySeine.isSetOperation() && floatingObjectEmpty) {
|
|
| 230 |
+ log.info(String.format("%s Skip activity (No set nor dcp found): %s", activityPrefix, activitySeine.getTopiaId()));
|
|
| 231 |
+ continue;
|
|
| 231 | 232 |
}
|
| 232 | 233 |
|
| 233 | 234 |
ConsolidateActivitySeineDataResultBuilder resultBuilder = new ConsolidateActivitySeineDataResultBuilder(applicationLocale, referenceLocale, activitySeine.getTopiaId(), ActivitySeines.decorate(referenceLocale.ordinal(), activitySeine));
|