Tony CHEMIT pushed to branch develop at ultreiaio / ird-t3 Commits: 455478ec by Tony CHEMIT at 2018-03-19T17:27:41Z [N0] Amélioration du calcul de RF1 pour les marées n'ayant pas de bons de débarquement (closes #283) - - - - - 15 changed files: - t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Action.java - t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Configuration.java - t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action.ftl - t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action_en.ftl - t3-web/src/main/java/fr/ird/t3/web/actions/T3ActionSupport.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0ConfigureAction.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0RunAction.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1ConfigureAction.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1RunAction.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2ConfigureAction.java - t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2RunAction.java - t3-web/src/main/resources/i18n/t3-web_en_GB.properties - t3-web/src/main/resources/i18n/t3-web_fr_FR.properties - t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1Config.jsp - t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1ConfigResume.jsp Changes: ===================================== t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Action.java ===================================== --- a/t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Action.java +++ b/t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Action.java @@ -273,7 +273,8 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati // means there is so species for this complete trip so rf1 = 1.0 rf1 = 1.0f; } else { - rf1 = computeRF1ForCompleteTrip(completeTrip, species); + boolean useLegacyBehaviourForTripWithoutLanding = getConfiguration().isUseLegacyBehaviourForTripWithoutLanding(); + rf1 = computeRF1ForCompleteTrip(useLegacyBehaviourForTripWithoutLanding, completeTrip, species); if (rf1 < minimumRate) { String warnMessage = l(locale, "t3.level0.computeRF1.warning.too.low.rf1", @@ -333,24 +334,29 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati decorate(completeTrip.getLandingTrip()), totalCatchWeightRF1, totalLandingWeight)); } - private float computeRF1ForCompleteTrip(Iterable<Trip> completeTrip, Collection<Species> speciesList) { + private float computeRF1ForCompleteTrip(boolean useLegacyBehaviourForTripWithoutLanding, CompleteTrip completeTrip, Collection<Species> speciesList) { // do the computation of rf1 for all trips of the complete trip float sumLanding = 0; float sumCatch = 0; float sumLocalMarket = 0; float sumLocalMarketDetailled = 0; + int tripWithoutLanding = 0; for (Trip trip : completeTrip) { String tripStr = decorate(trip, DecoratorService.WITH_ID); log.debug(String.format("Start count for trip %s", tripStr)); float elementaryLandingTotalWeight = trip.getElementaryLandingTotalWeight(speciesList); float elementaryCatchTotalWeight = trip.getElementaryCatchTotalWeight(speciesList); + boolean noLanding = elementaryLandingTotalWeight == 0; + if (noLanding) { + tripWithoutLanding++; + } if (elementaryCatchTotalWeight == 0 && elementaryLandingTotalWeight > 0) { // Add a warning, seems not possible to have no catches and landing : // the logBookAvailability flag should be setted to 0. addWarningMessage(l(locale, "t3.level0.computeRF1.warning.no.catches.but.some.landings", tripStr, elementaryLandingTotalWeight)); } - if (elementaryCatchTotalWeight > 0 && elementaryLandingTotalWeight == 0) { + if (elementaryCatchTotalWeight > 0 && noLanding) { // Special case : no landing: do not take account of the catch weight // in fact (see https://gitlab.com/ultreiaio/ird-t3/issues/283), we do not want to loose this catches //elementaryCatchTotalWeight = 0; @@ -372,7 +378,8 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati sumLocalMarketDetailled += localMarketTotalWeightDetailled; } float rf1 = 1; - if (sumCatch > 0) { + boolean computeRF1 = sumCatch > 0 && (useLegacyBehaviourForTripWithoutLanding || tripWithoutLanding == 0); + if (computeRF1) { rf1 = sumLanding / sumCatch; } log.debug(String.format("Computed rf1 %s", rf1)); ===================================== t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Configuration.java ===================================== --- a/t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Configuration.java +++ b/t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Configuration.java @@ -42,6 +42,8 @@ public class ComputeRF1Configuration extends AbstractLevel0Configuration { private float minimumRate; /** Maximum rf1 rate acceptable. */ private float maximumRate; + /** Flag to use or not legacy behaviour when you treat trips without landings. */ + private boolean useLegacyBehaviourForTripWithoutLanding; public ComputeRF1Configuration() { super(Level0Step.COMPUTE_RF1); @@ -62,4 +64,12 @@ public class ComputeRF1Configuration extends AbstractLevel0Configuration { public void setMaximumRate(float maximumRate) { this.maximumRate = maximumRate; } + + public boolean isUseLegacyBehaviourForTripWithoutLanding() { + return useLegacyBehaviourForTripWithoutLanding; + } + + public void setUseLegacyBehaviourForTripWithoutLanding(boolean useLegacyBehaviourForTripWithoutLanding) { + this.useLegacyBehaviourForTripWithoutLanding = useLegacyBehaviourForTripWithoutLanding; + } } ===================================== t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action.ftl ===================================== --- a/t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action.ftl +++ b/t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action.ftl @@ -33,6 +33,13 @@ Type de navire sélectionné : ${vesselSimpleType} Flotte sélectionnée : ${fleet} </#list> +Gestion des marées sans débarquement : +<#if !configuration.useLegacyBehaviourForTripWithoutLanding> +Attribuer RF1=1 sur les marées composées avec défaut de débarquement +<#else > +Calculer un RF1 sur les marées composées avec défaut de débarquement +</#if> + Indicateurs ----------- ===================================== t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action_en.ftl ===================================== --- a/t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action_en.ftl +++ b/t3-actions/src/main/resources/ftl/fr/ird/t3/actions/data/level0/ComputeRF1Action_en.ftl @@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #L% --> +<#--#TODO--> <#include "/ftl/header_en.ftl"/> Begin date: ${configuration.beginDate} @@ -33,6 +34,13 @@ Selected simple vessel type: ${vesselSimpleType} Selected fleet: ${fleet} </#list> +Trip without landing management: +<#if !configuration.useLegacyBehaviourForTripWithoutLanding> +Attribuer RF1=1 sur les marées composées avec défaut de débarquement +<#else > +Calculer un RF1 sur les marées composées avec défaut de débarquement +</#if> + Indicators ---------- ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/T3ActionSupport.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/T3ActionSupport.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/T3ActionSupport.java @@ -328,4 +328,11 @@ public class T3ActionSupport extends ActionSupport implements T3TopiaPersistence "false", t("t3.label.data.level1.configuration.useOnlyRfTot")); } + + protected ImmutableMap<String, String> createUseLegacyBehaviourForTripWithoutLandingOrNot() { + return ImmutableMap.of( + "false", t("t3.label.level0.configuration.rf1.useNewBehaviourForTripWithoutLanding"), + "true", t("t3.label.level0.configuration.rf1.useLegacyBehaviourForTripWithoutLanding")); + } + } ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0ConfigureAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0ConfigureAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0ConfigureAction.java @@ -8,12 +8,12 @@ * it under the terms of the GNU Affero 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 Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% @@ -25,18 +25,16 @@ import fr.ird.t3.entities.data.Trip; import fr.ird.t3.entities.data.TripTopiaDao; import fr.ird.t3.entities.reference.Country; import fr.ird.t3.entities.reference.CountryTopiaDao; -import fr.ird.t3.entities.reference.Vessel; import fr.ird.t3.entities.reference.VesselSimpleType; import fr.ird.t3.entities.reference.VesselSimpleTypeTopiaDao; -import fr.ird.t3.entities.reference.VesselTopiaDao; import fr.ird.t3.entities.type.T3Date; import fr.ird.t3.services.ioc.InjectDAO; import fr.ird.t3.services.ioc.InjectDecoratedBeans; import fr.ird.t3.web.actions.AbstractConfigureAction; -import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.nuiton.topia.persistence.TopiaException; + +import java.util.Map; /** * Abstract level 0 configuration action. @@ -48,34 +46,27 @@ public abstract class AbstractLevel0ConfigureAction<C extends AbstractLevel0Conf private static final long serialVersionUID = 1L; - /** Logger. */ - private static final Log log = - LogFactory.getLog(AbstractLevel0ConfigureAction.class); + private static final Log log = LogFactory.getLog(AbstractLevel0ConfigureAction.class); @InjectDAO(entityType = Trip.class) protected transient TripTopiaDao tripDAO; - - @InjectDAO(entityType = Vessel.class) - protected transient VesselTopiaDao vesselDAO; - - @InjectDAO(entityType = Country.class) - protected transient CountryTopiaDao countryDAO; - - @InjectDAO(entityType = VesselSimpleType.class) - protected transient VesselSimpleTypeTopiaDao vesselSimpleTypeDAO; - + // @InjectDAO(entityType = Vessel.class) +// private transient VesselTopiaDao vesselDAO; @InjectDecoratedBeans(beanType = VesselSimpleType.class) protected Map<String, String> vesselSimpleTypes; - @InjectDecoratedBeans(beanType = Country.class) protected Map<String, String> fleets; + @InjectDAO(entityType = Country.class) + private transient CountryTopiaDao countryDAO; + @InjectDAO(entityType = VesselSimpleType.class) + private transient VesselSimpleTypeTopiaDao vesselSimpleTypeDAO; - protected AbstractLevel0ConfigureAction(Class<C> configurationType) { + AbstractLevel0ConfigureAction(Class<C> configurationType) { super(configurationType); } @Override - public final void prepare() throws Exception { + public void prepare() throws Exception { // always invalidate configuration status setConfirm(false); @@ -132,9 +123,8 @@ public abstract class AbstractLevel0ConfigureAction<C extends AbstractLevel0Conf * Loads the default configuration. * * @param config the configuration to fill - * @throws TopiaException if any error while loading data from T3 database */ - protected void loadDefaultConfiguration(C config) throws TopiaException { + protected void loadDefaultConfiguration(C config) { T3Date minDate = tripDAO.getFirstLandingDate(false); config.setMinDate(minDate); ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0RunAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0RunAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/AbstractLevel0RunAction.java @@ -46,7 +46,7 @@ public abstract class AbstractLevel0RunAction<C extends AbstractLevel0Configurat @InjectDecoratedBeans(beanType = Country.class, filterById = true) private Map<String, String> fleets; - protected AbstractLevel0RunAction(Class<A> actionType) { + AbstractLevel0RunAction(Class<A> actionType) { super(actionType); } @@ -59,15 +59,8 @@ public abstract class AbstractLevel0RunAction<C extends AbstractLevel0Configurat } @Override - protected Map<String, Object> prepareResumeParameters(A action, - Exception error, - Date startDate, - Date endDate) { - Map<String, Object> map = super.prepareResumeParameters(action, - error, - startDate, - endDate - ); + protected Map<String, Object> prepareResumeParameters(A action, Exception error, Date startDate, Date endDate) { + Map<String, Object> map = super.prepareResumeParameters(action, error, startDate, endDate); map.put("vesselSimpleTypes", vesselSimpleTypes); map.put("fleets", fleets); return map; ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1ConfigureAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1ConfigureAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1ConfigureAction.java @@ -8,12 +8,12 @@ * it under the terms of the GNU Affero 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 Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% @@ -22,7 +22,8 @@ package fr.ird.t3.web.actions.data.level0; import fr.ird.t3.actions.data.level0.ComputeRF1Action; import fr.ird.t3.actions.data.level0.ComputeRF1Configuration; -import org.nuiton.topia.persistence.TopiaException; + +import java.util.Map; /** * To configure the Compute Raising factor 1 action. @@ -35,15 +36,27 @@ public class ComputeRF1ConfigureAction extends AbstractLevel0ConfigureAction<Com private static final long serialVersionUID = 1L; + private Map<String, String> useLegacyBehaviourForTripWithoutLandingOrNot; + public ComputeRF1ConfigureAction() { super(ComputeRF1Configuration.class); } @Override - protected void loadDefaultConfiguration(ComputeRF1Configuration config) throws TopiaException { + public void prepare() throws Exception { + useLegacyBehaviourForTripWithoutLandingOrNot = createUseLegacyBehaviourForTripWithoutLandingOrNot(); + super.prepare(); + } + @Override + protected void loadDefaultConfiguration(ComputeRF1Configuration config) { super.loadDefaultConfiguration(config); config.setMinimumRate(getApplicationConfig().getRf1MinimumRate()); config.setMaximumRate(getApplicationConfig().getRf1MaximumRate()); } + + @SuppressWarnings("unused") + public Map<String, String> getUseLegacyBehaviourForTripWithoutLandingOrNot() { + return useLegacyBehaviourForTripWithoutLandingOrNot; + } } ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1RunAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1RunAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF1RunAction.java @@ -8,12 +8,12 @@ * it under the terms of the GNU Affero 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 Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% @@ -23,6 +23,8 @@ package fr.ird.t3.web.actions.data.level0; import fr.ird.t3.actions.data.level0.ComputeRF1Action; import fr.ird.t3.actions.data.level0.ComputeRF1Configuration; +import java.util.Map; + /** * Compute Raising factor 1 for some selected vessels. * @@ -34,7 +36,21 @@ public class ComputeRF1RunAction extends AbstractLevel0RunAction<ComputeRF1Confi private static final long serialVersionUID = 1L; + private Map<String, String> useLegacyBehaviourForTripWithoutLandingOrNot; + public ComputeRF1RunAction() { super(ComputeRF1Action.class); } + + + @Override + public void prepare() throws Exception { + useLegacyBehaviourForTripWithoutLandingOrNot = createUseLegacyBehaviourForTripWithoutLandingOrNot(); + super.prepare(); + } + + @SuppressWarnings("unused") + public Map<String, String> getUseLegacyBehaviourForTripWithoutLandingOrNot() { + return useLegacyBehaviourForTripWithoutLandingOrNot; + } } ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2ConfigureAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2ConfigureAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2ConfigureAction.java @@ -8,12 +8,12 @@ * it under the terms of the GNU Affero 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 Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% @@ -26,8 +26,8 @@ import fr.ird.t3.entities.reference.Harbour; import fr.ird.t3.entities.reference.HarbourTopiaDao; import fr.ird.t3.services.ioc.InjectDAO; import fr.ird.t3.services.ioc.InjectDecoratedBeans; + import java.util.Map; -import org.nuiton.topia.persistence.TopiaException; /** * To configure the Compute Raising factor 1 action. @@ -41,23 +41,23 @@ public class ComputeRF2ConfigureAction extends AbstractLevel0ConfigureAction<Com private static final long serialVersionUID = 1L; @InjectDAO(entityType = Harbour.class) - protected transient HarbourTopiaDao harbourDAO; - + private transient HarbourTopiaDao harbourDAO; @InjectDecoratedBeans(beanType = Harbour.class) - protected Map<String, String> landingHarbours; + private Map<String, String> landingHarbours; public ComputeRF2ConfigureAction() { super(ComputeRF2Configuration.class); } @Override - protected void loadDefaultConfiguration(ComputeRF2Configuration config) throws TopiaException { + protected void loadDefaultConfiguration(ComputeRF2Configuration config) { super.loadDefaultConfiguration(config); config.setLandingHarbours(sortToList(harbourDAO.findAllUsedInLandingTrip(false))); } + @SuppressWarnings("unused") public Map<String, String> getLandingHarbours() { return landingHarbours; } ===================================== t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2RunAction.java ===================================== --- a/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2RunAction.java +++ b/t3-web/src/main/java/fr/ird/t3/web/actions/data/level0/ComputeRF2RunAction.java @@ -8,12 +8,12 @@ * it under the terms of the GNU Affero 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 Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * #L% @@ -40,26 +40,20 @@ public class ComputeRF2RunAction extends AbstractLevel0RunAction<ComputeRF2Confi private static final long serialVersionUID = 1L; @InjectDecoratedBeans(beanType = Harbour.class, filterById = true) - protected Map<String, String> landingHarbours; + private Map<String, String> landingHarbours; public ComputeRF2RunAction() { super(ComputeRF2Action.class); } + @SuppressWarnings("unused") public Map<String, String> getLandingHarbours() { return landingHarbours; } @Override - protected Map<String, Object> prepareResumeParameters(ComputeRF2Action action, - Exception error, - Date startDate, - Date endDate) { - Map<String, Object> map = super.prepareResumeParameters(action, - error, - startDate, - endDate - ); + protected Map<String, Object> prepareResumeParameters(ComputeRF2Action action, Exception error, Date startDate, Date endDate) { + Map<String, Object> map = super.prepareResumeParameters(action, error, startDate, endDate); map.put("landingHarbours", landingHarbours); return map; } ===================================== t3-web/src/main/resources/i18n/t3-web_en_GB.properties ===================================== --- a/t3-web/src/main/resources/i18n/t3-web_en_GB.properties +++ b/t3-web/src/main/resources/i18n/t3-web_en_GB.properties @@ -87,6 +87,7 @@ t3.common.oceanFilter=Filter on oceans t3.common.reimported=réimporté t3.common.replacementVessel=Replacement vessel t3.common.rf0=Raising factor 0 +t3.common.rf1.useLegacyBehaviourForTripWithoutLandingOrNot=Trip without landing management t3.common.rfMinus10Max=Rf Minus 10 maximum t3.common.rfMinus10MinNumber=Minimum fish measured mandatory for -10kg t3.common.rfPlus10Max=Rf Plus 10 maximum @@ -286,6 +287,8 @@ t3.label.importData.config.resume=Configuration resume of data import t3.label.info.changePassword=To change password, fill the both password fields t3.label.inprogress=in progress... t3.label.language=Langue +t3.label.level0.configuration.rf1.useLegacyBehaviourForTripWithoutLanding=Calculer un RF1 sur les marées composées avec défaut de débarquement +t3.label.level0.configuration.rf1.useNewBehaviourForTripWithoutLanding=Attribuer RF1\=1 sur les marées composées avec défaut de débarquement t3.label.locale.english=English t3.label.locale.french=French t3.label.locale.spanish=spanish ===================================== t3-web/src/main/resources/i18n/t3-web_fr_FR.properties ===================================== --- a/t3-web/src/main/resources/i18n/t3-web_fr_FR.properties +++ b/t3-web/src/main/resources/i18n/t3-web_fr_FR.properties @@ -87,6 +87,7 @@ t3.common.oceanFilter=Filter les océans t3.common.reimported=réimporté t3.common.replacementVessel=Navire de remplacement t3.common.rf0=Raising factor 0 +t3.common.rf1.useLegacyBehaviourForTripWithoutLandingOrNot=Gestion des marées sans débarquement t3.common.rfMinus10Max=Rf Minus 10 maximum t3.common.rfMinus10MinNumber=Seuil minimum d'individus mesurés dans la catégorie -10kg t3.common.rfPlus10Max=Rf Plus 10 maximum @@ -286,6 +287,8 @@ t3.label.importData.config.resume=Résumé de la configuration d'import de donn t3.label.info.changePassword=Pour changer de mot de passe, veuillez remplir les deux champs dédiés t3.label.inprogress=en cours... t3.label.language=Langue +t3.label.level0.configuration.rf1.useLegacyBehaviourForTripWithoutLanding=Calculer un RF1 sur les marées composées avec défaut de débarquement +t3.label.level0.configuration.rf1.useNewBehaviourForTripWithoutLanding=Attribuer RF1\=1 sur les marées composées avec défaut de débarquement t3.label.locale.english=Anglais t3.label.locale.french=Français t3.label.locale.spanish=Espagnol ===================================== t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1Config.jsp ===================================== --- a/t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1Config.jsp +++ b/t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1Config.jsp @@ -27,16 +27,17 @@ .ui-datepicker-calendar { display: none; } + .wwlbl { width: 500px; } </style> <title><s:text name="t3.label.data.treatment.level0"/> : <s:text - name="t3.label.data.level0.computeRF1"/></title> + name="t3.label.data.level0.computeRF1"/></title> <h2><s:text name="t3.label.data.treatment.level0"/> : <s:text - name="t3.label.data.level0.computeRF1"/></h2> + name="t3.label.data.level0.computeRF1"/></h2> <s:if test="confirm"> @@ -62,7 +63,7 @@ <s:text name="t3.label.configure"/> </legend> - <%-- begin date --%> + <%-- begin date --%> <sj:datepicker key="configuration.beginDate" requiredLabel="true" label='%{getText("t3.common.beginDate")}' appendText=" (mm-yyyy)"/> @@ -89,6 +90,9 @@ label='%{getText("t3.common.fleetCountry")}' requiredLabel="true" template="mycheckboxlist"/> + <s:radio key="configuration.useLegacyBehaviourForTripWithoutLanding" requiredLabel="true" + list="useLegacyBehaviourForTripWithoutLandingOrNot" + label='%{getText("t3.common.rf1.useLegacyBehaviourForTripWithoutLandingOrNot")}'/> </fieldset> <br/> @@ -100,13 +104,13 @@ <script type="text/javascript"> - jQuery(document).ready(function () { + jQuery(document).ready(function () { - $.prepareMonthPickers( - { - minDateAsMonth:'<s:property value="configuration.minDate"/>', - maxDateAsMonth:'<s:property value="configuration.maxDate"/>' - }); + $.prepareMonthPickers( + { + minDateAsMonth: '<s:property value="configuration.minDate"/>', + maxDateAsMonth: '<s:property value="configuration.maxDate"/>' + }); - }); + }); </script> ===================================== t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1ConfigResume.jsp ===================================== --- a/t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1ConfigResume.jsp +++ b/t3-web/src/main/webapp/WEB-INF/jsp/data/level0/ComputeRF1ConfigResume.jsp @@ -51,4 +51,8 @@ list="fleets" template="mycheckboxlist" label='%{getText("t3.common.fleetCountry")}'/> + <s:radio key="configuration.useLegacyBehaviourForTripWithoutLanding" disabled="true" + list="useLegacyBehaviourForTripWithoutLandingOrNot" + label='%{getText("t3.common.rf1.useLegacyBehaviourForTripWithoutLandingOrNot")}'/> + </fieldset> View it on GitLab: https://gitlab.com/ultreiaio/ird-t3/commit/455478ec65e2c7d4e143fe43cc67ca0da... --- View it on GitLab: https://gitlab.com/ultreiaio/ird-t3/commit/455478ec65e2c7d4e143fe43cc67ca0da... You're receiving this email because of your account on gitlab.com.