Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe
Commits:
-
75eae88d
by Tony Chemit at 2023-01-25T09:20:14+01:00
-
a16389e1
by Tony Chemit at 2023-01-25T09:35:15+01:00
2 changed files:
- core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java
- core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/common/TripConsolidateEngine.java
Changes:
| ... | ... | @@ -67,19 +67,21 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 67 | 67 | .put("0", "99")
|
| 68 | 68 | .put("1", "99")
|
| 69 | 69 | .put("2", "99")
|
| 70 | - .put("3", "99")
|
|
| 71 | - .put("4", "99")
|
|
| 72 | - .put("10", "99")
|
|
| 73 | - .put("14", "99")
|
|
| 70 | + |
|
| 71 | + .put("3", "2")
|
|
| 72 | + .put("4", "2")
|
|
| 73 | + .put("5", "1")
|
|
| 74 | + .put("6", "4")
|
|
| 75 | + |
|
| 74 | 76 | .put("7", "99")
|
| 75 | 77 | .put("8", "99")
|
| 76 | 78 | .put("9", "99")
|
| 79 | + .put("10", "99")
|
|
| 77 | 80 | .put("12", "99")
|
| 78 | 81 | .put("13", "99")
|
| 82 | + .put("14", "99")
|
|
| 79 | 83 | .put("15", "99")
|
| 80 | 84 | |
| 81 | - .put("5", "1")
|
|
| 82 | - .put("6", "4")
|
|
| 83 | 85 | .put("22", "4")
|
| 84 | 86 | .put("23", "1")
|
| 85 | 87 | .put("24", "4")
|
| ... | ... | @@ -101,8 +103,16 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 101 | 103 | * If for a given {@code ACTIVITE.C_OPERA}, no value is found here, this means that there is no buoy to create.
|
| 102 | 104 | */
|
| 103 | 105 | public static final Map<String, String> TRANSMITTING_BUOY_OPERATION_CODE_MAPPING = ImmutableMap.<String, String>builder()
|
| 106 | + .put("3", "1") // Visite | Visite
|
|
| 107 | + .put("4", "1") // Visite | Visite
|
|
| 104 | 108 | .put("5", "3") // Mise à l'eau | null ou 3 Mise à l'eau
|
| 105 | 109 | .put("6", "2") // Retrait | null ou 2 Récupération
|
| 110 | + .put("7", "1") // Visite | Visite
|
|
| 111 | + .put("10", "1")// Visite | Visite
|
|
| 112 | + .put("12", "1")// Visite | Visite
|
|
| 113 | + .put("13", "1")// Visite | Visite
|
|
| 114 | + .put("14", "1")// Visite | Visite
|
|
| 115 | + .put("15", "1")// Visite | Visite
|
|
| 106 | 116 | .put("23", "3") // Mise à l'eau | 3 Mise à l'eau
|
| 107 | 117 | .put("24", "2") // Retrait | 2 Récupération
|
| 108 | 118 | .put("25", "3") // Visite | 3 Mise à l'eau
|
| ... | ... | @@ -128,15 +138,15 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { |
| 128 | 138 | "2",
|
| 129 | 139 | "3",
|
| 130 | 140 | "4",
|
| 141 | + "6",
|
|
| 142 | + "7",
|
|
| 143 | + "8",
|
|
| 131 | 144 | "9",
|
| 132 | 145 | "10",
|
| 133 | 146 | "12",
|
| 147 | + "13",
|
|
| 134 | 148 | "14",
|
| 135 | 149 | "15",
|
| 136 | - "7",
|
|
| 137 | - "8",
|
|
| 138 | - "13",
|
|
| 139 | - "6",
|
|
| 140 | 150 | "22",
|
| 141 | 151 | "24",
|
| 142 | 152 | "25",
|
| ... | ... | @@ -38,7 +38,6 @@ import fr.ird.observe.dto.data.ps.observation.consolidate.ActivityConsolidateRes |
| 38 | 38 | import fr.ird.observe.dto.data.ps.observation.consolidate.FloatingObjectConsolidateRequest;
|
| 39 | 39 | import fr.ird.observe.dto.referential.I18nReferentialHelper;
|
| 40 | 40 | import fr.ird.observe.dto.referential.ReferentialLocale;
|
| 41 | -import fr.ird.observe.dto.referential.ps.common.VesselActivityReference;
|
|
| 42 | 41 | import fr.ird.observe.entities.ObserveTopiaDaoSupplier;
|
| 43 | 42 | import fr.ird.observe.entities.ToolkitTopiaPersistenceContextSupport;
|
| 44 | 43 | import fr.ird.observe.entities.data.ps.localmarket.Batch;
|
| ... | ... | @@ -178,9 +177,8 @@ public class TripConsolidateEngine { |
| 178 | 177 | |
| 179 | 178 | String activityPrefix = String.format("%s - Activity [%s/%s] ", routePrefix, ++activityIndex, activityMax);
|
| 180 | 179 | |
| 181 | - boolean floatingObjectEmpty = activity.isFloatingObjectEmpty();
|
|
| 182 | - if (!VesselActivityReference.isSetOperation(activity) && floatingObjectEmpty) {
|
|
| 183 | - log.debug(String.format("%s Skip activity (No set nor dcp found): %s", activityPrefix, activity.getTopiaId()));
|
|
| 180 | + if (activity.getSetSize() == 0) {
|
|
| 181 | + log.info(String.format("%s Skip activity (No set found): %s", activityPrefix, activity.getTopiaId()));
|
|
| 184 | 182 | continue;
|
| 185 | 183 | }
|
| 186 | 184 |