Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 60ebe3c4 by Tony CHEMIT at 2018-10-07T15:59:12Z [LL] Opération de pêche : petits ajustements - Closes #1126 - - - - - 23 changed files: - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jaxx - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jcss - client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIHandler.java - dto/src/main/models/Observe-06-data-longline-logbook.model - persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookEntityDtoBinder.java - persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_3.java - persistence/src/main/models/Observe-06-data-longline-logbook.model - persistence/src/main/resources/db/migration/8.3/03_update_referential_longline_line_type-common.sql - + persistence/src/main/resources/db/migration/8.3/04_update_longline_set_logbook_field-H2.sql - + persistence/src/main/resources/db/migration/8.3/04_update_longline_set_logbook_field-PG.sql - services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookServiceLocal.java - test/src/main/resources/db/8.3/dataForTestLongline.sql.gz - test/src/main/resources/db/8.3/dataForTestSeine.sql.gz - test/src/main/resources/db/8.3/empty_h2.sql.gz - test/src/main/resources/db/8.3/empty_pg.sql.gz - test/src/main/resources/db/8.3/referentiel.sql.gz - validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-create-error-validation.xml - validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-create-warning-validation.xml - validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-update-error-validation.xml - validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-update-warning-validation.xml - validation/src/main/resources/i18n/validation_en_GB.properties - validation/src/main/resources/i18n/validation_es_ES.properties - validation/src/main/resources/i18n/validation_fr_FR.properties Changes: ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jaxx ===================================== @@ -326,13 +326,13 @@ <JCheckBox id='lightsticksUsed' styleClass="i18n"/> </cell> </row> - <!-- lightsticks per basket count --> + <!-- total lightsticks count --> <row> <cell anchor='west'> - <JLabel id='lightsticksPerBasketCountLabel'/> + <JLabel id='totalLightsticksCountLabel'/> </cell> <cell fill='both' weightx="1" columns="3"> - <NumberEditor id='lightsticksPerBasketCount' constructorParams='this' styleClass="int6"/> + <NumberEditor id='totalLightsticksCount' constructorParams='this' styleClass="int6"/> </cell> </row> <!-- lightsticks type --> ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUI.jcss ===================================== @@ -196,9 +196,9 @@ selected:{BooleanUtils.isTrue(bean.getLightsticksUsed())}; } -#lightsticksPerBasketCount { - property:{SetLonglineLogbookDto.PROPERTY_LIGHTSTICKS_PER_BASKET_COUNT}; - numberValue:{bean.getLightsticksPerBasketCount()}; +#totalLightsticksCount { + property:{SetLonglineLogbookDto.PROPERTY_TOTAL_LIGHTSTICKS_COUNT}; + numberValue:{bean.getTotalLightsticksCount()}; } #lightsticksType { ===================================== client/src/main/java/fr/ird/observe/client/ui/content/data/longline/logbook/SetLonglineLogbookUIHandler.java ===================================== @@ -127,16 +127,16 @@ class SetLonglineLogbookUIHandler extends ContentEditUIHandler<SetLonglineLogboo if (BooleanUtils.isTrue(newValue)) { // depredated - ui.getLightsticksPerBasketCount().setEnabled(true); + ui.getTotalLightsticksCount().setEnabled(true); ui.getLightsticksType().setEnabled(true); ui.getLightsticksColor().setEnabled(true); } else { // not depredated - ui.getLightsticksPerBasketCount().setEnabled(false); + ui.getTotalLightsticksCount().setEnabled(false); ui.getLightsticksType().setEnabled(false); ui.getLightsticksColor().setEnabled(false); - tableEditBean.setLightsticksPerBasketCount(null); + tableEditBean.setTotalLightsticksCount(null); tableEditBean.setLightsticksType(null); tableEditBean.setLightsticksColor(null); } ===================================== dto/src/main/models/Observe-06-data-longline-logbook.model ===================================== @@ -49,11 +49,11 @@ branchlinesPerBasketCount + {*:1} Integer totalSectionsCount + {*:1} Integer totalBasketsCount + {*:1} Integer totalHooksCount + {*:1} Integer +totalLightsticksCount + {*:1} Integer weightedSnap + {*:1} Boolean snapWeight + {*:1} Float weightedSwivel + {*:1} Boolean swivelWeight + {*:1} Float -lightsticksPerBasketCount + {*:1} Integer timeBetweenHooks + {*:1} Long shooterUsed + {*:1} Boolean shooterSpeed + {*:1} Float ===================================== persistence/src/main/java/fr/ird/observe/binder/data/longline/SetLonglineLogbookEntityDtoBinder.java ===================================== @@ -10,12 +10,12 @@ package fr.ird.observe.binder.data.longline; * 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>. @@ -74,7 +74,7 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor entity.setMonitored(dto.getMonitored()); entity.setLightsticksUsed(dto.getLightsticksUsed()); - entity.setLightsticksPerBasketCount(dto.getLightsticksPerBasketCount()); + entity.setTotalLightsticksCount(dto.getTotalLightsticksCount()); entity.setLightsticksType(toEntity(dto.getLightsticksType())); entity.setLightsticksColor(toEntity(dto.getLightsticksColor())); @@ -126,7 +126,7 @@ public class SetLonglineLogbookEntityDtoBinder extends DataEntityDtoBinderSuppor dto.setMonitored(entity.getMonitored()); dto.setLightsticksUsed(entity.getLightsticksUsed()); - dto.setLightsticksPerBasketCount(entity.getLightsticksPerBasketCount()); + dto.setTotalLightsticksCount(entity.getTotalLightsticksCount()); dto.setLightsticksType(toReferentialReference(referentialLocale, entity.getLightsticksType())); dto.setLightsticksColor(toReferentialReference(referentialLocale, entity.getLightsticksColor())); ===================================== persistence/src/main/java/fr/ird/observe/persistence/migration/DataSourceMigrationForVersion_8_3.java ===================================== @@ -44,6 +44,7 @@ public class DataSourceMigrationForVersion_8_3 extends MigrationVersionResource executor.addScript("01", "update_referential_longline_conservation"); executor.addScript("02", "update_referential_common_harbour"); executor.addScript("03", "update_referential_longline_line_type"); + executor.addScript("04", "update_longline_set_logbook_field"); } } ===================================== persistence/src/main/models/Observe-06-data-longline-logbook.model ===================================== @@ -51,11 +51,11 @@ branchlinesPerBasketCount + {*:1} Integer totalSectionsCount + {*:1} Integer totalBasketsCount + {*:1} Integer totalHooksCount + {*:1} Integer +totalLightsticksCount + {*:1} Integer weightedSnap + {*:1} Boolean snapWeight + {*:1} Float | sqlType=numeric weightedSwivel + {*:1} Boolean swivelWeight + {*:1} Float | sqlType=numeric -lightsticksPerBasketCount + {*:1} Integer timeBetweenHooks + {*:1} Long shooterUsed + {*:1} Boolean shooterSpeed + {*:1} Float | sqlType=numeric ===================================== persistence/src/main/resources/db/migration/8.3/03_update_referential_longline_line_type-common.sql ===================================== @@ -19,26 +19,5 @@ -- <http://www.gnu.org/licenses/gpl-3.0.html>. -- #L% --- -INSERT INTO observe_longline.linetype (topiaid, - topiaversion, - topiacreatedate, - lastupdatedate, - status, - needComment, - code, - label1, - label2, - label3) -values ('fr.ird.observe.entities.referentiel.longline.LineType#1239832686157#0.9', - 0, - CURRENT_DATE, - CURRENT_TIMESTAMP, - 1, - false, - 'UNK', - 'Unknown', - 'Inconnu', - 'Desconocido'); -UPDATE observe_common.LASTUPDATEDATE -SET lastupdatedate = CURRENT_TIMESTAMP -WHERE topiaId = 'fr.ird.observe.entities.LastUpdateDate#1236861982132#0.48'; \ No newline at end of file +INSERT INTO observe_longline.linetype (topiaid, topiaversion, topiacreatedate, lastupdatedate, status, needComment, code, label1, label2, label3) values ('fr.ird.observe.entities.referentiel.longline.LineType#1239832686157#0.9', 0, CURRENT_DATE, CURRENT_TIMESTAMP, 1, false, 'UNK', 'Unknown', 'Inconnu', 'Desconocido'); +UPDATE observe_common.LASTUPDATEDATE SET lastupdatedate = CURRENT_TIMESTAMP WHERE topiaId = 'fr.ird.observe.entities.LastUpdateDate#1236861982132#0.48'; \ No newline at end of file ===================================== persistence/src/main/resources/db/migration/8.3/04_update_longline_set_logbook_field-H2.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2018 IRD, Code Lutin, 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% +--- +ALTER TABLE observe_longline.setlogbook ALTER COLUMN lightsticksPerBasketCount RENAME TO totalLightsticksCount; \ No newline at end of file ===================================== persistence/src/main/resources/db/migration/8.3/04_update_longline_set_logbook_field-PG.sql ===================================== @@ -0,0 +1,22 @@ +--- +-- #%L +-- ObServe :: Persistence +-- %% +-- Copyright (C) 2008 - 2018 IRD, Code Lutin, 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% +--- +ALTER TABLE observe_longline.setlogbook RENAME COLUMN lightsticksPerBasketCount TO totalLightsticksCount; \ No newline at end of file ===================================== services-local/src/main/java/fr/ird/observe/services/local/service/data/longline/SetLonglineLogbookServiceLocal.java ===================================== @@ -76,8 +76,7 @@ public class SetLonglineLogbookServiceLocal extends ObserveServiceLocal implemen ActivityLonglineLogbook activityLongline = ACTIVITY_LONGLINE_LOGBOOK_SPI.loadEntity(getTopiaPersistenceContext(), activityLonglineId); SetLonglineLogbook preCreated = SET_LONGLINE_LOGBOOK_SPI.newEntity(); - // on utilise la date - heure de l'activité pour initialiser les horodatages - // de l'opération de pêche + // on utilise la date - heure de l'activité pour initialiser les horodatages de l'opération de pêche Date timeStamp = activityLongline.getTimeStamp(); preCreated.setSettingStartTimeStamp(timeStamp); preCreated.setSettingEndTimeStamp(DateUtils.addHours(timeStamp, 1)); @@ -87,6 +86,9 @@ public class SetLonglineLogbookServiceLocal extends ObserveServiceLocal implemen // on reporte la position de l'activité pour la position de début de filage preCreated.setSettingStartLatitude(activityLongline.getLatitude()); preCreated.setSettingStartLongitude(activityLongline.getLongitude()); + + // by default 1 section count + preCreated.setTotalSectionsCount(1); Form<SetLonglineLogbookDto> form = SET_LONGLINE_LOGBOOK_SPI.dataEntityToForm(preCreated, getReferentialLocale()); form.getObject().setOtherSets(getOtherSetLonglineDtoSet(activityLongline, preCreated)); return form; ===================================== test/src/main/resources/db/8.3/dataForTestLongline.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/8.3/dataForTestSeine.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== test/src/main/resources/db/8.3/empty_h2.sql.gz ===================================== @@ -85,7 +85,7 @@ create table OBSERVE_LONGLINE.sensorBrand (topiaId varchar(255) not null, topiaV create table OBSERVE_LONGLINE.sensorDataFormat (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sensorType (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sensorUsedObs (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, data blob, dataFilename varchar(255), dataLocation varchar(255), sensorSerialNo varchar(255), sensorType varchar(255), sensorDataFormat varchar(255), sensorBrand varchar(255), activity varchar(255), primary key (topiaId)); -create table OBSERVE_LONGLINE.SetLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), homeId varchar(255), number integer, basketsPerSectionCount integer, branchlinesPerBasketCount integer, totalSectionsCount integer, totalBasketsCount integer, totalHooksCount integer, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, lightsticksPerBasketCount integer, timeBetweenHooks bigint, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted integer, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks integer, monitored boolean, totalLineLength integer, basketLineLength integer, lengthBetweenBranchlines integer, settingShape varchar(255), lineType varchar(255), lightsticksUsed boolean, lightsticksCount integer, lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); +create table OBSERVE_LONGLINE.SetLogbook (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), homeId varchar(255), number integer, basketsPerSectionCount integer, branchlinesPerBasketCount integer, totalSectionsCount integer, totalBasketsCount integer, totalHooksCount integer, totalLightsticksCount integer, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, timeBetweenHooks bigint, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted integer, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks integer, monitored boolean, totalLineLength integer, basketLineLength integer, lengthBetweenBranchlines integer, settingShape varchar(255), lineType varchar(255), lightsticksUsed boolean, lightsticksCount integer, lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.SetObs (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment varchar(2147483647), homeId varchar(255), number integer, basketsPerSectionCount integer, branchlinesPerBasketCount integer, totalSectionsCount integer, totalBasketsCount integer, totalHooksCount integer, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, lightsticksPerBasketCount integer, timeBetweenHooks bigint, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted integer, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks integer, monitored boolean, settingShape varchar(255), lineType varchar(255), lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.settingShape (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status integer, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sizeMeasureObs (topiaId varchar(255) not null, topiaVersion bigint not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, size numeric, sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), catch varchar(255), primary key (topiaId)); ===================================== test/src/main/resources/db/8.3/empty_pg.sql.gz ===================================== @@ -85,7 +85,7 @@ create table OBSERVE_LONGLINE.sensorBrand (topiaId varchar(255) not null, topiaV create table OBSERVE_LONGLINE.sensorDataFormat (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sensorType (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sensorUsedObs (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, data oid, dataFilename varchar(255), dataLocation varchar(255), sensorSerialNo varchar(255), sensorType varchar(255), sensorDataFormat varchar(255), sensorBrand varchar(255), activity varchar(255), primary key (topiaId)); -create table OBSERVE_LONGLINE.SetLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, homeId varchar(255), number int4, basketsPerSectionCount int4, branchlinesPerBasketCount int4, totalSectionsCount int4, totalBasketsCount int4, totalHooksCount int4, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, lightsticksPerBasketCount int4, timeBetweenHooks int8, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted int4, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks int4, monitored boolean, totalLineLength int4, basketLineLength int4, lengthBetweenBranchlines int4, settingShape varchar(255), lineType varchar(255), lightsticksUsed boolean, lightsticksCount int4, lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); +create table OBSERVE_LONGLINE.SetLogbook (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, homeId varchar(255), number int4, basketsPerSectionCount int4, branchlinesPerBasketCount int4, totalSectionsCount int4, totalBasketsCount int4, totalHooksCount int4, totalLightsticksCount int4, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, timeBetweenHooks int8, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted int4, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks int4, monitored boolean, totalLineLength int4, basketLineLength int4, lengthBetweenBranchlines int4, settingShape varchar(255), lineType varchar(255), lightsticksUsed boolean, lightsticksCount int4, lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.SetObs (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, comment text, homeId varchar(255), number int4, basketsPerSectionCount int4, branchlinesPerBasketCount int4, totalSectionsCount int4, totalBasketsCount int4, totalHooksCount int4, weightedSnap boolean, snapWeight numeric, weightedSwivel boolean, swivelWeight numeric, lightsticksPerBasketCount int4, timeBetweenHooks int8, shooterUsed boolean, shooterSpeed numeric, maxDepthTargeted int4, settingStartTimeStamp timestamp, settingStartLatitude numeric, settingStartLongitude numeric, settingEndTimeStamp timestamp, settingEndLatitude numeric, settingEndLongitude numeric, settingVesselSpeed numeric, haulingDirectionSameAsSetting boolean, haulingStartTimeStamp timestamp, haulingStartLatitude numeric, haulingStartLongitude numeric, haulingEndTimeStamp timestamp, haulingEndLatitude numeric, haulingEndLongitude numeric, haulingBreaks int4, monitored boolean, settingShape varchar(255), lineType varchar(255), lightsticksType varchar(255), lightsticksColor varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.settingShape (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, code varchar(255), uri varchar(255), needComment boolean not null, status int4, label1 varchar(255), label2 varchar(255), label3 varchar(255), label4 varchar(255), label5 varchar(255), label6 varchar(255), label7 varchar(255), label8 varchar(255), primary key (topiaId)); create table OBSERVE_LONGLINE.sizeMeasureObs (topiaId varchar(255) not null, topiaVersion int8 not null, topiaCreateDate timestamp, lastUpdateDate timestamp not null, size numeric, sizeMeasureType varchar(255), lengthMeasureMethod varchar(255), catch varchar(255), primary key (topiaId)); ===================================== test/src/main/resources/db/8.3/referentiel.sql.gz ===================================== The diff for this file was not included because it is too large. ===================================== validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-create-error-validation.xml ===================================== @@ -42,15 +42,6 @@ </field> - <field name="haulingDirectionSameAsSetting"> - - <!-- haulingDirectionSameAsSetting non renseigne --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.haulingDirectionSameAsSetting</message> - </field-validator> - - </field> - <field name="settingStartTimeStamp"> <!-- settingStartTimeStamp non renseigne --> @@ -454,11 +445,6 @@ <field name="totalSectionsCount"> - <!-- totalSectionsCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.totalSectionsCount</message> - </field-validator> - <!-- 0 <= totalSectionsCount <= 100 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:100</param> @@ -475,16 +461,11 @@ <field name="basketsPerSectionCount"> - <!-- basketsPerSectionCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.basketsPerSectionCount</message> - </field-validator> - <!-- 0 <= basketsPerSectionCount <= 100 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:100</param> <param name="expression"><![CDATA[ - (ints.min <= basketsPerSectionCount && basketsPerSectionCount <= ints.max) + basketsPerSectionCount == null || (ints.min <= basketsPerSectionCount && basketsPerSectionCount <= ints.max) ]]> </param> <message> @@ -496,16 +477,11 @@ <field name="branchlinesPerBasketCount"> - <!-- branchlinesPerBasketCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.branchlinesPerBasketCount</message> - </field-validator> - <!-- 0 <= branchlinesPerBasketCount <= 50 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:50</param> <param name="expression"><![CDATA[ - (ints.min <= branchlinesPerBasketCount && branchlinesPerBasketCount <= ints.max) + branchlinesPerBasketCount == null || (ints.min <= branchlinesPerBasketCount && branchlinesPerBasketCount <= ints.max) ]]> </param> <message> @@ -547,17 +523,17 @@ </field> - <field name="lightsticksPerBasketCount"> + <field name="totalLightsticksCount"> - <!-- 0 <= lightsticksPerBasketCount <= 50 --> + <!-- 0 <= totalLightsticksCount <= 50 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:50</param> <param name="expression"><![CDATA[ - lightsticksPerBasketCount == null || (ints.min <= lightsticksPerBasketCount && lightsticksPerBasketCount <= ints.max) + totalLightsticksCount == null || (ints.min <= totalLightsticksCount && totalLightsticksCount <= ints.max) ]]> </param> <message> - observe.validation.setLongline.bound.lightsticksPerBasketCount##${ints.min}##${ints.max} + observe.validation.setLongline.bound.totalLightsticksCount##${ints.min}##${ints.max} </message> </field-validator> ===================================== validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-create-warning-validation.xml ===================================== @@ -140,4 +140,31 @@ </field> + <field name="totalSectionsCount"> + + <!-- totalSectionsCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.totalSectionsCount</message> + </field-validator> + + </field> + + <field name="basketsPerSectionCount"> + + <!-- basketsPerSectionCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.basketsPerSectionCount</message> + </field-validator> + + </field> + + <field name="branchlinesPerBasketCount"> + + <!-- branchlinesPerBasketCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.branchlinesPerBasketCount</message> + </field-validator> + + </field> + </validators> ===================================== validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-update-error-validation.xml ===================================== @@ -42,15 +42,6 @@ </field> - <field name="haulingDirectionSameAsSetting"> - - <!-- haulingDirectionSameAsSetting non renseigne --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.haulingDirectionSameAsSetting</message> - </field-validator> - - </field> - <field name="settingStartTimeStamp"> <!-- settingStartTimeStamp non renseigne --> @@ -438,11 +429,6 @@ <field name="totalSectionsCount"> - <!-- totalSectionsCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.totalSectionsCount</message> - </field-validator> - <!-- 0 <= totalSectionsCount <= 100 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:100</param> @@ -459,16 +445,11 @@ <field name="basketsPerSectionCount"> - <!-- basketsPerSectionCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.basketsPerSectionCount</message> - </field-validator> - <!-- 0 <= basketsPerSectionCount <= 100 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:100</param> <param name="expression"><![CDATA[ - (ints.min <= basketsPerSectionCount && basketsPerSectionCount <= ints.max) + basketsPerSectionCount == null || (ints.min <= basketsPerSectionCount && basketsPerSectionCount <= ints.max) ]]> </param> <message> @@ -480,16 +461,11 @@ <field name="branchlinesPerBasketCount"> - <!-- branchlinesPerBasketCount obligatoire --> - <field-validator type="required" short-circuit="true"> - <message>observe.validation.setLongline.required.branchlinesPerBasketCount</message> - </field-validator> - <!-- 0 <= branchlinesPerBasketCount <= 50 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:50</param> <param name="expression"><![CDATA[ - (ints.min <= branchlinesPerBasketCount && branchlinesPerBasketCount <= ints.max) + branchlinesPerBasketCount == null || (ints.min <= branchlinesPerBasketCount && branchlinesPerBasketCount <= ints.max) ]]> </param> <message> @@ -531,17 +507,17 @@ </field> - <field name="lightsticksPerBasketCount"> + <field name="totalLightsticksCount"> - <!-- 0 <= lightsticksPerBasketCount <= 50 --> + <!-- 0 <= totalLightsticksCount <= 50 --> <field-validator type="fieldexpressionwithparams" short-circuit="true"> <param name="intParams">min:0|max:50</param> <param name="expression"><![CDATA[ - lightsticksPerBasketCount == null || (ints.min <= lightsticksPerBasketCount && lightsticksPerBasketCount <= ints.max) + totalLightsticksCount == null || (ints.min <= totalLightsticksCount && totalLightsticksCount <= ints.max) ]]> </param> <message> - observe.validation.setLongline.bound.lightsticksPerBasketCount##${ints.min}##${ints.max} + observe.validation.setLongline.bound.totalLightsticksCount##${ints.min}##${ints.max} </message> </field-validator> ===================================== validation/src/main/resources/fr/ird/observe/dto/data/longline/SetLonglineLogbookDto-update-warning-validation.xml ===================================== @@ -140,4 +140,31 @@ </field> + <field name="totalSectionsCount"> + + <!-- totalSectionsCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.totalSectionsCount</message> + </field-validator> + + </field> + + <field name="basketsPerSectionCount"> + + <!-- basketsPerSectionCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.basketsPerSectionCount</message> + </field-validator> + + </field> + + <field name="branchlinesPerBasketCount"> + + <!-- branchlinesPerBasketCount obligatoire --> + <field-validator type="required" short-circuit="true"> + <message>observe.validation.setLongline.required.branchlinesPerBasketCount</message> + </field-validator> + + </field> + </validators> ===================================== validation/src/main/resources/i18n/validation_en_GB.properties ===================================== @@ -254,7 +254,6 @@ observe.common.SetLonglineLogbookDto.haulingStartQuadrant=Hauling start quadrant observe.common.SetLonglineLogbookDto.haulingStartTimeStamp=Start timestamp observe.common.SetLonglineLogbookDto.homeId=Home id observe.common.SetLonglineLogbookDto.lightsticksColor=Lightsticks color -observe.common.SetLonglineLogbookDto.lightsticksPerBasketCount=lightsticks per basket count observe.common.SetLonglineLogbookDto.lightsticksType=Lightsticks type observe.common.SetLonglineLogbookDto.lineType=Line type observe.common.SetLonglineLogbookDto.maxDepthTargeted=Max depth targeted (m) @@ -275,6 +274,7 @@ observe.common.SetLonglineLogbookDto.swivelWeight=swivel weight (kg) observe.common.SetLonglineLogbookDto.timeBetweenHooks=time between hooks observe.common.SetLonglineLogbookDto.totalBasketsCount=Total baskets count observe.common.SetLonglineLogbookDto.totalHooksCount=Total hooks count +observe.common.SetLonglineLogbookDto.totalLightsticksCount=Total number of lightsticks observe.common.SetLonglineLogbookDto.totalSectionsCount=Total sections count observe.common.SetLonglineLogbookGlobalCompositionDto.baitsComposition=Baits composition observe.common.SetLonglineLogbookGlobalCompositionDto.baitsCompositionProportionSum=Baits composition proportion sum @@ -766,6 +766,7 @@ observe.validation.setLongline.bound.swivelWeight=Swivel weight must be bound be observe.validation.setLongline.bound.timeBetweenHooks=Time between hooks must be bound between %s and %s. observe.validation.setLongline.bound.totalBasketsCount=Total baskets count must be bound between %s and %s. observe.validation.setLongline.bound.totalHooksCount=Total hooks count must be bound between %s and %s. +observe.validation.setLongline.bound.totalLightsticksCount=Total number of lightsticks must be bound between %s and %s. observe.validation.setLongline.bound.totalSectionsCount=must be bound between %s and %s. observe.validation.setLongline.branchlinesComposition.uniqueKey=Tuple (topType/type/size) must be unique. observe.validation.setLongline.desactivated.lightsticksColor=Selected lightstick color is disabled. ===================================== validation/src/main/resources/i18n/validation_es_ES.properties ===================================== @@ -256,7 +256,6 @@ observe.common.SetLonglineLogbookDto.haulingStartQuadrant=Arrastre Quadrant observe.common.SetLonglineLogbookDto.haulingStartTimeStamp=Timestamp del inicio observe.common.SetLonglineLogbookDto.homeId=Id de negocio observe.common.SetLonglineLogbookDto.lightsticksColor=Color de barrita de luz -observe.common.SetLonglineLogbookDto.lightsticksPerBasketCount=Número de barrita de luz por cesta observe.common.SetLonglineLogbookDto.lightsticksType=Tipo de barrita de luz observe.common.SetLonglineLogbookDto.lineType=Tipo de línea observe.common.SetLonglineLogbookDto.maxDepthTargeted=Profundidad máxima deseada @@ -277,6 +276,7 @@ observe.common.SetLonglineLogbookDto.swivelWeight=Peso de el destorcedor (kg) observe.common.SetLonglineLogbookDto.timeBetweenHooks=Temps entre anzuelos (s) observe.common.SetLonglineLogbookDto.totalBasketsCount=Número total de baskets observe.common.SetLonglineLogbookDto.totalHooksCount=Número total d'arponcillos +observe.common.SetLonglineLogbookDto.totalLightsticksCount=Número total de barras de luz observe.common.SetLonglineLogbookDto.totalSectionsCount=Número total de secciones observe.common.SetLonglineLogbookGlobalCompositionDto.baitsComposition=Cebo observe.common.SetLonglineLogbookGlobalCompositionDto.baitsCompositionProportionSum=Suma de los proporciónes de cebo (%) @@ -768,6 +768,7 @@ observe.validation.setLongline.bound.swivelWeight=El peso destorcedor debe estar observe.validation.setLongline.bound.timeBetweenHooks=El tiempo entre avanzuelos debe estar comprendido entre %1$s y %2$s. observe.validation.setLongline.bound.totalBasketsCount=El número total de cestas debe estar comprendido entre %1$s y %2$s. observe.validation.setLongline.bound.totalHooksCount=El número total de avanzuelos debe estar comprendido entre %1$s y %2$s. +observe.validation.setLongline.bound.totalLightsticksCount=El total de barras de luz debe estar comprendido entre %1$s y %2$s. observe.validation.setLongline.bound.totalSectionsCount=El número total de secciones debe estar comprendido entre %1$s y %2$s. observe.validation.setLongline.branchlinesComposition.uniqueKey=La tupla (tipo alto/tipo bajo/tamaño) debe ser única, la tupa ya está utilizada. observe.validation.setLongline.desactivated.lightsticksColor=El color de la barrita de luz seleccionado está desactivado. ===================================== validation/src/main/resources/i18n/validation_fr_FR.properties ===================================== @@ -254,7 +254,6 @@ observe.common.SetLonglineLogbookDto.haulingStartQuadrant=Quadrant de début de observe.common.SetLonglineLogbookDto.haulingStartTimeStamp=Horodatage début observe.common.SetLonglineLogbookDto.homeId=Id métier observe.common.SetLonglineLogbookDto.lightsticksColor=Couleur de cyalumes -observe.common.SetLonglineLogbookDto.lightsticksPerBasketCount=Nombre de cyalumes par panier observe.common.SetLonglineLogbookDto.lightsticksType=Type de cyalumes observe.common.SetLonglineLogbookDto.lineType=Type de ligne observe.common.SetLonglineLogbookDto.maxDepthTargeted=Profondeur maximum ciblée @@ -275,6 +274,7 @@ observe.common.SetLonglineLogbookDto.swivelWeight=Poids de l'émerillon (kg) observe.common.SetLonglineLogbookDto.timeBetweenHooks=Temps entre hameçons (s) observe.common.SetLonglineLogbookDto.totalBasketsCount=Nombre total de paniers observe.common.SetLonglineLogbookDto.totalHooksCount=Nombre total d'avançons +observe.common.SetLonglineLogbookDto.totalLightsticksCount=Nombre total de cyalumes observe.common.SetLonglineLogbookDto.totalSectionsCount=Nombre total de sections observe.common.SetLonglineLogbookGlobalCompositionDto.baitsComposition=Appâts observe.common.SetLonglineLogbookGlobalCompositionDto.baitsCompositionProportionSum=Somme des proportions d'appâts (%) @@ -766,6 +766,7 @@ observe.validation.setLongline.bound.swivelWeight=Le poids émerillon doit être observe.validation.setLongline.bound.timeBetweenHooks=Le temps entre hameçons doit être compris entre %1$s et %2$s. observe.validation.setLongline.bound.totalBasketsCount=Le nombre total de paniers doit être compris entre %1$s et %2$s. observe.validation.setLongline.bound.totalHooksCount=Le nombre total d'hameçons doit être compris entre %1$s et %2$s. +observe.validation.setLongline.bound.totalLightsticksCount=Le nombre total de cyalumes doit être compris entre %1$s et %2$s. observe.validation.setLongline.bound.totalSectionsCount=Le nombre total de sections doit être compris entre %1$s et %2$s. observe.validation.setLongline.branchlinesComposition.uniqueKey=Le tuple (type haut/type bas/taille) doit être unique observe.validation.setLongline.desactivated.lightsticksColor=La couleur de cyalume sélectionné est désactivé. View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/60ebe3c43dc1e0ebbf4471400988... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/commit/60ebe3c43dc1e0ebbf4471400988... You're receiving this email because of your account on gitlab.com.