Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 43554699 by Tony Chemit at 2023-07-06T09:45:08+02:00 chiffrage azti 2023 v4 - - - - - c9a15077 by Tony Chemit at 2023-07-06T12:13:25+02:00 Remove FIXME (JAXX 3.0.23 fix it) - - - - - b738487f by Tony Chemit at 2023-07-12T17:30:22+02:00 update pom - - - - - 9d954457 by Tony Chemit at 2023-07-12T17:30:22+02:00 Problème d'accès aux fonctions postgis - Closes #2757 - - - - - 5e6c417f by Tony Chemit at 2023-07-12T17:30:22+02:00 Amélioration du feedback en mode serveur - Closes #2758 - - - - - c228c1e4 by Tony Chemit at 2023-07-12T17:30:22+02:00 Sur le tableau d'affichage des lots de marché local, afficher le champ date - Closes #2753 - - - - - 07cd622b by Tony Chemit at 2023-07-12T17:30:22+02:00 L'action voir les utilisations du référentiel ne doit pas être accessible si l'utilisateur ne peut pas voir les données - Closes #2759 - - - - - 9d9ea87d by Tony Chemit at 2023-07-12T17:45:00+02:00 Sur l'UI référentiel Conditionnement, le champ poids moyen n'est pas visible - Closes #2752 - - - - - 6fbc4793 by Tony Chemit at 2023-07-12T19:03:20+02:00 Séquence du focus sur PS / Logbook / Activité - Closes #2747 - - - - - 24 changed files: - client/core/src/main/java/fr/ird/observe/client/datasource/api/action/FeedBackBuilderModel.java - client/core/src/main/java/fr/ird/observe/client/datasource/api/action/TechnicalErrorFeedBackBuilderModel.java - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUI.jcss - client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ShowUsagesReferential.java - client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter - client/datasource/editor/ps/src/main/i18n/getters/navigation.getter - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jaxx - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jcss - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUIHandler.java - client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/referential/localmarket/PackagingUI.jaxx - client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_0_create-postgis-functions.sql - client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_1_create-postgis-referential.sql - client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_2_create-postgis-ps.sql - client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_3_create-postgis-ll.sql - core/api/dto-decoration/src/main/i18n/getters/labels.getter - 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 - doc/specs/azti-2023/observe-azti-2023.md - model/src/main/models/Observe/dto/class/containerChildDataDtoProperties.properties - pom.xml - toolkit/api-datasource/src/main/java/fr/ird/observe/datasource/security/WithPermission.java - toolkit/api/src/main/java/fr/ird/observe/dto/ObserveUtil.java - toolkit/persistence/src/main/java/org/nuiton/topia/persistence/security/SecurityScriptHelper.java Changes: ===================================== client/core/src/main/java/fr/ird/observe/client/datasource/api/action/FeedBackBuilderModel.java ===================================== @@ -24,6 +24,8 @@ package fr.ird.observe.client.datasource.api.action; import fr.ird.observe.client.configuration.ClientConfig; import fr.ird.observe.client.util.UIHelper; +import fr.ird.observe.dto.ObserveUtil; +import io.ultreia.java4all.http.HResponseErrorException; import io.ultreia.java4all.i18n.I18n; import org.nuiton.jaxx.runtime.context.JAXXContextEntryDef; import org.nuiton.jaxx.runtime.context.JAXXInitialContext; @@ -149,8 +151,15 @@ public abstract class FeedBackBuilderModel { public String getErrorStack() { StringWriter w = new StringWriter(); + Exception error = getError(); try (PrintWriter writer = new PrintWriter(w)) { - getError().printStackTrace(writer); + error.printStackTrace(writer); + } + if (error instanceof HResponseErrorException) { + w.append("\n-------------------------------------------------------------------------------------------\n"); + String prettyFormat = ObserveUtil.toPrettyFormat(((HResponseErrorException) error).getError().getMessage()); + w.append(prettyFormat); + w.append("\n-------------------------------------------------------------------------------------------\n"); } return w.toString(); } ===================================== client/core/src/main/java/fr/ird/observe/client/datasource/api/action/TechnicalErrorFeedBackBuilderModel.java ===================================== @@ -23,8 +23,10 @@ package fr.ird.observe.client.datasource.api.action; */ import fr.ird.observe.client.configuration.ClientConfig; +import fr.ird.observe.dto.ObserveUtil; import fr.ird.observe.dto.ProgressionModel; import io.ultreia.java4all.application.template.spi.GenerateTemplate; +import io.ultreia.java4all.http.HResponseErrorException; import io.ultreia.java4all.i18n.I18n; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -71,7 +73,14 @@ public class TechnicalErrorFeedBackBuilderModel extends FeedBackBuilderModel { ActionContext context = new ActionContext(new ProgressionModel(), config); TechnicalActionStep step = new TechnicalActionStep(context, false, true); step.setOutputError(error); - log.error("A technical error report", error); + StringBuilder message = new StringBuilder("A technical error report"); + if (error instanceof HResponseErrorException) { + message.append("\n-------------------------------------------------------------------------------------------\n"); + String prettyFormat = ObserveUtil.toPrettyFormat(((HResponseErrorException) error).getError().getMessage()); + message.append(prettyFormat); + message.append("\n-------------------------------------------------------------------------------------------\n"); + } + log.error(message.toString(), error); step.setOutputState(ActionStepOutputState.FAILED); return step; } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/ContentReferentialUI.jcss ===================================== @@ -98,10 +98,6 @@ JLabel { enabled:{!states.isCreatingMode() && (states.isEditing() || states.isSelectedBean())}; } -#showUsages { - enabled:{showTechnicalInformations.isEnabled()}; -} - #showUniqueKeys { enabled:{showTechnicalInformations.isEnabled()}; } ===================================== client/datasource/editor/api/src/main/java/fr/ird/observe/client/datasource/editor/api/content/referential/actions/ShowUsagesReferential.java ===================================== @@ -22,10 +22,12 @@ package fr.ird.observe.client.datasource.editor.api.content.referential.actions; * #L% */ +import fr.ird.observe.client.datasource.api.ObserveSwingDataSource; import fr.ird.observe.client.datasource.editor.api.ObserveKeyStrokesEditorApi; import fr.ird.observe.client.datasource.editor.api.content.actions.ConfigureMenuAction; import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUI; import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModel; +import fr.ird.observe.client.datasource.editor.api.content.referential.ContentReferentialUIModelStates; import fr.ird.observe.client.datasource.usage.UsageForDisplayUI; import fr.ird.observe.client.datasource.usage.UsagesGetter; import fr.ird.observe.decoration.DecoratorService; @@ -57,6 +59,11 @@ public final class ShowUsagesReferential<D extends ReferentialDto, R extends Ref public static <D extends ReferentialDto, R extends ReferentialDtoReference, U extends ContentReferentialUI<D, R, U>> void installAction(U ui) { ShowUsagesReferential<D, R, U> action = new ShowUsagesReferential<>(ui.getModel().getScope().getMainType()); init(ui, ui.getShowUsages(), action); + ui.getModel().getStates().addPropertyChangeListener(ContentReferentialUIModelStates.PROPERTY_SELECTED_BEAN_REFERENCE, evt -> { + ReferentialDtoReference newValue = (ReferentialDtoReference) evt.getNewValue(); + ObserveSwingDataSource mainDataSource = ui.getModel().getDataSourcesManager().getMainDataSource(); + action.setEnabled(newValue != null && (mainDataSource.isLocal() || mainDataSource.canReadAll())); + }); } public ShowUsagesReferential(Class<D> dataType) { ===================================== client/datasource/editor/ps/src/main/i18n/getters/jaxx.getter ===================================== @@ -268,5 +268,6 @@ observe.referential.ps.localmarket.Buyer.email observe.referential.ps.localmarket.Buyer.phone observe.referential.ps.localmarket.Packaging.batchComposition observe.referential.ps.localmarket.Packaging.batchWeightType +observe.referential.ps.localmarket.Packaging.meanWeight observe.ui.view.form observe.ui.view.message ===================================== client/datasource/editor/ps/src/main/i18n/getters/navigation.getter ===================================== @@ -67,6 +67,8 @@ observe.data.ps.localmarket.Batch.action.save observe.data.ps.localmarket.Batch.action.save.tip observe.data.ps.localmarket.Batch.count observe.data.ps.localmarket.Batch.count.short +observe.data.ps.localmarket.Batch.date +observe.data.ps.localmarket.Batch.date.short observe.data.ps.localmarket.Batch.title observe.data.ps.localmarket.Batch.type observe.data.ps.localmarket.Batch.weight ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jaxx ===================================== @@ -19,7 +19,8 @@ --> <fr.ird.observe.client.datasource.editor.api.content.data.open.ContentOpenableUI - beanScope="bean" i18n="fr.ird.observe.dto.data.ps.logbook.ActivityDto" superGenericType='ActivityDto, ActivityUI'> + beanScope="bean" i18n="fr.ird.observe.dto.data.ps.logbook.ActivityDto" + superGenericType='ActivityDto, ActivityUI'> <import> fr.ird.observe.dto.data.ps.logbook.ActivityDto @@ -70,226 +71,230 @@ </BeanValidator> <JPanel id="contentBody" layout='{new BorderLayout()}'> - <Table insets="0" fill="both" constraints='BorderLayout.CENTER'> - <row> - <cell anchor="north" weightx="1"> - <JTabbedPane id='mainTabbedPane'> - <tab id='generalTab' i18nProperty=""> - <Table fill="both" anchor="north"> + <JTabbedPane id='mainTabbedPane' constraints='BorderLayout.NORTH'> + <tab id='generalTab' i18nProperty=""> + <Table fill="both" anchor="north"> + <row> + <cell columns="2"> + <Table fill="both"> + <row> + <cell> + <JLabel styleClass="skipI18n"/> + </cell> + </row> <row> <cell anchor='west'> <JLabel id='numberLabel'/> </cell> - <cell anchor="east"> + <cell anchor="east" weightx="1"> <NumberEditor id='number' styleClass="int6"/> </cell> - <cell rows="2" fill="both" columns="2" weightx="1"> - <JPanel layout="{new BorderLayout()}"> - <JLabel id='coordinateLabel' constraints='BorderLayout.NORTH' styleClass="center"/> - <CoordinatesEditor id='coordinate' constraints='BorderLayout.CENTER'/> - </JPanel> - </cell> </row> <row> <cell columns="2"> <TimeEditor id='time' styleClass="i18n"/> </cell> </row> + </Table> + </cell> + <cell fill="both" columns="2" weightx="1"> + <JPanel layout="{new BorderLayout()}"> + <JLabel id='coordinateLabel' constraints='BorderLayout.NORTH' styleClass="center"/> + <CoordinatesEditor id='coordinate' constraints='BorderLayout.CENTER'/> + </JPanel> + </cell> + </row> + <row> + <cell anchor='west' columns="4"> + <JPanel layout="{new GridLayout(0, 1)}"> + <JLabel id='vesselActivityInformation' styleClass="skipI18n information"/> + <JLabel id='vesselActivityInformation2' styleClass="skipI18n information"/> + </JPanel> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='vesselActivityLabel'/> + </cell> + <cell anchor='east' columns="3"> + <FilterableComboBox id='vesselActivity' genericType='VesselActivityReference'/> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='fpaZoneLabel'/> + </cell> + <cell columns="3"> + <FilterableComboBox id='fpaZone' genericType='FpaZoneReference'/> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='originalDataModifiedLabel'/> + </cell> + <cell anchor='west'> + <BeanCheckBox id='originalDataModified' styleClass="skipI18n"/> + </cell> + <cell anchor='center' fill="both" rows="2" columns="2"> + <JPanel layout="{new BorderLayout()}"> + <JLabel id='coordinateOriginalLabel' constraints='BorderLayout.NORTH' styleClass="center"/> + <JButton id='copyFirstCoordinate'/> + <CoordinatesEditor id='coordinateOriginal' constraints='BorderLayout.CENTER'/> + </JPanel> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='vmsDivergentLabel'/> + </cell> + <cell anchor='west'> + <BeanCheckBox id='vmsDivergent' styleClass="skipI18n"/> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='dataQualityLabel'/> + </cell> + <cell columns="3"> + <FilterableComboBox id='dataQuality' genericType='DataQualityReference'/> + </cell> + </row> + <row> + <cell> + <JLabel id='informationSourceLabel'/> + </cell> + <cell columns="3"> + <FilterableComboBox id='informationSource' genericType='InformationSourceReference'/> + </cell> + </row> + <row> + <cell anchor='west'> + <JLabel id='relatedObservedActivityLabel'/> + </cell> + <cell columns="3"> + <FilterableComboBox id='relatedObservedActivity' genericType='fr.ird.observe.dto.data.ps.observation.ActivityReference'/> + </cell> + </row> + <row> + <cell columns="4"> + <BigTextEditor id="comment"/> + </cell> + </row> + </Table> + </tab> + <tab id='measurementsTab' i18nProperty=""> + <Table insets='0' weightx="1" weighty="1"> + <row> + <cell fill="both"> + <Table fill="both" id="physicalMeasurements"> <row> - <cell anchor='west' columns="4"> - <JPanel layout="{new GridLayout(0, 1)}"> - <JLabel id='vesselActivityInformation' styleClass="skipI18n information"/> - <JLabel id='vesselActivityInformation2' styleClass="skipI18n information"/> - </JPanel> + <cell anchor='west'> + <JLabel id='seaSurfaceTemperatureLabel'/> + </cell> + <cell anchor='east' weightx="1"> + <TemperatureEditor id='seaSurfaceTemperature'/> </cell> </row> <row> - <cell anchor='west'> - <JLabel id='vesselActivityLabel'/> + <cell> + <JLabel id='windLabel'/> </cell> - <cell anchor='east' columns="3"> - <FilterableComboBox id='vesselActivity' genericType='VesselActivityReference'/> + <cell> + <FilterableComboBox id='wind' genericType='WindReference'/> </cell> </row> <row> - <cell anchor='west'> - <JLabel id='fpaZoneLabel'/> + <cell> + <JLabel id='windDirectionLabel'/> </cell> - <cell columns="3"> - <FilterableComboBox id='fpaZone' genericType='FpaZoneReference'/> + <cell> + <NumberEditor id='windDirection' styleClass="int6"/> </cell> </row> <row> - <cell anchor='west'> - <JLabel id='originalDataModifiedLabel'/> - </cell> - <cell anchor='west'> - <BeanCheckBox id='originalDataModified' styleClass="skipI18n"/> + <cell> + <JLabel id='currentSpeedLabel'/> </cell> - <cell anchor='center' fill="both" rows="2" columns="2"> - <JPanel layout="{new BorderLayout()}"> - <JLabel id='coordinateOriginalLabel' constraints='BorderLayout.NORTH' styleClass="center"/> - <JButton id='copyFirstCoordinate'/> - <CoordinatesEditor id='coordinateOriginal' constraints='BorderLayout.CENTER'/> - </JPanel> + <cell> + <NumberEditor id='currentSpeed' styleClass="float1"/> </cell> </row> <row> - <cell anchor='west'> - <JLabel id='vmsDivergentLabel'/> + <cell> + <JLabel id='currentDirectionLabel'/> </cell> - <cell anchor='west'> - <BeanCheckBox id='vmsDivergent' styleClass="skipI18n"/> + <cell> + <NumberEditor id='currentDirection' styleClass="int6"/> </cell> </row> + </Table> + </cell> + </row> + <row> + <cell fill="both"> + <Table fill="both" id="setMeasurements"> <row> <cell anchor='west'> - <JLabel id='dataQualityLabel'/> + <JLabel id='reasonForNoFishingLabel'/> </cell> - <cell columns="3"> - <FilterableComboBox id='dataQuality' genericType='DataQualityReference'/> + <cell anchor='east'> + <FilterableComboBox id='reasonForNoFishing' genericType='ReasonForNoFishingReference' styleClass="setEnabled"/> </cell> </row> <row> - <cell> - <JLabel id='informationSourceLabel'/> + <cell anchor='west'> + <JLabel id='setSuccessStatusLabel'/> </cell> - <cell columns="3"> - <FilterableComboBox id='informationSource' genericType='InformationSourceReference'/> + <cell anchor='east'> + <FilterableComboBox id='setSuccessStatus' genericType='SetSuccessStatusReference' styleClass="reasonForNoFishingNotFilled"/> </cell> </row> <row> <cell anchor='west'> - <JLabel id='relatedObservedActivityLabel'/> + <JLabel id='reasonForNullSetLabel'/> </cell> - <cell columns="3"> - <FilterableComboBox id='relatedObservedActivity' genericType='fr.ird.observe.dto.data.ps.observation.ActivityReference'/> + <cell anchor='east' fill='both'> + <FilterableComboBox id='reasonForNullSet' genericType='ReasonForNullSetReference'/> </cell> </row> - </Table> - </tab> - <tab id='measurementsTab' i18nProperty=""> - <Table insets='0' weightx="1" weighty="1"> <row> - <cell fill="both"> - <Table fill="both" id="physicalMeasurements"> - <row> - <cell anchor='west'> - <JLabel id='seaSurfaceTemperatureLabel'/> - </cell> - <cell anchor='east' weightx="1"> - <TemperatureEditor id='seaSurfaceTemperature'/> - </cell> - </row> - <row> - <cell> - <JLabel id='windLabel'/> - </cell> - <cell> - <FilterableComboBox id='wind' genericType='WindReference'/> - </cell> - </row> - <row> - <cell> - <JLabel id='windDirectionLabel'/> - </cell> - <cell> - <NumberEditor id='windDirection' styleClass="int6"/> - </cell> - </row> - <row> - <cell> - <JLabel id='currentSpeedLabel'/> - </cell> - <cell> - <NumberEditor id='currentSpeed' styleClass="float1"/> - </cell> - </row> - <row> - <cell> - <JLabel id='currentDirectionLabel'/> - </cell> - <cell> - <NumberEditor id='currentDirection' styleClass="int6"/> - </cell> - </row> - </Table> + <cell anchor='west'> + <JLabel id='schoolTypeLabel'/> + </cell> + <cell anchor='east' weightx="1"> + <FilterableComboBox id='schoolType' genericType='SchoolTypeReference' styleClass="reasonForNoFishingNotFilled"/> </cell> </row> <row> - <cell fill="both"> - <Table fill="both" id="setMeasurements"> - <row> - <cell anchor='west'> - <JLabel id='reasonForNoFishingLabel'/> - </cell> - <cell anchor='east'> - <FilterableComboBox id='reasonForNoFishing' genericType='ReasonForNoFishingReference' styleClass="setEnabled"/> - </cell> - </row> - <row> - <cell anchor='west'> - <JLabel id='setSuccessStatusLabel'/> - </cell> - <cell anchor='east'> - <FilterableComboBox id='setSuccessStatus' genericType='SetSuccessStatusReference' styleClass="reasonForNoFishingNotFilled"/> - </cell> - </row> - <row> - <cell anchor='west'> - <JLabel id='reasonForNullSetLabel'/> - </cell> - <cell anchor='east' fill='both'> - <FilterableComboBox id='reasonForNullSet' genericType='ReasonForNullSetReference'/> - </cell> - </row> - <row> - <cell anchor='west'> - <JLabel id='schoolTypeLabel'/> - </cell> - <cell anchor='east' weightx="1"> - <FilterableComboBox id='schoolType' genericType='SchoolTypeReference' styleClass="reasonForNoFishingNotFilled"/> - </cell> - </row> - <row> - <cell anchor='west'> - <JLabel id='setCountLabel'/> - </cell> - <cell anchor='east' fill="both"> - <NumberEditor id='setCount' styleClass="int6 reasonForNoFishingNotFilled"/> - </cell> - </row> - <row> - <cell> - <JLabel id='totalWeightLabel'/> - </cell> - <cell> - <NumberEditor id='totalWeight' styleClass="float3 reasonForNoFishingNotFilled"/> - </cell> - </row> - </Table> + <cell anchor='west'> + <JLabel id='setCountLabel'/> + </cell> + <cell anchor='east' fill="both"> + <NumberEditor id='setCount' styleClass="int6 reasonForNoFishingNotFilled"/> </cell> </row> <row> - <cell weighty="1"> - <JLabel styleClass="skipI18n"/> + <cell> + <JLabel id='totalWeightLabel'/> + </cell> + <cell> + <NumberEditor id='totalWeight' styleClass="float3 reasonForNoFishingNotFilled"/> </cell> </row> </Table> - - </tab> - <tab id="observedSystemTab" i18nProperty=""> - <DoubleList id='observedSystem' genericType='ObservedSystemReference'/> - </tab> - </JTabbedPane> - </cell> - </row> - <row> - <cell fill="both" weighty="1"> - <BigTextEditor id="comment"/> - </cell> - </row> - </Table> + </cell> + </row> + <row> + <cell weighty="1"> + <JLabel styleClass="skipI18n"/> + </cell> + </row> + </Table> + </tab> + <tab id="observedSystemTab" i18nProperty=""> + <DoubleList id='observedSystem' genericType='ObservedSystemReference'/> + </tab> + </JTabbedPane> </JPanel> <JMenuItem id='addSet'/> ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUI.jcss ===================================== @@ -58,6 +58,10 @@ border:{new TitledBorder(t("observe.data.ps.logbook.Activity.setMeasurements") + " ")}; } +#copyFirstCoordinate { + focusable:false; +} + .setEnabled { enabled:{states.isSetEnabled()}; } ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/data/logbook/ActivityUIHandler.java ===================================== @@ -100,16 +100,10 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { ActivityUI ui = getUi(); - ActivityDto bean = getModel().getStates().getBean(); if (Objects.equals(true, newValue)) { // original data modified ui.getCoordinateOriginal().setEnabled(true); - //FIXME In jaxx should be done by previous statement - ui.getCoordinateOriginal().getGlobalResetButton().setEnabled(true); - ui.getCoordinateOriginal().getDmdFormat().setEnabled(true); - ui.getCoordinateOriginal().getDmsFormat().setEnabled(true); - ui.getCoordinateOriginal().getDdFormat().setEnabled(true); ui.getCopyFirstCoordinate().setEnabled(true); } else { @@ -117,11 +111,6 @@ class ActivityUIHandler extends GeneratedActivityUIHandler { // original data not modified ui.getCoordinateOriginal().getGlobalResetButton().doClick(); ui.getCoordinateOriginal().setEnabled(false); - //FIXME In jaxx should be done by previous statement - ui.getCoordinateOriginal().getGlobalResetButton().setEnabled(false); - ui.getCoordinateOriginal().getDmdFormat().setEnabled(false); - ui.getCoordinateOriginal().getDmsFormat().setEnabled(false); - ui.getCoordinateOriginal().getDdFormat().setEnabled(false); ui.getCopyFirstCoordinate().setEnabled(false); } } ===================================== client/datasource/editor/ps/src/main/java/fr/ird/observe/client/datasource/editor/ps/referential/localmarket/PackagingUI.jaxx ===================================== @@ -32,6 +32,7 @@ fr.ird.observe.dto.referential.common.HarbourReference org.nuiton.jaxx.widgets.datetime.DateEditor + org.nuiton.jaxx.widgets.number.NumberEditor org.nuiton.jaxx.widgets.text.NormalTextEditor io.ultreia.java4all.jaxx.widgets.combobox.BeanEnumEditor io.ultreia.java4all.jaxx.widgets.choice.BeanCheckBox @@ -69,6 +70,14 @@ <FilterableComboBox id='batchWeightType' genericType='BatchWeightTypeReference'/> </cell> </row> + <row> + <cell anchor='west'> + <JLabel id='meanWeightLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <NumberEditor id='meanWeight' styleClass="float4"/> + </cell> + </row> <row> <cell anchor='west'> <JLabel id='validityDateRangeLabel'/> ===================================== client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_0_create-postgis-functions.sql ===================================== @@ -41,7 +41,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - latitude % and longitude %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.latitude, NEW.longitude; - NEW.the_geom := ST_SetSRID(ST_MakePoint(NEW.longitude::double precision, NEW.latitude::double precision), 4326); + NEW.the_geom := public.ST_SetSRID(public.ST_MakePoint(NEW.longitude, NEW.latitude), 4326); RAISE NOTICE 'Computed for %.% % latitude % and longitude %, the_geom %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.latitude, NEW.longitude, NEW.the_geom; RETURN NEW; END @@ -69,7 +69,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - latitudeOriginal % and longitudeOriginal %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.latitudeOriginal, NEW.longitudeOriginal; - NEW.the_geom_original := ST_SetSRID(ST_MakePoint(NEW.longitudeOriginal::double precision, NEW.latitudeOriginal::double precision), 4326); + NEW.the_geom_original := public.ST_SetSRID(public.ST_MakePoint(NEW.longitudeOriginal, NEW.latitudeOriginal), 4326); RAISE NOTICE 'Computed for %.% % latitudeOriginal % and longitudeOriginal %, the_geom_original %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.latitudeOriginal, NEW.longitudeOriginal, NEW.the_geom_original; RETURN NEW; END @@ -98,7 +98,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - settingStartLatitude % and settingStartLongitude %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.settingStartLatitude, NEW.settingStartLongitude; - NEW.the_geom_settingStart := ST_SetSRID(ST_MakePoint(NEW.settingStartLongitude::double precision, NEW.settingStartLatitude::double precision), 4326); + NEW.the_geom_settingStart := public.ST_SetSRID(public.ST_MakePoint(NEW.settingStartLongitude, NEW.settingStartLatitude), 4326); RAISE NOTICE 'Computed for %.% % settingStartLatitude % and settingStartLongitude %, the_geom_settingStart %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.settingStartLatitude, NEW.settingStartLongitude, NEW.the_geom_settingStart; RETURN NEW; END @@ -126,7 +126,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - settingEndLatitude % and settingEndLongitude %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.settingEndLatitude, NEW.settingEndLongitude; - NEW.the_geom_settingEnd := ST_SetSRID(ST_MakePoint(NEW.settingEndLongitude::double precision, NEW.settingEndLatitude::double precision), 4326); + NEW.the_geom_settingEnd := public.ST_SetSRID(public.ST_MakePoint(NEW.settingEndLongitude, NEW.settingEndLatitude), 4326); RAISE NOTICE 'Computed for %.% % settingEndLatitude % and settingEndLongitude %, the_geom_settingEnd %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.settingEndLatitude, NEW.settingEndLongitude, NEW.the_geom_settingEnd; RETURN NEW; END @@ -154,7 +154,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - haulingStartLatitude % and haulingStartLongitude %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.haulingStartLatitude, NEW.haulingStartLongitude; - NEW.the_geom_haulingStart := ST_SetSRID(ST_MakePoint(NEW.haulingStartLongitude::double precision, NEW.haulingStartLatitude::double precision), 4326); + NEW.the_geom_haulingStart := public.ST_SetSRID(public.ST_MakePoint(NEW.haulingStartLongitude, NEW.haulingStartLatitude), 4326); RAISE NOTICE 'Computed for %.% % haulingStartLatitude % and haulingStartLongitude %, the_geom_haulingStart %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.haulingStartLatitude, NEW.haulingStartLongitude, NEW.the_geom_haulingStart; RETURN NEW; END @@ -182,7 +182,7 @@ BEGIN return NEW; END IF; RAISE NOTICE 'Will compute the_geom for %.% % - haulingEndLatitude % and haulingEndLongitude %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.haulingEndLatitude, NEW.haulingEndLongitude; - NEW.the_geom_haulingEnd := ST_SetSRID(ST_MakePoint(NEW.haulingEndLongitude::double precision, NEW.haulingEndLatitude::double precision), 4326); + NEW.the_geom_haulingEnd := public.ST_SetSRID(public.ST_MakePoint(NEW.haulingEndLongitude, NEW.haulingEndLatitude), 4326); RAISE NOTICE 'Computed for %.% % haulingEndLatitude % and haulingEndLongitude %, the_geom_haulingEnd %', TG_TABLE_SCHEMA, TG_TABLE_NAME, NEW.topiaId, NEW.haulingEndLatitude, NEW.haulingEndLongitude, NEW.the_geom_haulingEnd; RETURN NEW; END ===================================== client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_1_create-postgis-referential.sql ===================================== @@ -23,4 +23,4 @@ ALTER TABLE common.harbour ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_harbour_gist ON common.harbour USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_common_harbour_the_geom ON common.harbour; CREATE TRIGGER tr_sync_common_harbour_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON common.harbour FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE common.harbour SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision,latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE common.harbour SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude,latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ===================================== client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_2_create-postgis-ps.sql ===================================== @@ -24,29 +24,29 @@ ALTER TABLE ps_observation.activity ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ps_observation_activity_gist ON ps_observation.activity USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ps_observation_activity_the_geom ON ps_observation.activity; CREATE TRIGGER tr_sync_ps_observation_activity_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ps_observation.activity FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ps_observation.activity SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision,latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ps_observation.activity SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude,latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ALTER TABLE ps_observation.transmittingbuoy ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ps_observation_transmittingbuoy_gist ON ps_observation.TransmittingBuoy USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ps_observation_transmittingbuoy_the_geom ON ps_observation.TransmittingBuoy; CREATE TRIGGER tr_sync_ps_observation_transmittingbuoy_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ps_observation.TransmittingBuoy FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ps_observation.TransmittingBuoy SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision, latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ps_observation.TransmittingBuoy SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude, latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ALTER TABLE ps_logbook.activity ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ps_logbook_activity_gist ON ps_logbook.activity USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ps_logbook_activity_the_geom ON ps_logbook.activity; CREATE TRIGGER tr_sync_ps_logbook_activity_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ps_logbook.activity FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ps_logbook.activity SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision,latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ps_logbook.activity SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude,latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ALTER TABLE ps_logbook.activity ADD COLUMN the_geom_original geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ps_logbook_activity_original_gist ON ps_logbook.activity USING GIST (the_geom_original); DROP TRIGGER IF EXISTS tr_sync_ps_logbook_activity_the_geom_original ON ps_logbook.activity; CREATE TRIGGER tr_sync_ps_logbook_activity_the_geom_original BEFORE INSERT OR UPDATE OF latitudeOriginal, longitudeOriginal ON ps_logbook.activity FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_original(); -UPDATE ps_logbook.activity SET the_geom_original = ST_SetSRID(ST_MakePoint(latitudeOriginal::double precision, longitudeOriginal::double precision), 4326) WHERE latitudeOriginal IS NOT NULL AND longitudeOriginal IS NOT NULL AND the_geom_original IS NULL; +UPDATE ps_logbook.activity SET the_geom_original = public.ST_SetSRID(public.ST_MakePoint(latitudeOriginal, longitudeOriginal), 4326) WHERE latitudeOriginal IS NOT NULL AND longitudeOriginal IS NOT NULL AND the_geom_original IS NULL; ALTER TABLE ps_logbook.transmittingbuoy ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ps_logbook_transmittingbuoy_gist ON ps_logbook.TransmittingBuoy USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ps_logbook_transmittingbuoy_the_geom ON ps_logbook.TransmittingBuoy; CREATE TRIGGER tr_sync_ps_logbook_transmittingbuoy_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ps_logbook.TransmittingBuoy FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ps_logbook.TransmittingBuoy SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision, latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ps_logbook.TransmittingBuoy SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude, latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ===================================== client/runner/src/main/assembly/dist/scripts/postgresql/extra/01_3_create-postgis-ll.sql ===================================== @@ -24,68 +24,68 @@ ALTER TABLE ll_observation.activity ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ll_observation_activity_gist ON ll_observation.activity USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ll_observation_activity_the_geom ON ll_observation.activity; CREATE TRIGGER tr_sync_ll_observation_activity_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ll_observation.activity FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ll_observation.activity SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision, latitude::double precision), 4326) WHERE the_geom IS NULL; +UPDATE ll_observation.activity SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude, latitude), 4326) WHERE the_geom IS NULL; ALTER TABLE ll_observation.set ADD COLUMN the_geom_settingstart geometry(Point, 4326); -DROP INDEX IF EXISTS idx_ll_observation_set_gist_settingstart; -CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gist_settingstart ON ll_observation.set USING GIST (the_geom_settingstart); +DROP INDEX IF EXISTS idx_ll_observation_set_gipublic.ST_settingstart; +CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gipublic.ST_settingstart ON ll_observation.set USING GIST (the_geom_settingstart); DROP TRIGGER IF EXISTS tr_sync_ll_observation_set_the_geom_settingstart ON ll_observation.set; CREATE TRIGGER tr_sync_ll_observation_set_the_geom_settingstart BEFORE INSERT OR UPDATE OF settingStartLatitude, settingStartLongitude ON ll_observation.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_settingStart(); -UPDATE ll_observation.set SET the_geom_settingstart = ST_SetSRID(ST_MakePoint(settingStartLongitude::double precision, settingStartLatitude::double precision), 4326) WHERE the_geom_settingstart IS NULL; +UPDATE ll_observation.set SET the_geom_settingstart = public.ST_SetSRID(public.ST_MakePoint(settingStartLongitude, settingStartLatitude), 4326) WHERE the_geom_settingstart IS NULL; ALTER TABLE ll_observation.set ADD COLUMN the_geom_settingend geometry(Point, 4326); -DROP INDEX IF EXISTS idx_ll_observation_set_gist_settingend; -CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gist_settingend ON ll_observation.set USING GIST (the_geom_settingend); +DROP INDEX IF EXISTS idx_ll_observation_set_gipublic.ST_settingend; +CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gipublic.ST_settingend ON ll_observation.set USING GIST (the_geom_settingend); DROP TRIGGER IF EXISTS tr_sync_ll_observation_set_the_geom_settingend ON ll_observation.set; CREATE TRIGGER tr_sync_ll_observation_set_the_geom_settingend BEFORE INSERT OR UPDATE OF settingEndLatitude, settingEndLongitude ON ll_observation.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_settingEnd(); -UPDATE ll_observation.set SET the_geom_settingend = ST_SetSRID(ST_MakePoint(settingEndLongitude::double precision, settingEndLatitude::double precision), 4326) WHERE the_geom_settingend IS NULL; +UPDATE ll_observation.set SET the_geom_settingend = public.ST_SetSRID(public.ST_MakePoint(settingEndLongitude, settingEndLatitude), 4326) WHERE the_geom_settingend IS NULL; ALTER TABLE ll_observation.set ADD COLUMN the_geom_haulingstart geometry(Point, 4326); -DROP INDEX IF EXISTS idx_ll_observation_set_gist_haulingstart; -CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gist_haulingstart ON ll_observation.set USING GIST (the_geom_haulingstart); +DROP INDEX IF EXISTS idx_ll_observation_set_gipublic.ST_haulingstart; +CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gipublic.ST_haulingstart ON ll_observation.set USING GIST (the_geom_haulingstart); DROP TRIGGER IF EXISTS tr_sync_ll_observation_set_the_geom_haulingstart ON ll_observation.set; CREATE TRIGGER tr_sync_ll_observation_set_the_geom_haulingstart BEFORE INSERT OR UPDATE OF haulingStartLatitude, haulingStartLongitude ON ll_observation.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_haulingStart(); -UPDATE ll_observation.set SET the_geom_haulingstart = ST_SetSRID(ST_MakePoint(haulingStartLongitude::double precision, haulingStartLatitude::double precision), 4326) WHERE the_geom_haulingstart IS NULL; +UPDATE ll_observation.set SET the_geom_haulingstart = public.ST_SetSRID(public.ST_MakePoint(haulingStartLongitude, haulingStartLatitude), 4326) WHERE the_geom_haulingstart IS NULL; ALTER TABLE ll_observation.set ADD COLUMN the_geom_haulingend geometry(Point, 4326); -DROP INDEX IF EXISTS idx_ll_observation_set_gist_haulingend; -CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gist_haulingend ON ll_observation.set USING GIST (the_geom_haulingend); +DROP INDEX IF EXISTS idx_ll_observation_set_gipublic.ST_haulingend; +CREATE INDEX IF NOT EXISTS idx_ll_observation_set_gipublic.ST_haulingend ON ll_observation.set USING GIST (the_geom_haulingend); DROP TRIGGER IF EXISTS tr_sync_ll_observation_set_the_geom_haulingend ON ll_observation.set; CREATE TRIGGER tr_sync_ll_observation_set_the_geom_haulingend BEFORE INSERT OR UPDATE OF haulingEndLatitude, haulingEndLongitude ON ll_observation.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_haulingEnd(); -UPDATE ll_observation.set SET the_geom_haulingend = ST_SetSRID(ST_MakePoint(haulingEndLongitude::double precision, haulingEndLatitude::double precision), 4326) WHERE the_geom_haulingend IS NULL; +UPDATE ll_observation.set SET the_geom_haulingend = public.ST_SetSRID(public.ST_MakePoint(haulingEndLongitude, haulingEndLatitude), 4326) WHERE the_geom_haulingend IS NULL; ALTER TABLE ll_logbook.activity ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ll_logbook_activity_gist ON ll_logbook.activity USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ll_logbook_activity_the_geom ON ll_logbook.activity; CREATE TRIGGER tr_sync_ll_logbook_activity_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ll_logbook.activity FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ll_logbook.activity SET the_geom = ST_SetSRID(ST_MakePoint(longitude, latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ll_logbook.activity SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude, latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ALTER TABLE ll_logbook.set ADD COLUMN the_geom_settingstart geometry(Point, 4326); -CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gist_settingstart ON ll_logbook.set USING GIST (the_geom_settingstart); +CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gipublic.ST_settingstart ON ll_logbook.set USING GIST (the_geom_settingstart); DROP TRIGGER IF EXISTS tr_sync_ll_logbook_set_the_geom_settingstart ON ll_logbook.set; CREATE TRIGGER tr_sync_ll_logbook_set_the_geom_settingstart BEFORE INSERT OR UPDATE OF settingStartLatitude, settingStartLongitude ON ll_logbook.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_settingStart(); -UPDATE ll_logbook.set SET the_geom_settingstart = ST_SetSRID(ST_MakePoint(settingStartLongitude::double precision, settingStartLatitude::double precision), 4326) WHERE settingStartLongitude IS NOT NULL AND settingStartLatitude IS NOT NULL AND the_geom_settingstart IS NULL; +UPDATE ll_logbook.set SET the_geom_settingstart = public.ST_SetSRID(public.ST_MakePoint(settingStartLongitude, settingStartLatitude), 4326) WHERE settingStartLongitude IS NOT NULL AND settingStartLatitude IS NOT NULL AND the_geom_settingstart IS NULL; ALTER TABLE ll_logbook.set ADD COLUMN the_geom_settingend geometry(Point, 4326); -CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gist_settingend ON ll_logbook.set USING GIST (the_geom_settingend); +CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gipublic.ST_settingend ON ll_logbook.set USING GIST (the_geom_settingend); DROP TRIGGER IF EXISTS tr_sync_ll_logbook_set_the_geom_settingend ON ll_logbook.set; CREATE TRIGGER tr_sync_ll_logbook_set_the_geom_settingend BEFORE INSERT OR UPDATE OF settingEndLatitude, settingEndLongitude ON ll_logbook.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_settingEnd(); -UPDATE ll_logbook.set SET the_geom_settingend = ST_SetSRID(ST_MakePoint(settingEndLongitude::double precision, settingEndLatitude::double precision), 4326) WHERE settingEndLongitude IS NOT NULL AND settingEndLatitude IS NOT NULL AND the_geom_settingend IS NULL; +UPDATE ll_logbook.set SET the_geom_settingend = public.ST_SetSRID(public.ST_MakePoint(settingEndLongitude, settingEndLatitude), 4326) WHERE settingEndLongitude IS NOT NULL AND settingEndLatitude IS NOT NULL AND the_geom_settingend IS NULL; ALTER TABLE ll_logbook.set ADD COLUMN the_geom_haulingstart geometry(Point, 4326); -CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gist_haulingstart ON ll_logbook.set USING GIST (the_geom_haulingstart); +CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gipublic.ST_haulingstart ON ll_logbook.set USING GIST (the_geom_haulingstart); DROP TRIGGER IF EXISTS tr_sync_ll_logbook_set_the_geom_haulingstart ON ll_logbook.set; CREATE TRIGGER tr_sync_ll_logbook_set_the_geom_haulingstart BEFORE INSERT OR UPDATE OF haulingStartLatitude, haulingStartLongitude ON ll_logbook.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_haulingStart(); -UPDATE ll_logbook.set SET the_geom_haulingstart = ST_SetSRID(ST_MakePoint(haulingStartLongitude::double precision, haulingStartLatitude::double precision), 4326) WHERE haulingStartLongitude IS NOT NULL AND haulingStartLatitude IS NOT NULL AND the_geom_haulingstart IS NULL; +UPDATE ll_logbook.set SET the_geom_haulingstart = public.ST_SetSRID(public.ST_MakePoint(haulingStartLongitude, haulingStartLatitude), 4326) WHERE haulingStartLongitude IS NOT NULL AND haulingStartLatitude IS NOT NULL AND the_geom_haulingstart IS NULL; ALTER TABLE ll_logbook.set ADD COLUMN the_geom_haulingend geometry(Point, 4326); -CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gist_haulingend ON ll_logbook.set USING GIST (the_geom_haulingend); +CREATE INDEX IF NOT EXISTS idx_ll_logbook_set_gipublic.ST_haulingend ON ll_logbook.set USING GIST (the_geom_haulingend); DROP TRIGGER IF EXISTS tr_sync_ll_logbook_set_the_geom_haulingend ON ll_logbook.set; CREATE TRIGGER tr_sync_ll_logbook_set_the_geom_haulingend BEFORE INSERT OR UPDATE OF haulingEndLatitude, haulingEndLongitude ON ll_logbook.set FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_haulingEnd(); -UPDATE ll_logbook.set SET the_geom_haulingend = ST_SetSRID(ST_MakePoint(haulingEndLongitude::double precision, haulingEndLatitude::double precision), 4326) WHERE haulingEndLongitude IS NOT NULL AND haulingEndLatitude IS NOT NULL AND the_geom_haulingend IS NULL; +UPDATE ll_logbook.set SET the_geom_haulingend = public.ST_SetSRID(public.ST_MakePoint(haulingEndLongitude, haulingEndLatitude), 4326) WHERE haulingEndLongitude IS NOT NULL AND haulingEndLatitude IS NOT NULL AND the_geom_haulingend IS NULL; ALTER TABLE ll_landing.landing ADD COLUMN the_geom geometry(Point, 4326); CREATE INDEX IF NOT EXISTS idx_ll_landing_landing_gist ON ll_landing.landing USING GIST (the_geom); DROP TRIGGER IF EXISTS tr_sync_ll_landing_landing_the_geom ON ll_landing.landing; CREATE TRIGGER tr_sync_ll_landing_landing_the_geom BEFORE INSERT OR UPDATE OF latitude, longitude ON ll_landing.landing FOR EACH ROW EXECUTE PROCEDURE sync_the_geom_default(); -UPDATE ll_landing.landing SET the_geom = ST_SetSRID(ST_MakePoint(longitude::double precision, latitude::double precision), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; +UPDATE ll_landing.landing SET the_geom = public.ST_SetSRID(public.ST_MakePoint(longitude, latitude), 4326) WHERE latitude IS NOT NULL AND longitude IS NOT NULL AND the_geom IS NULL; ===================================== core/api/dto-decoration/src/main/i18n/getters/labels.getter ===================================== @@ -840,6 +840,7 @@ observe.data.ps.localmarket.Batch.buyer observe.data.ps.localmarket.Batch.count observe.data.ps.localmarket.Batch.count.short observe.data.ps.localmarket.Batch.date +observe.data.ps.localmarket.Batch.date.short observe.data.ps.localmarket.Batch.title observe.data.ps.localmarket.Batch.type observe.data.ps.localmarket.Batch.weight ===================================== core/services/i18n/src/main/i18n/translations/services_en_GB.properties ===================================== @@ -1004,6 +1004,7 @@ observe.data.ps.localmarket.Batch.count=Count observe.data.ps.localmarket.Batch.count.short=Count observe.data.ps.localmarket.Batch.count.validation.required=Count or weight must be filled (but not both). observe.data.ps.localmarket.Batch.date=Date +observe.data.ps.localmarket.Batch.date.short=Date observe.data.ps.localmarket.Batch.title=Batches observe.data.ps.localmarket.Batch.type=Batch observe.data.ps.localmarket.Batch.validation.date.after.currentPsCommonTrip.endDate=Date (%2$s) must be after trip end date (%1$s). ===================================== core/services/i18n/src/main/i18n/translations/services_es_ES.properties ===================================== @@ -1004,6 +1004,7 @@ observe.data.ps.localmarket.Batch.count=Count observe.data.ps.localmarket.Batch.count.short=Count observe.data.ps.localmarket.Batch.count.validation.required=TODO observe.data.ps.localmarket.Batch.date=Date +observe.data.ps.localmarket.Batch.date.short=Date observe.data.ps.localmarket.Batch.title=Local market Batches observe.data.ps.localmarket.Batch.type=Local market Batches observe.data.ps.localmarket.Batch.validation.date.after.currentPsCommonTrip.endDate=Date (%2$s) must be after trip end date (%1$s). \#TODO ===================================== core/services/i18n/src/main/i18n/translations/services_fr_FR.properties ===================================== @@ -1004,6 +1004,7 @@ observe.data.ps.localmarket.Batch.count=Nombre observe.data.ps.localmarket.Batch.count.short=Effectif observe.data.ps.localmarket.Batch.count.validation.required=Le nombre ou le poids doit être renseigné (mais pas les deux). observe.data.ps.localmarket.Batch.date=Date +observe.data.ps.localmarket.Batch.date.short=Date observe.data.ps.localmarket.Batch.title=Lots observe.data.ps.localmarket.Batch.type=Lot observe.data.ps.localmarket.Batch.validation.date.after.currentPsCommonTrip.endDate=La date (%2$s) doit être supérieure ou égale à la date de fin de marée (%1$s). ===================================== doc/specs/azti-2023/observe-azti-2023.md ===================================== @@ -1,7 +1,7 @@ # Introduction -* Ce document décrit notre réponse technique suite à la demande de développements complémentaires par l'AZTI et l'IRD. -* Rédigé le 29/06/2023 à Saint Cybardeaux (16170) +* Ce document décrit un chiffrage suite à la demande de développements complémentaires par l'AZTI et l'IRD. +* Rédigé le 06/07/2023 à Saint Cybardeaux (16170) * Auteur *Tony Chemit*, société *Ultreia.io* \newpage @@ -10,60 +10,65 @@ ## (2707) Faire évoluer l'UI équipement du bateau pour autoriser la gestion de listes de référence - * ajout d'un nouveau type **date** (1J) - * ajout du nouveau type **liste de choix** (1.5J) - * contraindre les caractéristiques d'équipement (common.gearcharacteristic) autorisées pour un équipement (common.gear) donné (3J) - * remplir les référentiels correctement via migration (3J) +* ajout d'un nouveau type **date** (1J) +* ajout du nouveau type **liste de choix** (1.5J) +* contraindre les caractéristiques d'équipement (common.gearcharacteristic) autorisées pour un équipement (common.gear) donné (3J) +* remplir les référentiels correctement via migration (3J) ## (2708) Ajout de deux nouveaux champs et listes déroulantes sur le formulaire bonnes pratiques de remise à l'eau - * ajout du nouveau référentiel Zone de manipulation (0.5J) - * ajout du champs Numéro de salabarde (0.5J) +* ajout du nouveau référentiel Zone de manipulation (0.5J) +* ajout du champs Numéro de salabarde (0.5J) ## (2215) Améliorer le rapport de validation - * ajout méta-données et configuration de la validation (0.5J) - * catégoriser des nouvelles informations permettant d'identifier les objets (2J) +* ajout méta-données et configuration de la validation (0.5J) +* catégoriser des nouvelles informations permettant d'identifier les objets (2J) ## (2449) Nouveaux flags allowSet et fpaZoneMode sur les types d'activités bateau - * ajout du flag **allowSet** et utilisation à tous les endroits propices (1J) - * ajout du flag **allowFpaZoneChange** (1J) +* ajout du flag **allowSet** et utilisation à tous les endroits propices (1J) +* ajout du flag **allowFpaZoneChange** (1J) ## (2497) Filtrage des devenirs pour les données observation et logbooks - * ajout des deux nouveaux flags **observation** et **logbook** (PS et LL) (0.5J) - * mise en place des valeurs associées via migration et utilisation sur les formulaires concernés (0.5J) +* ajout des deux nouveaux flags **observation** et **logbook** (PS et LL) (0.5J) +* mise en place des valeurs associées via migration et utilisation sur les formulaires concernés (0.5J) ## (2498) Filtrage des types d'activité bateau pour les données observation et logbooks - * ajout du nouveau flag (PS et LL) (1J) - * remplissage du référentiel et utilisation sur les deux formulaires (1J) +* ajout du nouveau flag (PS et LL) (1J) +* remplissage du référentiel et utilisation sur les deux formulaires (1J) ## (2706) Améliorer l'identification des enregistrements dans l'UI de validation batch - * ajouter les clefs métiers qui remontent jusqu'à la marée (2J) +* ajouter les clefs métiers qui remontent jusqu'à la marée (2J) La modification du rapport est traité dans un autre ticket. ## (2725) Contrôler la syntaxe des id balises par une expression régulière propre à chaque modèle de balise - * ajout du nouveau champs **regex** (0.5J) - * mise à jour du référentiel via migration (1.5J) - * mise en place de la validation via ce champs (1J) +* ajout du nouveau champs **regex** (0.5J) +* mise à jour du référentiel via migration (1.5J) +* mise en place de la validation via ce champs (1J) ## (2729) En PS / logbook / Activité, voir comment mieux gérer l'ajout d'une activité dont l'horaire précéde celui de la dernière activité saisie (souci lié au numéro d'activité auto incrémenté) - * ajout du champs **activitiesAcquisitionMode** au niveau de la marée (0.5J) - * positionnement de ce nouveau champs via migration embarqué et AVDTH (0.5J) - * mise en place du mode horaire (0.5J) - * mise en place du mode indexé (0.5J) +* ajout du champs **activitiesAcquisitionMode** au niveau de la marée (0.5J) +* positionnement de ce nouveau champs via migration embarqué et AVDTH (0.5J) +* mise en place du mode horaire (0.5J) +* mise en place du mode indexé (0.5J) ## (2740) En PS / logbook, ajouter 2 champs previousFpaZone et nextFpaZone - * ajout des deux nouveaux champs *previousFpaZone* et *nextFpaZone* (0.25J) - * renommage du champs *fpaZone* en *currentFpaZone* (0.25J) - * pilotage de ces champs via le drapeau sur vesselActivity (0.5J) +* ajout des deux nouveaux champs *previousFpaZone* et *nextFpaZone* (0.25J) +* renommage du champs *fpaZone* en *currentFpaZone* (0.25J) +* pilotage de ces champs via le drapeau sur vesselActivity (0.5J) + +## (2750) Effectuer un différentiel sur l'UI de synchro de marées + +* calcul du différentiel entre les deux sources de données (1J) +* adaptation de l'arbre de navigation pour n'afficher que les marées différentes (2J) # Chiffrage global @@ -81,7 +86,13 @@ La modification du rapport est traité dans un autre ticket. | (2725) Contrôler la syntaxe des id balises par une expression régulière propre à chaque modèle de balise | 3 | | (2729) En PS / logbook / Activité, voir comment mieux gérer l'ajout d'une activité dont l'horaire précéde celui de la dernière activité saisie (souci lié au numéro d'activité auto incrémenté) | 2 | | (2740) En PS / logbook, ajouter 2 champs previousFpaZone et nextFpaZone | 1 | -| Gestion de projet | 2.5 | +| (2750) Effectuer un différentiel sur l'UI de synchro de marées | 3 | +| Gestion de projet | 5 | +| Total | 33 | +| *Remises offertes* | | +| Gestion de projet | -2.5 | +| (2750) Effectuer un différentiel sur l'UI de synchro de marées | -3 | | Total | 27.5 | -Le prix total est de **14 850 €**. +* Prix total (sans remise) : **17 280€** +* Prix total (avec remise) : **14 850€** ===================================== model/src/main/models/Observe/dto/class/containerChildDataDtoProperties.properties ===================================== @@ -37,7 +37,7 @@ data.ll.observation.SensorUsed=sensorType,sensorBrand,sensorDataFormat,sensorSer data.ll.observation.Tdr=homeId,serialNo,sensorBrand,hasData data.ps.common.GearUseFeatures=gear,number,usedInTrip,comment data.ps.landing.Landing=species,weightCategory,weight,destination,fate,fateVessel -data.ps.localmarket.Batch=species,packaging,count,weight +data.ps.localmarket.Batch=species,packaging,count,weight,date data.ps.localmarket.SampleSpecies=species,sizeMeasureType,measuredCount,comment data.ps.logbook.Catch=species,weightCategory,speciesFate,well,weight,count,comment data.ps.logbook.SampleSpecies=subSampleNumber,species,sizeMeasureType,measuredCount,totalCount,startTime,endTime,comment ===================================== pom.xml ===================================== @@ -23,7 +23,7 @@ <parent> <groupId>io.ultreia.maven</groupId> <artifactId>pom</artifactId> - <version>2023.31</version> + <version>2023.33</version> </parent> <groupId>fr.ird.observe</groupId> <artifactId>ird-observe</artifactId> ===================================== toolkit/api-datasource/src/main/java/fr/ird/observe/datasource/security/WithPermission.java ===================================== @@ -41,6 +41,10 @@ public interface WithPermission { return canExecute(Permission.READ_REFERENTIAL); } + default boolean canReadAll() { + return canReadReferential() && canReadData(); + } + default String getReferentialPermissionLabel() { String result; if (canWriteReferential()) { ===================================== toolkit/api/src/main/java/fr/ird/observe/dto/ObserveUtil.java ===================================== @@ -22,6 +22,10 @@ package fr.ird.observe.dto; * #L% */ +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import fr.ird.observe.spi.module.BusinessModule; import fr.ird.observe.spi.module.BusinessSubModule; import io.ultreia.java4all.config.ApplicationConfig; @@ -248,5 +252,16 @@ public class ObserveUtil { return !isEmpty(o); } - + /** + * + * @param jsonString the json string in compact mode + * @return the gson in a pretty mode + */ + public static String toPrettyFormat(String jsonString) + { + JsonObject json = JsonParser.parseString(jsonString).getAsJsonObject(); + + Gson gson = new GsonBuilder().setPrettyPrinting().create(); + return gson.toJson(json); + } } ===================================== toolkit/persistence/src/main/java/org/nuiton/topia/persistence/security/SecurityScriptHelper.java ===================================== @@ -191,6 +191,9 @@ public class SecurityScriptHelper { protected void createSecurityScript(Path scriptPath, Set<DataSourceUserDto> users) throws IOException { Set<String> schemas = new LinkedHashSet<>(); MigrationServiceSqlHelper migrationServiceSqlHelper = MigrationServiceSqlHelper.CURRENT; + // We need to add this schema, postgis function are in it + // See https://gitlab.com/ultreiaio/ird-observe/-/issues/2757 + schemas.add("public"); schemas.add(migrationServiceSqlHelper.schemaName()); schemas.addAll(applicationContext.getSchemaNames()); Path blobIdsPath = scriptPath.getParent().resolve(scriptPath.toFile().getName().replace(".sql", ".blob-ids")); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/bb14f8ce4cd86e36bc322bf50... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/bb14f8ce4cd86e36bc322bf50... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)