[Git][ultreiaio/ird-observe][develop] 6 commits: Ajout de ps_common.TransmittingBuoyOperation 99 - Closes #2617
Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: d82501c5 by Tony Chemit at 2023-02-02T17:02:25+01:00 Ajout de ps_common.TransmittingBuoyOperation 99 - Closes #2617 - - - - - 94b41c7c by Tony Chemit at 2023-02-02T17:02:25+01:00 Ajout de ps_landing.Destination 28 et 29 - Closes #2618 - - - - - 25701f5c by Tony Chemit at 2023-02-02T17:02:25+01:00 Migration Avdth - Review how to add Observed system from object type code (See #2612) - - - - - 7e1b4cad by Tony Chemit at 2023-02-02T17:02:25+01:00 Migration Avdth - Review TransmittingBuoy mappings (for operation and type) and reject import if operation not found - See #2612 - - - - - f8f52841 by Tony Chemit at 2023-02-02T17:02:25+01:00 Migration Avdth - Review when can import Floating object - Closes #2612 - - - - - 51530561 by Tony Chemit at 2023-02-02T17:08:02+01:00 Tck service - Update Validation service test fixture - - - - - 15 changed files: - core/api/dto/src/main/i18n/getters/java-enumeration.getter - core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java - core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java - core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java - + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_99-common.sql - + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_finalize-common.sql - + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_28-common.sql - + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_29-common.sql - + core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_finalize-common.sql - core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties - core/services/i18n/src/main/i18n/translations/services_en_GB.properties - core/services/i18n/src/main/i18n/translations/services_es_ES.properties - core/services/i18n/src/main/i18n/translations/services_fr_FR.properties - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json - model/src/main/resources/fixtures/global.properties Changes: ===================================== core/api/dto/src/main/i18n/getters/java-enumeration.getter ===================================== @@ -45,4 +45,5 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange observe.constant.TypeTransmittingBuoyOperation.lost observe.constant.TypeTransmittingBuoyOperation.noBuoy observe.constant.TypeTransmittingBuoyOperation.posing +observe.constant.TypeTransmittingBuoyOperation.unknown observe.constant.TypeTransmittingBuoyOperation.visit ===================================== core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/TypeTransmittingBuoyOperation.java ===================================== @@ -40,6 +40,7 @@ public enum TypeTransmittingBuoyOperation { grab(false, "2"), posing(false, "3"), lost(true, "4"), + unknown(false, "99"), endOfUse(true, "5"), // two buoy ===================================== core/persistence/avdth/src/main/java/fr/ird/observe/persistence/avdth/data/logbook/FloatingObjectReader.java ===================================== @@ -77,8 +77,8 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { .put("1", "99") .put("2", "99") - .put("3", "2") - .put("4", "2") + .put("3", "99") + .put("4", "99") .put("5", "1") .put("6", "4") @@ -112,21 +112,23 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { * If for a given {@code ACTIVITE.C_OPERA}, no value is found here, this means that there is no buoy to create. */ public static final Map<String, String> TRANSMITTING_BUOY_OPERATION_CODE_MAPPING = ImmutableMap.<String, String>builder() - .put("3", "1") // Visite | Visite - .put("4", "1") // Visite | Visite + .put("0", "99") // Inconnu | Inconnu + .put("1", "99") // Inconnu | Inconnu + .put("2", "99") // Inconnu | Inconnu + .put("3", "99") // Inconnu | Inconnu + .put("4", "99") // Inconnu | Inconnu .put("5", "3") // Mise à l'eau | null ou 3 Mise à l'eau .put("6", "2") // Retrait | null ou 2 Récupération - .put("7", "1") // Visite | Visite - .put("10", "1")// Visite | Visite - .put("12", "1")// Visite | Visite - .put("13", "1")// Visite | Visite - .put("14", "1")// Visite | Visite - .put("15", "1")// Visite | Visite + + .put("14", "99")// Inconnu | Inconnu + .put("22", "99") // Normalement il ne devrait pas y avoir de balise .put("23", "3") // Mise à l'eau | 3 Mise à l'eau .put("24", "2") // Retrait | 2 Récupération .put("25", "3") // Visite | 3 Mise à l'eau .put("26", "2") // Visite | 2 Récupération .put("29", "1") // Visite | 1 Visite + .put("30", "99") // Inconnu | Inconnu + .put("31", "99") // Modif ou renfor| Inconnu .put("32", "3") // Modif ou renfor | 3 Mise à l'eau .put("33", "4") // Perte | 4 Perte signal .put("34", "2") // Retrait | 2 Récupération @@ -226,7 +228,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { /** * To get associated observedSystem code from avdth ACTIVITE.C_TYP_OBJET code. */ - public static final Map<String, String> OBSERVED_SYSTEM_CODE_MAPPING = ImmutableMap.<String, String>builder() + public static final Map<String, String> OBSERVED_SYSTEM_FROM_OBJECT_OPERATION_CODE_MAPPING = ImmutableMap.<String, String>builder() .put("1", "20") .put("2", "20") .put("3", "20") @@ -286,9 +288,19 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { // Is floating object exists in avdth? boolean floatingObjectExistsInAvdth = !objectTypeCode.equals("999"); - if (!floatingObjectExistsInAvdth && !floatingObjectCreatedByObservedSystem) { - // If Floating object does not exist in avdth, neither need to be created by observed system, - // Do not create the floating object (no log is required here) + String buoyTypeCode = resultSet.getString(31); + if (buoyTypeCode == null) { + // If null, then consider it as not found in avdth + buoyTypeCode = "999"; + } + // IS buoy exists in avdth? + boolean buoyExistsInAvdth = !"999".equals(buoyTypeCode); + + if (!floatingObjectExistsInAvdth && !buoyExistsInAvdth && !floatingObjectCreatedByObservedSystem) { + // If Floating object does not exist in avdth, + // neither the buoy exist in avdth, + // neither need to be created by observed system, + // Do not create the floating object (no log is required here: we are on an activity with no floating object) reset(dataContext); return null; } @@ -299,37 +311,41 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { String realObserveVesselActivityCode = CHANGED_VESSEL_ACTIVITY_CODE_BY_FLOATING_OBJECT.get(observeVesselActivityCode); if (realObserveVesselActivityCode == null) { - // If ObServe veseel activity does not support Floating object, reject import + // No extra mapping found for vessel activity, we will not import the floating object + List<Object> activityPrimaryKey = ActivityReader.getActivityPk(resultSet); String activityPk = Query.primaryKeyString(activityPrimaryKey); - String message = String.format("For AVDTH activity %s (ACTIVITE.C_OPERA %s), the ObServe vessel activity (code: %s, label: %s) does not allow FAD, we still import it... (floatingObjectExistsInAvdth? %b, floatingObjectCreatedByObservedSystem? %b).", + String message = String.format("For AVDTH activity %s (ACTIVITE.C_OPERA %s), the ObServe vessel activity (code: %s, label: %s) does not allow FAD, we will not import it... (floatingObjectExistsInAvdth? %b, buoyExistsInAvdth? %b, floatingObjectCreatedByObservedSystem? %b).", activityPk, vesselActivityCode, vesselActivity.getCode(), vesselActivity.getLabel1(), floatingObjectExistsInAvdth, + buoyExistsInAvdth, floatingObjectCreatedByObservedSystem); log.warn(message); - badVesselActivityCodes.computeIfAbsent(vesselActivityCode, MutableInt::new).increment(); - -// // do not create the floating object -// reset(dataContext); -// return null; - - } else { - // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2612 - switch (realObserveVesselActivityCode) { - case "101": - // Use vessel activity 101 - activity.setVesselActivity(dataContext.getVesselActivity101()); - break; - case "102": - // Use vessel activity 102 - activity.setVesselActivity(dataContext.getVesselActivity102()); - break; + if (floatingObjectExistsInAvdth || buoyExistsInAvdth) { + // this will reject import (except if force import option is set on) + addMessage(message); + badVesselActivityCodes.computeIfAbsent(vesselActivityCode, MutableInt::new).increment(); } + + // do not create the floating object + reset(dataContext); + return null; } + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2612 + switch (realObserveVesselActivityCode) { + case "101": + // Use vessel activity 101 + activity.setVesselActivity(dataContext.getVesselActivity101()); + break; + case "102": + // Use vessel activity 102 + activity.setVesselActivity(dataContext.getVesselActivity102()); + break; + } } FloatingObject entity = newEntity(FloatingObject.SPI); @@ -338,15 +354,7 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { ObjectOperation objectOperation = getObjectOperationByVesselActivityCode(dataContext, vesselActivityCode); entity.setObjectOperation(Objects.requireNonNull(objectOperation, String.format("No mapping for FloatingObject.objectOperation from ACTIVITE.C_OPERA: %s", vesselActivityCode))); - String buoyTypeCode = resultSet.getString(31); - if (buoyTypeCode == null) { - // If null, then consider it as not found in avdth - buoyTypeCode = "999"; - } - // IS buoy exists in avdth? - boolean buoyExistsInAvdth = !"999".equals(buoyTypeCode); - - ObservedSystem observedSystem = getObservedSystem(dataContext, objectTypeCode, floatingObjectExistsInAvdth, buoyExistsInAvdth); + ObservedSystem observedSystem = getObservedSystem(dataContext, objectOperation, objectTypeCode, floatingObjectExistsInAvdth, buoyExistsInAvdth); if (observedSystem != null) { activity.addObservedSystem(observedSystem); } @@ -445,25 +453,29 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { } private TransmittingBuoy getBuoyFromAvdthActivity(ImportDataContext dataContext, ResultSet resultSet, String buoyTypeCode, String vesselActivityCode, ObjectOperation objectOperation, Activity activity) throws SQLException { - boolean addCoordinate = "11".equals(objectOperation.getCode()); - TransmittingBuoyType transmittingBuoyType = getTransmittingBuoyTypeByBuoyTypeCode(dataContext, buoyTypeCode); TransmittingBuoyOperation transmittingBuoyOperation = getTransmittingBuoyOperationByVesselActivityCode(dataContext, vesselActivityCode); - if (transmittingBuoyOperation != null) { - String buoyOwnershipCode = resultSet.getString(30); - String buoyId = resultSet.getString(32); - TransmittingBuoy transmittingBuoy = newEntity(TransmittingBuoy.SPI, transmittingBuoyCount); - transmittingBuoy.setTransmittingBuoyOperation(transmittingBuoyOperation); - transmittingBuoy.setTransmittingBuoyType(transmittingBuoyType); - transmittingBuoy.setCode(buoyId); - if (addCoordinate) { - transmittingBuoy.setLatitude(activity.getLatitude()); - transmittingBuoy.setLongitude(activity.getLongitude()); - } - TransmittingBuoyOwnership transmittingBuoyOwnership = getTransmittingBuoyOwnership(dataContext, buoyOwnershipCode); - transmittingBuoy.setTransmittingBuoyOwnership(transmittingBuoyOwnership); - return transmittingBuoy; + if (transmittingBuoyOperation == null) { + List<Object> activityPrimaryKey = ActivityReader.getActivityPk(resultSet); + String activityPk = Query.primaryKeyString(activityPrimaryKey); + // Reject import, since we can not find the buoy operation from ACTIVITE.C_OPERA + addMessage(String.format("For AVDTH activity: %s, could not find transmittingBuoyOperation from ACTIVITE.C_OPERA: %s", activityPk, vesselActivityCode)); + return null; } - return null; + TransmittingBuoyType transmittingBuoyType = getTransmittingBuoyTypeByBuoyTypeCode(dataContext, buoyTypeCode); + String buoyOwnershipCode = resultSet.getString(30); + String buoyId = resultSet.getString(32); + TransmittingBuoy transmittingBuoy = newEntity(TransmittingBuoy.SPI, transmittingBuoyCount); + transmittingBuoy.setTransmittingBuoyOperation(transmittingBuoyOperation); + transmittingBuoy.setTransmittingBuoyType(transmittingBuoyType); + transmittingBuoy.setCode(buoyId); + boolean addCoordinate = "11".equals(objectOperation.getCode()); + if (addCoordinate) { + transmittingBuoy.setLatitude(activity.getLatitude()); + transmittingBuoy.setLongitude(activity.getLongitude()); + } + TransmittingBuoyOwnership transmittingBuoyOwnership = getTransmittingBuoyOwnership(dataContext, buoyOwnershipCode); + transmittingBuoy.setTransmittingBuoyOwnership(transmittingBuoyOwnership); + return transmittingBuoy; } private TransmittingBuoy getBuoyFromObservedSystem(ImportDataContext dataContext) { @@ -514,14 +526,18 @@ public class FloatingObjectReader extends DataReader<FloatingObject> { return dataContext.getObjectOperation(Objects.requireNonNull(objectOperationCode, String.format("Can't find objectOperation with ACTIVITE.C_OPERA: %s", vesselActivityCode))); } - private ObservedSystem getObservedSystem(ImportDataContext dataContext, String objectTypeCode, boolean floatingObjectExistsInAvdth, boolean buoyExistsInAvdth) { + private ObservedSystem getObservedSystem(ImportDataContext dataContext, + ObjectOperation objectOperation, + String objectTypeCode, + boolean floatingObjectExistsInAvdth, + boolean buoyExistsInAvdth) { if (!floatingObjectExistsInAvdth) { - if (!buoyExistsInAvdth) { - return dataContext.getObservedSystem0(); + if (buoyExistsInAvdth && !objectOperation.getCode().equals("1")) { + return dataContext.getObservedSystem20(); } - return dataContext.getObservedSystem20(); + return null; } - String observedSystemCode = OBSERVED_SYSTEM_CODE_MAPPING.get(objectTypeCode); + String observedSystemCode = OBSERVED_SYSTEM_FROM_OBJECT_OPERATION_CODE_MAPPING.get(objectTypeCode); return dataContext.getObservedSystem(observedSystemCode, false); } ===================================== core/persistence/migration/src/main/java/fr/ird/observe/spi/migration/v9/DataSourceMigrationForVersion_9_1.java ===================================== @@ -89,7 +89,7 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe public DataSourceMigrationForVersion_9_1() { super(Version.valueOf("9.1"), true); ByMajorMigrationVersionResource.createResourceScriptVariables(this, "2022-09-14", "2022-09-14 00:00:00.000000"); - idFactory = new TopiaIdFactoryForBulkSupport(LocalDateTime.of(2022, 9, 14,0,0).toInstant(ZoneOffset.UTC).toEpochMilli()); + idFactory = new TopiaIdFactoryForBulkSupport(LocalDateTime.of(2022, 9, 14, 0, 0).toInstant(ZoneOffset.UTC).toEpochMilli()); } static class WellPlanStructure { @@ -276,6 +276,8 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe if (withIds) { addVesselActivities(executor); + addTransmittingBuoyOperation(executor); + addDestination(executor); } // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2435 addNewTable(executor, withIds, "06", "table-common_sizemeasuremethod"); @@ -295,6 +297,34 @@ public class DataSourceMigrationForVersion_9_1 extends ByMajorMigrationVersionRe } } + private void addTransmittingBuoyOperation(MigrationVersionResourceExecutor executor) { + Set<String> existingCodes = executor.findMultipleResultAstSet(SqlQuery.wrap("SELECT CODE FROM ps_common.TransmittingBuoyOperation", resultSet -> resultSet.getString(1))); + Set<String> newCodes = new LinkedHashSet<>(); + Stream.of("99").forEach(code -> { + if (!existingCodes.contains(code)) { + executor.addScript("05", "add_referential_ps_common_TransmittingBuoyOperation_" + code); + newCodes.add(code); + } + }); + if (!newCodes.isEmpty()) { + executor.addScript("05", "add_referential_ps_common_TransmittingBuoyOperation_finalize"); + } + } + + private void addDestination(MigrationVersionResourceExecutor executor) { + Set<String> existingCodes = executor.findMultipleResultAstSet(SqlQuery.wrap("SELECT CODE FROM ps_landing.Destination", resultSet -> resultSet.getString(1))); + Set<String> newCodes = new LinkedHashSet<>(); + Stream.of("28", "29").forEach(code -> { + if (!existingCodes.contains(code)) { + executor.addScript("05", "add_referential_ps_landing_Destination_" + code); + newCodes.add(code); + } + }); + if (!newCodes.isEmpty()) { + executor.addScript("05", "add_referential_ps_landing_Destination_finalize"); + } + } + private Map<String, List<WellPlanStructure>> splitByTrip(List<WellPlanStructure> existingWellPlan) { String tripId = null; List<WellPlanStructure> forTrip = null; ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_99-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2023 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +INSERT INTO ps_common.TransmittingBuoyOperation(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, uri, homeid, needcomment, status, label1, label2, label3, label4, label5, label6, label7, label8) VALUES ('fr.ird.referential.ps.common.TransmittingBuoyOperation#${REFERENTIAL_PREFIX}99', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, '99', null, null, FALSE, 0, 'Unknown', 'Inconnue', 'Unknown TODO', null, null, null, null, null); ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_common_TransmittingBuoyOperation_finalize-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2023 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type ='fr.ird.observe.entities.referential.ps.common.TransmittingBuoyOperation'; ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_28-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2023 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +INSERT INTO ps_landing.Destination(topiaid, topiaversion, topiacreatedate, lastUpdateDate, needComment, status, code, label1, label2, label3) VALUES ('fr.ird.referential.ps.landing.Destination#${REFERENTIAL_PREFIX}28', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, FALSE, 1, '28' , 'Local market', 'Marché local', 'Local market TODO'); \ No newline at end of file ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_29-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2023 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +INSERT INTO ps_landing.Destination(topiaid, topiaversion, topiacreatedate, lastUpdateDate, needComment, status, code, label1, label2, label3) VALUES ('fr.ird.referential.ps.landing.Destination#${REFERENTIAL_PREFIX}29', 0, ${CURRENT_DATE}, ${CURRENT_TIMESTAMP}, FALSE, 1, '29' , 'CCCS (Central Common Cold Store)', 'CCCS (Central Common Cold Store)', 'CCCS (Central Common Cold Store)'); \ No newline at end of file ===================================== core/persistence/migration/src/main/resources/db/migration/v9/9.1/05_add_referential_ps_landing_Destination_finalize-common.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe Core :: Persistence :: Migration +-- %% +-- Copyright (C) 2008 - 2023 IRD, Ultreia.io +-- %% +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as +-- published by the Free Software Foundation, either version 3 of the +-- License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public +-- License along with this program. If not, see +-- <http://www.gnu.org/licenses/gpl-3.0.html>. +-- #L% +--- +UPDATE common.LastUpdateDate SET lastUpdateDate = ${CURRENT_TIMESTAMP} WHERE type ='fr.ird.observe.entities.referential.ps.landing.Destination'; ===================================== core/persistence/test/src/test/resources/fixtures/persistence/table_count/referential.properties ===================================== @@ -86,12 +86,12 @@ ps_common.reasonForNullSet=10 ps_common.sampleType=6 ps_common.schoolType=4 ps_common.speciesFate=15 -ps_common.transmittingBuoyOperation=5 +ps_common.transmittingBuoyOperation=6 ps_common.transmittingBuoyOwnership=5 ps_common.transmittingBuoyType=62 ps_common.vesselActivity=39 ps_common.weightCategory=137 -ps_landing.destination=28 +ps_landing.destination=30 ps_landing.fate=2 ps_localmarket.batchComposition=3 ps_localmarket.batchWeightType=4 ===================================== core/services/i18n/src/main/i18n/translations/services_en_GB.properties ===================================== @@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Grab and change observe.constant.TypeTransmittingBuoyOperation.lost=Lost observe.constant.TypeTransmittingBuoyOperation.noBuoy=No Beacon observe.constant.TypeTransmittingBuoyOperation.posing=Posing +observe.constant.TypeTransmittingBuoyOperation.unknown=Unknown observe.constant.TypeTransmittingBuoyOperation.visit=Visit observe.data.Activity.comment2=Only activity of type %s and %s allows you to fill DCPs. observe.data.Activity.validation.duplicated.number=There is already another activity with this number. ===================================== core/services/i18n/src/main/i18n/translations/services_es_ES.properties ===================================== @@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Recuperación y col observe.constant.TypeTransmittingBuoyOperation.lost=Lost observe.constant.TypeTransmittingBuoyOperation.noBuoy=DCP sin baliza observe.constant.TypeTransmittingBuoyOperation.posing=Colocación de nueva baliza +observe.constant.TypeTransmittingBuoyOperation.unknown=Desconocido observe.constant.TypeTransmittingBuoyOperation.visit=Visita a la baliza observe.data.Activity.comment2=Solo la actividad %1$s or %2$s permite introducir un DCPs. observe.data.Activity.validation.duplicated.number=There is already another activity with this number. \#TODO ===================================== core/services/i18n/src/main/i18n/translations/services_fr_FR.properties ===================================== @@ -457,6 +457,7 @@ observe.constant.TypeTransmittingBuoyOperation.grabAndChange=Récupération et p observe.constant.TypeTransmittingBuoyOperation.lost=Perte / fin de transmission observe.constant.TypeTransmittingBuoyOperation.noBuoy=Pas de balise liée au DCP observe.constant.TypeTransmittingBuoyOperation.posing=Pose d'une nouvelle balise +observe.constant.TypeTransmittingBuoyOperation.unknown=Inconnu observe.constant.TypeTransmittingBuoyOperation.visit=Simple visite de la balise observe.data.Activity.comment2=Seule l'activité %1$s ou %2$s permet de saisir des objets flottants. observe.data.Activity.validation.duplicated.number=Il existe déjà une autre activité avec ce numéro. ===================================== core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ValidateService-referentialResult.json ===================================== @@ -10394,114 +10394,6 @@ } ] }, - { - "reference": { - "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", - "content": { - "code": "1", - "label": "Pied à coulisse", - "needComment": false, - "enabled": true, - "id": "fr.ird.referential.common.SizeMeasureMethod#666#01", - "lastUpdateDate": "2021-09-17T00:00:00.000Z", - "topiaVersion": 1, - "topiaCreateDate": "2020-10-01T00:00:00.000Z" - } - }, - "messages": [ - { - "fieldName": "label3", - "scope": "WARNING", - "message": "Le libellé espagnol n\u0027est pas traduit." - }, - { - "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." - } - ] - }, - { - "reference": { - "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", - "content": { - "code": "2", - "label": "Règle", - "needComment": false, - "enabled": true, - "id": "fr.ird.referential.common.SizeMeasureMethod#666#02", - "lastUpdateDate": "2021-09-17T00:00:00.000Z", - "topiaVersion": 1, - "topiaCreateDate": "2020-10-01T00:00:00.000Z" - } - }, - "messages": [ - { - "fieldName": "label3", - "scope": "WARNING", - "message": "Le libellé espagnol n\u0027est pas traduit." - }, - { - "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." - } - ] - }, - { - "reference": { - "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", - "content": { - "code": "3", - "label": "Mètre ruban", - "needComment": false, - "enabled": true, - "id": "fr.ird.referential.common.SizeMeasureMethod#666#03", - "lastUpdateDate": "2021-09-17T00:00:00.000Z", - "topiaVersion": 1, - "topiaCreateDate": "2020-10-01T00:00:00.000Z" - } - }, - "messages": [ - { - "fieldName": "label3", - "scope": "WARNING", - "message": "Le libellé espagnol n\u0027est pas traduit." - }, - { - "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." - } - ] - }, - { - "reference": { - "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", - "content": { - "code": "4", - "label": "Estimation visuelle", - "needComment": false, - "enabled": true, - "id": "fr.ird.referential.common.SizeMeasureMethod#666#04", - "lastUpdateDate": "2021-09-17T00:00:00.000Z", - "topiaVersion": 1, - "topiaCreateDate": "2020-10-01T00:00:00.000Z" - } - }, - "messages": [ - { - "fieldName": "label3", - "scope": "WARNING", - "message": "Le libellé espagnol n\u0027est pas traduit." - }, - { - "fieldName": "uri", - "scope": "WARNING", - "message": "Le champ n\u0027est pas renseigné." - } - ] - }, { "reference": { "type": "fr.ird.observe.dto.referential.common.LengthWeightParameterReference", @@ -55337,6 +55229,114 @@ } ] }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", + "content": { + "code": "1", + "label": "Pied à coulisse", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.common.SizeMeasureMethod#666#01", + "lastUpdateDate": "2021-09-17T00:00:00.000Z", + "topiaVersion": 1, + "topiaCreateDate": "2020-10-01T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", + "content": { + "code": "2", + "label": "Règle", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.common.SizeMeasureMethod#666#02", + "lastUpdateDate": "2021-09-17T00:00:00.000Z", + "topiaVersion": 1, + "topiaCreateDate": "2020-10-01T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", + "content": { + "code": "3", + "label": "Mètre ruban", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.common.SizeMeasureMethod#666#03", + "lastUpdateDate": "2021-09-17T00:00:00.000Z", + "topiaVersion": 1, + "topiaCreateDate": "2020-10-01T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.common.SizeMeasureMethodReference", + "content": { + "code": "4", + "label": "Estimation visuelle", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.common.SizeMeasureMethod#666#04", + "lastUpdateDate": "2021-09-17T00:00:00.000Z", + "topiaVersion": 1, + "topiaCreateDate": "2020-10-01T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, { "reference": { "type": "fr.ird.observe.dto.referential.common.SizeMeasureTypeReference", @@ -68503,22 +68503,22 @@ { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." + "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique» (à la position 208) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «RAV* - Ravil - Ravil» (à la position 193) est désactivé." + "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «1BUM - Makaira mazara - Makaire bleu indo-pacifique» (à la position 208) est désactivé." + "message": "Le référentiel sélectionné «LKY - Lepidochelys kempii - Tortue de Kemp» (à la position 120) est désactivé." }, { "fieldName": "species", "scope": "ERROR", - "message": "Le référentiel sélectionné «SPY - Sphyrnidae - Famille Sphyrnidae» (à la position 24) est désactivé." + "message": "Le référentiel sélectionné «RAV* - Ravil - Ravil» (à la position 193) est désactivé." }, { "fieldName": "uri", @@ -197125,6 +197125,38 @@ } ] }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOperationReference", + "content": { + "code": "99", + "label": "Inconnue", + "needComment": false, + "enabled": false, + "id": "fr.ird.referential.ps.common.TransmittingBuoyOperation#1464000000000#99", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "status", + "scope": "WARNING", + "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, { "reference": { "type": "fr.ird.observe.dto.referential.ps.common.TransmittingBuoyOwnershipReference", @@ -199529,6 +199561,72 @@ } ] }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference", + "content": { + "code": "101", + "label": "[deprecated] Transit (steaming without searching)", + "allowFad": true, + "needComment": false, + "enabled": false, + "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#101", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "status", + "scope": "WARNING", + "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference", + "content": { + "code": "102", + "label": "[déprécié] Recherche (général)", + "allowFad": true, + "needComment": false, + "enabled": false, + "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#102", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "status", + "scope": "WARNING", + "message": "L\u0027objet est désactivé (il ne pourra plus être utilisée dans de données observées ou de nouveaux référentiels)." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, { "reference": { "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference", @@ -199809,6 +199907,34 @@ } ] }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference", + "content": { + "code": "36", + "label": "Ravitaillement en carburant", + "allowFad": false, + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.ps.common.VesselActivity#1464000000000#36", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, { "reference": { "type": "fr.ird.observe.dto.referential.ps.common.VesselActivityReference", @@ -209010,6 +209136,65 @@ } ] }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference", + "content": { + "code": "28", + "label": "Marché local", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.ps.landing.Destination#1464000000000#28", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, + { + "reference": { + "type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference", + "content": { + "code": "29", + "label": "CCCS (Central Common Cold Store)", + "needComment": false, + "enabled": true, + "id": "fr.ird.referential.ps.landing.Destination#1464000000000#29", + "lastUpdateDate": "2022-09-14T00:00:00.000Z", + "topiaVersion": 0, + "topiaCreateDate": "2022-09-14T00:00:00.000Z" + } + }, + "messages": [ + { + "fieldName": "label1", + "scope": "WARNING", + "message": "Le libellé anglais n\u0027est pas traduit." + }, + { + "fieldName": "label3", + "scope": "WARNING", + "message": "Le libellé espagnol n\u0027est pas traduit." + }, + { + "fieldName": "uri", + "scope": "WARNING", + "message": "Le champ n\u0027est pas renseigné." + } + ] + }, { "reference": { "type": "fr.ird.observe.dto.referential.ps.landing.DestinationReference", ===================================== model/src/main/resources/fixtures/global.properties ===================================== @@ -25,4 +25,4 @@ REFERENCE_DATA_COUNT=68 ENTITIES_LIMIT_SIZE=100 # fr.ird.observe.services.service.referential.ReferentialService # fr.ird.observe.services.local.service.referential.DifferentialModelTest -REFERENTIAL_COUNT=4096 +REFERENTIAL_COUNT=4099 View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/47a1289cac6f3e0960872515f... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/47a1289cac6f3e0960872515f... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)