Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 5d4a5e91 by tchemit at 2019-07-16T13:20:55Z Revert "[PS][CALCUL] Problèmes de calcul avec quelques marées (findLengthLengthParameter) - Closes #1350" This reverts commit 7f2e5857fb9b409b169c1f782ac90238adcfb87a. - - - - - 39a2588a by tchemit at 2019-07-16T16:41:17Z Renommer champs vessel.iattcid et vessel.ctoiid - Closes #1349 - - - - - 15 changed files: - client-core/src/main/i18n/getters/jaxx.getter - client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx - dto/src/main/models/Observe-01-referential-common.model - observe-i18n/src/main/i18n/translations/observe_en_GB.properties - observe-i18n/src/main/i18n/translations/observe_es_ES.properties - observe-i18n/src/main/i18n/translations/observe_fr_FR.properties - persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java - persistence/src/main/models/Observe-01-referential-common.model - persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql - services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java - test/src/main/resources/db/8.0/dataForTestLongline.sql.gz - test/src/main/resources/db/8.0/dataForTestSeine.sql.gz - test/src/main/resources/db/8.0/empty_h2.sql.gz - test/src/main/resources/db/8.0/empty_pg.sql.gz - test/src/main/resources/db/8.0/referentiel.sql.gz Changes: ===================================== client-core/src/main/i18n/getters/jaxx.getter ===================================== @@ -876,10 +876,10 @@ observe.common.VesselActivitySeineDto.allowFad observe.common.VesselDto.capacity observe.common.VesselDto.changeDate observe.common.VesselDto.comId -observe.common.VesselDto.ctoiId +observe.common.VesselDto.iotcId observe.common.VesselDto.flagCountry observe.common.VesselDto.generalTab -observe.common.VesselDto.iattcId +observe.common.VesselDto.iccat observe.common.VesselDto.imoId observe.common.VesselDto.keelCodeFlotte observe.common.VesselDto.length ===================================== client-core/src/main/java/fr/ird/observe/client/ui/content/ref/common/VesselUI.jaxx ===================================== @@ -220,13 +220,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox </cell> </row> - <!-- ctoiId --> + <!-- iotcId --> <row> <cell anchor="west"> - <JLabel id='ctoiIdLabel'/> + <JLabel id='iotcIdLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NormalTextEditor id='ctoiId'/> + <NormalTextEditor id='iotcId'/> </cell> </row> @@ -240,13 +240,13 @@ fr.ird.observe.client.ui.util.BeanCheckBox </cell> </row> - <!-- iattcId --> + <!-- iccat --> <row> <cell anchor="west"> - <JLabel id='iattcIdLabel'/> + <JLabel id='iccatLabel'/> </cell> <cell anchor='east' weightx="1" fill="both"> - <NormalTextEditor id='iattcId'/> + <NormalTextEditor id='iccat'/> </cell> </row> ===================================== dto/src/main/models/Observe-01-referential-common.model ===================================== @@ -148,8 +148,8 @@ capacity + {*:1} Float power + {*:1} Integer searchMaximum + {*:1} Float comment + {*:1} String -iattcId + {*:1} String -ctoiId + {*:1} String +iccat + {*:1} String +iotcId + {*:1} String nationalId + {*:1} String comId + {*:1} String tuviId + {*:1} String ===================================== observe-i18n/src/main/i18n/translations/observe_en_GB.properties ===================================== @@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Vessel activities (Seine) observe.common.VesselDto.capacity=Capacity observe.common.VesselDto.changeDate=Change date observe.common.VesselDto.comId=EU Id -observe.common.VesselDto.ctoiId=IOTC id +observe.common.VesselDto.iotcId=IOTC id observe.common.VesselDto.flagCountry=Flag country observe.common.VesselDto.fleetCountry=Fleet country observe.common.VesselDto.generalTab=General caracteristics -observe.common.VesselDto.iattcId=ICCAT Id +observe.common.VesselDto.iccat=ICCAT Id observe.common.VesselDto.imoId=IMO Id observe.common.VesselDto.keelCode=Keel code observe.common.VesselDto.keelCodeFlotte=Keel / Flotte ===================================== observe-i18n/src/main/i18n/translations/observe_es_ES.properties ===================================== @@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Actividades buque \#TODO-SP observe.common.VesselDto.capacity=Capacidad de transporte observe.common.VesselDto.changeDate=Fecha de carga observe.common.VesselDto.comId=Id EU -observe.common.VesselDto.ctoiId=Id IOTC +observe.common.VesselDto.iotcId=Id IOTC observe.common.VesselDto.flagCountry=Bandera observe.common.VesselDto.fleetCountry=País observe.common.VesselDto.generalTab=Características generales -observe.common.VesselDto.iattcId=Id CICAA +observe.common.VesselDto.iccat=Id CICAA observe.common.VesselDto.imoId=Id IMO observe.common.VesselDto.keelCode=Código de Quilla observe.common.VesselDto.keelCodeFlotte=Código de Quilla / Flota ===================================== observe-i18n/src/main/i18n/translations/observe_fr_FR.properties ===================================== @@ -2500,11 +2500,11 @@ observe.common.VesselActivitySeineDto.types=Activités bateau (Senne) observe.common.VesselDto.capacity=Capacité transport (m³) observe.common.VesselDto.changeDate=Date changement pavillon observe.common.VesselDto.comId=Id EU -observe.common.VesselDto.ctoiId=Id CTOI +observe.common.VesselDto.iotcId=Id CTOI observe.common.VesselDto.flagCountry=Pavillon observe.common.VesselDto.fleetCountry=Flotte observe.common.VesselDto.generalTab=Caractéristiques générales -observe.common.VesselDto.iattcId=Id CICTA +observe.common.VesselDto.iccat=Id CICTA observe.common.VesselDto.imoId=Id IMO observe.common.VesselDto.keelCode=Code quille observe.common.VesselDto.keelCodeFlotte=Code quille /Code flotte ===================================== persistence/src/main/java/fr/ird/observe/binder/referential/common/VesselEntityDtoBinder.java ===================================== @@ -56,8 +56,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves entity.setSearchMaximum(dto.getSearchMaximum()); entity.setComment(dto.getComment()); entity.setComId(dto.getComId()); - entity.setCtoiId(dto.getCtoiId()); - entity.setIattcId(dto.getIattcId()); + entity.setIotcId(dto.getIotcId()); + entity.setIccat(dto.getIccat()); entity.setImoId(dto.getImoId()); entity.setNationalId(dto.getNationalId()); entity.setRadioCallSignId(dto.getRadioCallSignId()); @@ -83,8 +83,8 @@ public class VesselEntityDtoBinder extends ReferentialEntityDtoBinderSupport<Ves dto.setSearchMaximum(entity.getSearchMaximum()); dto.setComment(entity.getComment()); dto.setComId(entity.getComId()); - dto.setCtoiId(entity.getCtoiId()); - dto.setIattcId(entity.getIattcId()); + dto.setIotcId(entity.getIotcId()); + dto.setIccat(entity.getIccat()); dto.setImoId(entity.getImoId()); dto.setNationalId(entity.getNationalId()); dto.setRadioCallSignId(entity.getRadioCallSignId()); ===================================== persistence/src/main/models/Observe-01-referential-common.model ===================================== @@ -163,8 +163,8 @@ capacity + {*:1} Float | sqlType=numeric power + {*:1} Integer searchMaximum + {*:1} Float | sqlType=numeric comment + {*:1} String | hibernateAttributeType=text -iattcId + {*:1} String -ctoiId + {*:1} String +iccat + {*:1} String +iotcId + {*:1} String nationalId + {*:1} String comId + {*:1} String tuviId + {*:1} String ===================================== persistence/src/main/resources/db/migration/8.0/101_create_common_schema-common.sql ===================================== @@ -46,7 +46,7 @@ CREATE TABLE common.speciesgroupreleasemode(topiaid VARCHAR(255) NOT NULL CONSTR CREATE TABLE common.specieslist(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_specieslist PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL); CREATE TABLE common.vesselsizecategory(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesselsizecategory PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, capacitylabel VARCHAR(255), gaugelabel VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL); CREATE TABLE common.vesseltype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vesseltype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL); -CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), ctoiid VARCHAR(255), iattcid VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255)); +CREATE TABLE common.vessel(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_vessel PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), keelcode INTEGER, fleetcountry INTEGER, changedate TIMESTAMP, yearservice INTEGER, length NUMERIC, capacity NUMERIC, power INTEGER, searchmaximum NUMERIC, uri VARCHAR(255), status INTEGER DEFAULT 1, comment VARCHAR(1025), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), flagcountry VARCHAR(255), vesseltype VARCHAR(255), vesselsizecategory VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL, comid VARCHAR(255), iotcId VARCHAR(255), iccat VARCHAR(255), imoid VARCHAR(255), nationalid VARCHAR(255), radiocallsignid VARCHAR(255), tuviid VARCHAR(255), shipowner VARCHAR(255)); CREATE TABLE common.weightmeasuremethod(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuremethod PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255)); CREATE TABLE common.weightmeasuretype(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_weightmeasuretype PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, lastupdatedate TIMESTAMP NOT NULL, code VARCHAR(255), status INTEGER DEFAULT 1, needcomment BOOLEAN DEFAULT FALSE, uri VARCHAR(255), label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255)); CREATE TABLE common.wind(topiaid VARCHAR(255) NOT NULL CONSTRAINT pk_wind PRIMARY KEY, topiaversion BIGINT NOT NULL, topiacreatedate DATE NOT NULL, code VARCHAR(255), speedrange VARCHAR(255), waveheight VARCHAR(255), uri VARCHAR(255), status INTEGER DEFAULT 1, label1 VARCHAR(255), label2 VARCHAR(255), label3 VARCHAR(255), label4 VARCHAR(255), label5 VARCHAR(255), label6 VARCHAR(255), label7 VARCHAR(255), label8 VARCHAR(255), needcomment BOOLEAN DEFAULT FALSE, lastupdatedate TIMESTAMP DEFAULT now() NOT NULL); @@ -79,7 +79,7 @@ INSERT INTO common.speciesgroupreleasemode(topiaid, topiaversion, topiacreatedat INSERT INTO common.specieslist(topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, status, uri, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.specieslist; INSERT INTO common.vesselsizecategory(topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, capacitylabel, gaugelabel, needcomment, lastupdatedate FROM observe_common.vesselsizecategory; INSERT INTO common.vesseltype(topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.vesseltype; -INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel; +INSERT INTO common.vessel(topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, iotcId, iccat, imoid, nationalid, radiocallsignid, tuviid, shipowner) SELECT topiaid, topiaversion, topiacreatedate, code, keelcode, fleetcountry, changedate, yearservice, length, capacity, power, searchmaximum, uri, status, comment, label1, label2, label3, label4, label5, label6, label7, label8, flagcountry, vesseltype, vesselsizecategory, needcomment, lastupdatedate, comid, ctoiid, iattcid, imoid, nationalid, radiocallsignid, tuviid, shipowner FROM observe_common.vessel; INSERT INTO common.weightmeasuremethod(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuremethod; INSERT INTO common.weightmeasuretype(topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8) SELECT topiaid, topiaversion, topiacreatedate, lastupdatedate, code, status, needcomment, uri, label1, label2, label3, label4, label5, label6, label7, label8 FROM observe_common.weightmeasuretype; INSERT INTO common.wind(topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate) SELECT topiaid, topiaversion, topiacreatedate, code, speedrange, waveheight, uri, status, label1, label2, label3, label4, label5, label6, label7, label8, needcomment, lastupdatedate FROM observe_common.wind; ===================================== services-local/src/main/java/fr/ird/observe/services/local/service/actions/consolidate/ConsolidateDataServiceLocal.java ===================================== @@ -695,10 +695,6 @@ public class ConsolidateDataServiceLocal extends ObserveServiceLocal implements } SizeMeasureType outputSizeMeasureType = lengthWeightParameter.getSizeMeasureType(); - if (outputSizeMeasureType == null) { - log.error(String.format("No size measure type found for LengthWeightParameter (%s) will use the one of the species", lengthWeightParameter.getTopiaId())); - outputSizeMeasureType = lengthWeightParameter.getSpecies().getSizeMeasureType(); - } if (!Objects.equals(inputSizeMeasureType, outputSizeMeasureType)) { // on doit effectuer une conversion taille - taille avant de convertir en poids ===================================== test/src/main/resources/db/8.0/dataForTestLongline.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz and b/test/src/main/resources/db/8.0/dataForTestLongline.sql.gz differ ===================================== test/src/main/resources/db/8.0/dataForTestSeine.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz and b/test/src/main/resources/db/8.0/dataForTestSeine.sql.gz differ ===================================== test/src/main/resources/db/8.0/empty_h2.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/empty_h2.sql.gz and b/test/src/main/resources/db/8.0/empty_h2.sql.gz differ ===================================== test/src/main/resources/db/8.0/empty_pg.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/empty_pg.sql.gz and b/test/src/main/resources/db/8.0/empty_pg.sql.gz differ ===================================== test/src/main/resources/db/8.0/referentiel.sql.gz ===================================== Binary files a/test/src/main/resources/db/8.0/referentiel.sql.gz and b/test/src/main/resources/db/8.0/referentiel.sql.gz differ View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f2e5857fb9b409b169c1f782ac... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/compare/7f2e5857fb9b409b169c1f782ac... You're receiving this email because of your account on gitlab.com.