Tony CHEMIT pushed to branch master at ultreiaio / ird-t3
Commits:
-
194c302a
by Tony CHEMIT at 2018-04-05T17:01:09Z
-
2d413e07
by Tony CHEMIT at 2018-04-05T17:08:50Z
-
3001ed31
by Tony CHEMIT at 2018-04-05T17:08:50Z
-
77c55a5f
by Tony CHEMIT at 2018-04-05T17:08:51Z
-
7fcfc174
by Tony CHEMIT at 2018-04-05T17:29:17Z
-
e6a3b4b5
by Tony CHEMIT at 2018-04-05T17:42:01Z
-
0b6cb8bd
by Tony CHEMIT at 2018-04-11T10:21:02Z
-
d7b705b8
by Tony CHEMIT at 2018-04-11T10:21:04Z
-
738aa303
by Tony CHEMIT at 2018-04-11T11:37:58Z
-
4ab2024f
by Tony CHEMIT at 2018-04-11T12:18:10Z
-
da05f1c0
by Tony CHEMIT at 2018-04-11T12:33:33Z
-
2ca9ec8e
by Tony CHEMIT at 2018-04-11T13:21:13Z
-
f3838753
by Tony CHEMIT at 2018-04-11T13:36:26Z
-
e6c17532
by Tony CHEMIT at 2018-04-11T14:16:28Z
-
79a83a2c
by Tony CHEMIT at 2018-04-11T16:19:11Z
-
dbd1ae67
by Tony CHEMIT at 2018-04-11T16:42:53Z
-
2e97aa9d
by Tony CHEMIT at 2018-04-12T07:52:44Z
-
7e0ad51c
by Tony CHEMIT at 2018-04-12T07:57:44Z
26 changed files:
- CHANGELOG.md
- pom.xml
- t3-actions/pom.xml
- t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF2Action.java
- t3-actions/src/main/resources/i18n/t3-actions_en_GB.properties
- t3-actions/src/main/resources/i18n/t3-actions_fr_FR.properties
- t3-domain/pom.xml
- t3-domain/src/main/java/fr/ird/t3/entities/data/AbstractTripTopiaDao.java
- t3-domain/src/main/java/fr/ird/t3/entities/data/TripImpl.java
- t3-domain/src/main/java/fr/ird/t3/services/DecoratorService.java
- + t3-domain/src/main/java/fr/ird/t3/services/migration/T3MigrationCallbackV2_7.java
- + t3-domain/src/main/resources/db/migration/V2_7_01_add-trip-logbookAvailability.sql
- t3-domain/src/main/xmi/t3-persistence.properties
- t3-domain/src/main/xmi/t3-persistence.zargo
- t3-input-avdthv33/pom.xml
- t3-input-avdthv33/src/main/java/fr/ird/t3/io/input/avdth/v33/T3AccessEntityMetaProviderAvdth33.java
- t3-input-avdthv35/pom.xml
- t3-input-avdthv35/src/main/java/fr/ird/t3/io/input/avdth/v35/T3AccessEntityMetaProviderAvdth35.java
- t3-input-avdthv36/pom.xml
- t3-input-avdthv36/src/main/java/fr/ird/t3/io/input/avdth/v36/T3AccessEntityMetaProviderAvdth36.java
- t3-installer/pom.xml
- t3-msaccess-importer/pom.xml
- t3-output-balbayav32/pom.xml
- t3-web/pom.xml
- t3-web/src/main/java/fr/ird/t3/web/actions/io/input/ConfigureImportDataAction.java
- t3/pom.xml
Changes:
| 1 | 1 |
# T3 changelog
|
| 2 | 2 |
|
| 3 | 3 |
* Author [Tony Chemit](mailto:dev@tchemit.fr)
|
| 4 |
- * Last generated at 2018-03-23 18:32.
|
|
| 4 |
+ * Last generated at 2018-04-05 19:27.
|
|
| 5 |
+
|
|
| 6 |
+## Version [2.6](https://gitlab.com/ultreiaio/ird-t3/milestones/36)
|
|
| 7 |
+
|
|
| 8 |
+ **Closed at 2018-04-05.**
|
|
| 9 |
+
|
|
| 10 |
+ ### Download
|
|
| 11 |
+ * [Installer (t3-2.6.zip)](https://oss.sonatype.org/content/repositories/frirdt3-1018/fr/ird/t3/t3/2.6/t3-2.6.zip)
|
|
| 12 |
+ * [Application (t3-2.6.war)](https://oss.sonatype.org/content/repositories/frirdt3-1018/fr/ird/t3/t3/2.6/t3-2.6.war)
|
|
| 13 |
+
|
|
| 14 |
+ ### Issues
|
|
| 15 |
+ * [[Evolution 306]](https://gitlab.com/ultreiaio/ird-t3/issues/306) **Mise en page de certains écrans de configuration** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 16 |
+ * [[Evolution 307]](https://gitlab.com/ultreiaio/ird-t3/issues/307) **[N3] Option à supprimer sur le N3** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 17 |
+ * [[Tâche 303]](https://gitlab.com/ultreiaio/ird-t3/issues/303) **Problème avec l'installeur 2.5** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 18 |
+ * [[Tâche 304]](https://gitlab.com/ultreiaio/ird-t3/issues/304) **[IMPORT] Il manque un lien "Importer une autre marée"** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 19 |
+ * [[Tâche 305]](https://gitlab.com/ultreiaio/ird-t3/issues/305) **Pour une base OI 2018, l'assistant import exige un code port a priori non pertinent** (Thanks to Tony CHEMIT) (Reported by Pascal Cauquil)
|
|
| 5 | 20 |
|
| 6 | 21 |
## Version [2.5](https://gitlab.com/ultreiaio/ird-t3/milestones/35)
|
| 7 | 22 |
|
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 |
|
| 29 | 29 |
<groupId>fr.ird.t3</groupId>
|
| 30 | 30 |
<artifactId>ird-t3</artifactId>
|
| 31 |
- <version>2.6</version>
|
|
| 31 |
+ <version>2.7</version>
|
|
| 32 | 32 |
<packaging>pom</packaging>
|
| 33 | 33 |
|
| 34 | 34 |
<name>T3 :: Pom</name>
|
| ... | ... | @@ -99,7 +99,7 @@ |
| 99 | 99 |
<projectId>ird-t3</projectId>
|
| 100 | 100 |
<stageId>frirdt3</stageId>
|
| 101 | 101 |
<applicationName>t3</applicationName>
|
| 102 |
- <t3-data.version>1.8</t3-data.version>
|
|
| 102 |
+ <t3-data.version>1.9</t3-data.version>
|
|
| 103 | 103 |
<lib.version.java4all.i18n>4.0-alpha-11</lib.version.java4all.i18n>
|
| 104 | 104 |
|
| 105 | 105 |
<env>dev</env>
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-actions</artifactId>
|
| ... | ... | @@ -23,7 +23,6 @@ package fr.ird.t3.actions.data.level0; |
| 23 | 23 |
import com.google.common.collect.ArrayListMultimap;
|
| 24 | 24 |
import com.google.common.collect.ListMultimap;
|
| 25 | 25 |
import com.google.common.collect.Multimap;
|
| 26 |
-import com.google.common.collect.TreeMultimap;
|
|
| 27 | 26 |
import fr.ird.t3.entities.data.CompleteTrip;
|
| 28 | 27 |
import fr.ird.t3.entities.data.RaisingFactor2;
|
| 29 | 28 |
import fr.ird.t3.entities.data.RaisingFactor2TopiaDao;
|
| ... | ... | @@ -33,6 +32,8 @@ import fr.ird.t3.entities.reference.Country; |
| 33 | 32 |
import fr.ird.t3.entities.reference.CountryTopiaDao;
|
| 34 | 33 |
import fr.ird.t3.entities.reference.Harbour;
|
| 35 | 34 |
import fr.ird.t3.entities.reference.HarbourTopiaDao;
|
| 35 |
+import fr.ird.t3.entities.reference.RF1SpeciesForFleet;
|
|
| 36 |
+import fr.ird.t3.entities.reference.RF1SpeciesForFleetTopiaDao;
|
|
| 36 | 37 |
import fr.ird.t3.entities.reference.Species;
|
| 37 | 38 |
import fr.ird.t3.entities.reference.Vessel;
|
| 38 | 39 |
import fr.ird.t3.entities.reference.VesselSimpleType;
|
| ... | ... | @@ -41,7 +42,6 @@ import fr.ird.t3.entities.type.T3Date; |
| 41 | 42 |
import fr.ird.t3.services.DecoratorService;
|
| 42 | 43 |
import fr.ird.t3.services.ioc.InjectDAO;
|
| 43 | 44 |
import fr.ird.t3.services.ioc.InjectEntitiesById;
|
| 44 |
-import fr.ird.t3.services.ioc.InjectFromDAO;
|
|
| 45 | 45 |
import org.apache.commons.collections.CollectionUtils;
|
| 46 | 46 |
import org.apache.commons.logging.Log;
|
| 47 | 47 |
import org.apache.commons.logging.LogFactory;
|
| ... | ... | @@ -53,6 +53,7 @@ import java.util.Date; |
| 53 | 53 |
import java.util.HashSet;
|
| 54 | 54 |
import java.util.Iterator;
|
| 55 | 55 |
import java.util.List;
|
| 56 |
+import java.util.Map;
|
|
| 56 | 57 |
import java.util.Set;
|
| 57 | 58 |
|
| 58 | 59 |
import static org.nuiton.i18n.I18n.l;
|
| ... | ... | @@ -69,8 +70,6 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 69 | 70 |
private static final Log log = LogFactory.getLog(ComputeRF2Action.class);
|
| 70 | 71 |
@InjectEntitiesById(entityType = Harbour.class)
|
| 71 | 72 |
private List<Harbour> landingHarbours;
|
| 72 |
- @InjectFromDAO(entityType = Species.class)
|
|
| 73 |
- private List<Species> species;
|
|
| 74 | 73 |
private int nbStratum;
|
| 75 | 74 |
private int nbTripsWithRF2;
|
| 76 | 75 |
@InjectDAO(entityType = RaisingFactor2.class)
|
| ... | ... | @@ -81,9 +80,12 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 81 | 80 |
private CountryTopiaDao countryDAO;
|
| 82 | 81 |
@InjectDAO(entityType = VesselSimpleType.class)
|
| 83 | 82 |
private VesselSimpleTypeTopiaDao vesselSimpleTypeDAO;
|
| 83 |
+ @InjectDAO(entityType = RF1SpeciesForFleet.class)
|
|
| 84 |
+ private RF1SpeciesForFleetTopiaDao rF1SpecieForFleetDAO;
|
|
| 85 |
+ /** usable species group by country */
|
|
| 86 |
+ private Multimap<Country, Species> speciesByCountry;
|
|
| 84 | 87 |
/** usable complete trips group by vessel */
|
| 85 | 88 |
private ListMultimap<Vessel, CompleteTrip> completeTripsByVessel;
|
| 86 |
- private Multimap<String, String> tripDone;
|
|
| 87 | 89 |
|
| 88 | 90 |
public ComputeRF2Action() {
|
| 89 | 91 |
super(Level0Step.COMPUTE_RF2);
|
| ... | ... | @@ -119,18 +121,25 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 119 | 121 |
// use all fleets
|
| 120 | 122 |
fleets = countryDAO.findAll();
|
| 121 | 123 |
}
|
| 122 |
- tripDone = TreeMultimap.create();
|
|
| 124 |
+ // get all species usable for rf1 for all selected fleet countries
|
|
| 125 |
+ this.speciesByCountry = rF1SpecieForFleetDAO.getSpeciesForCountry(fleets);
|
|
| 123 | 126 |
List<Trip> tripList = getUsableTrips(landingHarbours, true);
|
| 127 |
+ log.info("Trip count: " + tripList.size());
|
|
| 124 | 128 |
setTrips(tripList);
|
| 125 | 129 |
completeTripsByVessel = ArrayListMultimap.create();
|
| 126 | 130 |
// get all trips group by the vessel
|
| 127 | 131 |
ListMultimap<Vessel, Trip> tripsByVessel = TripTopiaDao.groupByVessel(tripList);
|
| 132 |
+ log.info("Trip vessel count: " + tripsByVessel.keySet().size());
|
|
| 133 |
+ |
|
| 128 | 134 |
// compute for each vessel list of complete trip
|
| 129 |
- for (Vessel vessel : tripsByVessel.keys()) {
|
|
| 130 |
- List<Trip> tripsForVessel = new ArrayList<>(tripsByVessel.get(vessel));
|
|
| 135 |
+ for (Map.Entry<Vessel, Collection<Trip>> entry : tripsByVessel.asMap().entrySet()) {
|
|
| 136 |
+ Vessel vessel = entry.getKey();
|
|
| 137 |
+ List<Trip> tripsForVessel = new ArrayList<>(entry.getValue());
|
|
| 138 |
+ log.info("Trip vessel [" + vessel.getLabel1() + "] count: " + tripsForVessel.size());
|
|
| 131 | 139 |
TripTopiaDao.sortTrips(tripsForVessel);
|
| 132 | 140 |
// get all complete trips
|
| 133 | 141 |
List<CompleteTrip> completeTrips = tripDAO.toCompleteTrip(tripsForVessel);
|
| 142 |
+ log.info("Complete trip vessel [" + vessel.getLabel1() + "] count: " + completeTrips.size());
|
|
| 134 | 143 |
completeTripsByVessel.putAll(vessel, completeTrips);
|
| 135 | 144 |
}
|
| 136 | 145 |
|
| ... | ... | @@ -146,11 +155,22 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 146 | 155 |
boolean result = false;
|
| 147 | 156 |
if (CollectionUtils.isNotEmpty(trips)) {
|
| 148 | 157 |
setNbSteps(landingHarbours.size() * fleets.size() * vesselSimpleTypes.size());
|
| 149 |
- boolean computeRf2 = !getConfiguration().isConfigurationEmpty();
|
|
| 158 |
+ |
|
| 150 | 159 |
for (Harbour harbour : landingHarbours) {
|
| 151 | 160 |
String harbourStr = harbour.getLabel1();
|
| 152 | 161 |
for (Country fleet : fleets) {
|
| 153 | 162 |
String countryStr = fleet.getLabel1();
|
| 163 |
+ |
|
| 164 |
+ Collection<Species> species = speciesByCountry.get(fleet);
|
|
| 165 |
+ |
|
| 166 |
+ boolean computeRf2 = !getConfiguration().isConfigurationEmpty();
|
|
| 167 |
+ |
|
| 168 |
+ if (computeRf2 && species.isEmpty()) {
|
|
| 169 |
+ String message = l(locale, "t3.level0.computeRF2.skip.missing.species", harbourStr, countryStr);
|
|
| 170 |
+ log.info(message);
|
|
| 171 |
+ addInfoMessage(message);
|
|
| 172 |
+ computeRf2 = false;
|
|
| 173 |
+ }
|
|
| 154 | 174 |
for (VesselSimpleType vesselSimpleType : vesselSimpleTypes) {
|
| 155 | 175 |
incrementsProgression();
|
| 156 | 176 |
// get all trip usable for this stratum
|
| ... | ... | @@ -158,26 +178,48 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 158 | 178 |
String vesselSimpleTypeStr = vesselSimpleType.getLabel1();
|
| 159 | 179 |
// obtain all trips for harbour / fleet / vesselSimpleType
|
| 160 | 180 |
List<CompleteTrip> completeTrips = getStratumCompleteTrips(stratumVessels, harbour);
|
| 161 |
- log.debug(String.format("For [%s/%s/%s] nb trips = %d", harbourStr, countryStr, vesselSimpleTypeStr, completeTrips.size()));
|
|
| 181 |
+ log.info(String.format("For [%s/%s/%s] nb trips = %d", harbourStr, countryStr, vesselSimpleTypeStr, completeTrips.size()));
|
|
| 162 | 182 |
if (completeTrips.isEmpty()) {
|
| 163 | 183 |
// no trip for this stratum
|
| 164 | 184 |
continue;
|
| 165 | 185 |
}
|
| 166 | 186 |
Multimap<T3Date, CompleteTrip> tripsByMonth = TripTopiaDao.splitTripsByMonth(completeTrips);
|
| 167 |
- log.debug(String.format("found %d months.", tripsByMonth.size()));
|
|
| 168 |
- for (T3Date month : tripsByMonth.keySet()) {
|
|
| 169 |
- Collection<CompleteTrip> stratumTrips = tripsByMonth.get(month);
|
|
| 187 |
+ log.info(String.format("found %d months.", tripsByMonth.keySet().size()));
|
|
| 188 |
+ for (Map.Entry<T3Date, Collection<CompleteTrip>> entry : tripsByMonth.asMap().entrySet()) {
|
|
| 189 |
+ T3Date month = entry.getKey();
|
|
| 190 |
+ Collection<CompleteTrip> stratumTrips = entry.getValue();
|
|
| 170 | 191 |
nbStratum++;
|
| 192 |
+ boolean computeThisStratum = computeRf2;
|
|
| 193 |
+ if (computeRf2) {
|
|
| 194 |
+ // check that at least on trip miss logbook
|
|
| 195 |
+ computeThisStratum = false;
|
|
| 196 |
+ for (CompleteTrip completeTrip : stratumTrips) {
|
|
| 197 |
+ for (Trip trip : completeTrip) {
|
|
| 198 |
+ if (trip.getLogbookAvailability() == 0) {
|
|
| 199 |
+ // no logbook on this
|
|
| 200 |
+ computeThisStratum = true;
|
|
| 201 |
+ String message = l(locale, "t3.level0.computeRF2.found.missing.logbook", harbourStr, countryStr, vesselSimpleTypeStr, month, nbStratum, decorate(trip));
|
|
| 202 |
+ log.info(message);
|
|
| 203 |
+ addInfoMessage(message);
|
|
| 204 |
+ }
|
|
| 205 |
+ }
|
|
| 206 |
+ }
|
|
| 207 |
+ if (!computeThisStratum) {
|
|
| 208 |
+ String message = l(locale, "t3.level0.computeRF2.skip.missing.logbook", harbourStr, countryStr, vesselSimpleTypeStr, month, nbStratum);
|
|
| 209 |
+ log.info(message);
|
|
| 210 |
+ addInfoMessage(message);
|
|
| 211 |
+ }
|
|
| 212 |
+ }
|
|
| 171 | 213 |
String message = l(locale, "t3.level0.computeRF2.nbTrips.for.stratum",
|
| 172 |
- stratumTrips.size(),
|
|
| 173 |
- nbStratum,
|
|
| 174 | 214 |
harbourStr,
|
| 175 | 215 |
countryStr,
|
| 176 | 216 |
vesselSimpleTypeStr,
|
| 177 |
- month);
|
|
| 217 |
+ month,
|
|
| 218 |
+ nbStratum,
|
|
| 219 |
+ stratumTrips.size());
|
|
| 178 | 220 |
log.info(message);
|
| 179 | 221 |
addInfoMessage(message);
|
| 180 |
- executeForStratum(harbour, fleet, vesselSimpleType, month, species, stratumTrips, computeRf2);
|
|
| 222 |
+ executeForStratum(harbour, fleet, vesselSimpleType, month, species, stratumTrips, computeThisStratum);
|
|
| 181 | 223 |
}
|
| 182 | 224 |
}
|
| 183 | 225 |
}
|
| ... | ... | @@ -222,7 +264,7 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 222 | 264 |
Country fleet,
|
| 223 | 265 |
VesselSimpleType vesselSimpleType,
|
| 224 | 266 |
T3Date month,
|
| 225 |
- List<Species> species,
|
|
| 267 |
+ Collection<Species> species,
|
|
| 226 | 268 |
Collection<CompleteTrip> trips,
|
| 227 | 269 |
boolean computeRf2) throws TopiaException {
|
| 228 | 270 |
|
| ... | ... | @@ -246,7 +288,9 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 246 | 288 |
}
|
| 247 | 289 |
// do the rf2 stratum computation
|
| 248 | 290 |
float rf2 = computeRf2 ? computeRF2ForStratum(trips, species) : 1f;
|
| 249 |
- addInfoMessage(l(locale, "t3.level0.computeRF2.computed.rf2.for.stratum", rf2));
|
|
| 291 |
+ if (computeRf2) {
|
|
| 292 |
+ addInfoMessage(l(locale, "t3.level0.computeRF2.computed.rf2.for.stratum", rf2));
|
|
| 293 |
+ }
|
|
| 250 | 294 |
// assign rf2 value to the entity
|
| 251 | 295 |
raisingFactor.setRaisingFactorValue(rf2);
|
| 252 | 296 |
if (!rFCreated) {
|
| ... | ... | @@ -256,20 +300,18 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 256 | 300 |
// set rf2 to all trips
|
| 257 | 301 |
for (CompleteTrip trip : trips) {
|
| 258 | 302 |
String tripStr = decorate(trip);
|
| 259 |
- if (canLog(tripStr,"nbTrips")) {
|
|
| 260 |
- if (rf2 != 1) {
|
|
| 261 |
- nbTripsWithRF2++;
|
|
| 262 |
- }
|
|
| 263 |
- String message = l(locale, "t3.level0.computeRF1.resume.rf2.for.trip", tripStr, rf2);
|
|
| 264 |
- log.info(message);
|
|
| 265 |
- addInfoMessage(message);
|
|
| 303 |
+ if (rf2 != 1) {
|
|
| 304 |
+ nbTripsWithRF2++;
|
|
| 266 | 305 |
}
|
| 306 |
+ String message = l(locale, "t3.level0.computeRF1.resume.rf2.for.trip", tripStr, rf2);
|
|
| 307 |
+ log.info(message);
|
|
| 308 |
+ addInfoMessage(message);
|
|
| 267 | 309 |
trip.applyRf2(rf2);
|
| 268 | 310 |
markTripAsTreated(trip);
|
| 269 | 311 |
}
|
| 270 | 312 |
}
|
| 271 | 313 |
|
| 272 |
- private float computeRF2ForStratum(Collection<CompleteTrip> trips, List<Species> species) {
|
|
| 314 |
+ private float computeRF2ForStratum(Collection<CompleteTrip> trips, Collection<Species> species) {
|
|
| 273 | 315 |
float totalLandingWeight = 0f;
|
| 274 | 316 |
float totalCatchWeight = 0f;
|
| 275 | 317 |
for (CompleteTrip trip : trips) {
|
| ... | ... | @@ -285,14 +327,10 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 285 | 327 |
tripCatchWeight = trip.getElementaryCatchTotalWeightRf1(species);
|
| 286 | 328 |
}
|
| 287 | 329 |
totalCatchWeight += tripCatchWeight;
|
| 288 |
- if (canLog(tripStr,"compute")) {
|
|
| 289 |
- addInfoMessage(l(locale, "t3.level0.computeRF2.resume.rf1.for.trip", tripStr, tripCatchWeight, tripLandingWeight));
|
|
| 290 |
- }
|
|
| 330 |
+ addInfoMessage(l(locale, "t3.level0.computeRF2.resume.rf1.for.trip", tripStr, tripCatchWeight, tripLandingWeight));
|
|
| 291 | 331 |
} else {
|
| 292 | 332 |
// this trip does not have any landing catches for given species
|
| 293 |
- if (canLog(tripStr,"compute")) {
|
|
| 294 |
- addWarningMessage(l(locale, "t3.level0.computeRF2.resume.skip.for.trip", tripStr));
|
|
| 295 |
- }
|
|
| 333 |
+ addWarningMessage(l(locale, "t3.level0.computeRF2.resume.skip.for.trip", tripStr));
|
|
| 296 | 334 |
}
|
| 297 | 335 |
}
|
| 298 | 336 |
addInfoMessage(l(locale, "t3.level0.computeRF2.resume.total.rf1", totalCatchWeight, totalLandingWeight));
|
| ... | ... | @@ -310,12 +348,4 @@ public class ComputeRF2Action extends AbstractLevel0Action<ComputeRF2Configurati |
| 310 | 348 |
}
|
| 311 | 349 |
}
|
| 312 | 350 |
|
| 313 |
- private boolean canLog(String key, String method) {
|
|
| 314 |
- boolean exist = tripDone.containsEntry(key, method);
|
|
| 315 |
- if (!exist) {
|
|
| 316 |
- tripDone.put(key, method);
|
|
| 317 |
- }
|
|
| 318 |
- return !exist;
|
|
| 319 |
- }
|
|
| 320 |
- |
|
| 321 | 351 |
}
|
| ... | ... | @@ -36,12 +36,15 @@ t3.level0.computeRF1.warning.no.logbook=No log book for trip %s, use a null rf1 |
| 36 | 36 |
t3.level0.computeRF1.warning.no.species.usable.for.country=Could not find usable species fro Raising Factor 1 computation from country %s
|
| 37 | 37 |
t3.level0.computeRF1.warning.too.high.rf1=For complete trip %s from %s to %s computed rf1 %s is too high (higher than %s)
|
| 38 | 38 |
t3.level0.computeRF1.warning.too.low.rf1=For complete trip %s from %s to %s computed rf1 is too small (less than %s)
|
| 39 |
-t3.level0.computeRF1.warning.trip.is.not.complete=Trip %s is not compelte, can not compute any rf1 for it
|
|
| 39 |
+t3.level0.computeRF1.warning.trip.is.not.complete=Trip %s is not complete, can not compute any rf1 for it
|
|
| 40 | 40 |
t3.level0.computeRF2.computed.rf2.for.stratum=Computed rf2 for stratum \: %s
|
| 41 |
-t3.level0.computeRF2.nbTrips.for.stratum=%s trip(s) for Stratum (%s) [%s/%s/%s/%s]
|
|
| 41 |
+t3.level0.computeRF2.found.missing.logbook=Stratum [%s/%s/%s/%s] (%s) - found a trip {%s} without logbook, will compute rf2.
|
|
| 42 |
+t3.level0.computeRF2.nbTrips.for.stratum=[%s/%s/%s/%s] (%s) - %s complete trip(s) found.
|
|
| 42 | 43 |
t3.level0.computeRF2.resume.rf1.for.trip=Trip %s total rf1 catches weight %s / total landing weight %s
|
| 43 | 44 |
t3.level0.computeRF2.resume.skip.for.trip=Trip %s has not elementary landing (trip not used to compute rf2)
|
| 44 | 45 |
t3.level0.computeRF2.resume.total.rf1=Sum total rf1 catches weight %s / Sum total landing weight %s
|
| 46 |
+t3.level0.computeRF2.skip.missing.logbook=Stratum [%s/%s/%s/%s] (%s) - won't compute rf2, since no logbook is missing.
|
|
| 47 |
+t3.level0.computeRF2.skip.missing.species=Strate [%s/%s/???/???] - won't compute rf2, since no species found the fleet.
|
|
| 45 | 48 |
t3.level0.computeSetDurationAndPositiveSetCount.error.noSetDurationFound=SetDuration data not found (ocean %s, fleet %s, school type %s, year %s)
|
| 46 | 49 |
t3.level0.computeTripEffort=Trip efforts %s (fishing %s, search %s)
|
| 47 | 50 |
t3.level0.computeTripEffortSkipForDay=Trip %s, day without fishing time (only activities of type « at harbour » or « under way without prospection »)
|
| ... | ... | @@ -38,10 +38,13 @@ t3.level0.computeRF1.warning.too.high.rf1=Pour la marée complète %s de %s à % |
| 38 | 38 |
t3.level0.computeRF1.warning.too.low.rf1=Pour la marée complète %s de %s à %s le rf1 calculé %s est trop petit (inférieur à %s)
|
| 39 | 39 |
t3.level0.computeRF1.warning.trip.is.not.complete=La marée %s n'est pas complète, calcul du rf1 impossible
|
| 40 | 40 |
t3.level0.computeRF2.computed.rf2.for.stratum=Valeur du rf2 calculé pour la strate \: %s
|
| 41 |
-t3.level0.computeRF2.nbTrips.for.stratum=%s marée(s) pour la Strate (%s) [%s/%s/%s/%s]
|
|
| 41 |
+t3.level0.computeRF2.found.missing.logbook=Strate [%s/%s/%s%s] (%s) - une marée {%s} sans logbook a été trouvée, calcul du rf2 programmé.
|
|
| 42 |
+t3.level0.computeRF2.nbTrips.for.stratum=Strate [%s/%s/%s/%s] (%s) - %s marée(s) complète(s) trouvée(s).
|
|
| 42 | 43 |
t3.level0.computeRF2.resume.rf1.for.trip=Marée %s Poids total des captures rf1isées %s / Poids total des ventes %s
|
| 43 | 44 |
t3.level0.computeRF2.resume.skip.for.trip=La marée %s ne possède pas de lots commerciaux (non prise en compte dans le calcul du rf2)
|
| 44 | 45 |
t3.level0.computeRF2.resume.total.rf1=Poids cumulé des captures rf1isées %s / Poids cumulé des ventes %s
|
| 46 |
+t3.level0.computeRF2.skip.missing.logbook=Strate [%s/%s/%s/%s] (%s) - aucun logbook manquant, le rf2 ne sera pas calculé.
|
|
| 47 |
+t3.level0.computeRF2.skip.missing.species=Strate [%s/%s/???/???] - pas d'espèce trouvé pour la flotte, le rf2 ne sera pas calculé.
|
|
| 45 | 48 |
t3.level0.computeSetDurationAndPositiveSetCount.error.noSetDurationFound=Donnée SetDuration non trouvée (ocean %s, flotte %s, type de banc %s, année %s)
|
| 46 | 49 |
t3.level0.computeTripEffort=Efforts de la marée %s (pêche %s, recherche %s)
|
| 47 | 50 |
t3.level0.computeTripEffortSkipForDay=Marée %s, jour sans temps de pêche (uniquement des activités « au port » ou « route sans veille »)
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-domain</artifactId>
|
| ... | ... | @@ -85,7 +85,7 @@ public class AbstractTripTopiaDao<E extends Trip> extends GeneratedTripTopiaDao< |
| 85 | 85 |
* @param pKey primary key of this trip
|
| 86 | 86 |
*/
|
| 87 | 87 |
public static void checkAndSetStandardTripType(Trip trip, Object[] pKey) {
|
| 88 |
- int logBookAvailability = trip.getLogBookAvailability();
|
|
| 88 |
+ int logBookAvailability = trip.getLogbookAvailability();
|
|
| 89 | 89 |
switch (logBookAvailability) {
|
| 90 | 90 |
case TRIP_WITHOUT_LOGBOOK:
|
| 91 | 91 |
if (trip.isActivityNotEmpty()) {
|
| ... | ... | @@ -111,7 +111,7 @@ public class AbstractTripTopiaDao<E extends Trip> extends GeneratedTripTopiaDao< |
| 111 | 111 |
* @param pKey primary key of this trip
|
| 112 | 112 |
*/
|
| 113 | 113 |
public static void checkAndSetLogbookMissingTripType(Trip trip, Object[] pKey) {
|
| 114 |
- int logBookAvailability = trip.getLogBookAvailability();
|
|
| 114 |
+ int logBookAvailability = trip.getLogbookAvailability();
|
|
| 115 | 115 |
if (trip.getTripType() == TripType.LOGBOOKMISSING) {
|
| 116 | 116 |
if (TRIP_WITH_LOGBOOK == logBookAvailability) {
|
| 117 | 117 |
throw new IllegalStateException(String.format("Trip %s has no logBook but logBookAvailability says the opposite, please fix this trip.", Arrays.toString(pKey)));
|
| ... | ... | @@ -31,7 +31,6 @@ import fr.ird.t3.entities.reference.Vessel; |
| 31 | 31 |
import fr.ird.t3.entities.reference.VesselImpl;
|
| 32 | 32 |
import org.nuiton.util.DateUtil;
|
| 33 | 33 |
|
| 34 |
-import java.util.ArrayList;
|
|
| 35 | 34 |
import java.util.Collection;
|
| 36 | 35 |
import java.util.Comparator;
|
| 37 | 36 |
import java.util.Date;
|
| ... | ... | @@ -66,8 +65,6 @@ public class TripImpl extends TripAbstract { |
| 66 | 65 |
|
| 67 | 66 |
private transient Boolean level2Computed;
|
| 68 | 67 |
private transient Boolean level3Computed;
|
| 69 |
- // only used for avdth import
|
|
| 70 |
- private transient int logBookAvailability;
|
|
| 71 | 68 |
|
| 72 | 69 |
@Override
|
| 73 | 70 |
public boolean isSomeDataComputed() {
|
| ... | ... | @@ -103,7 +100,7 @@ public class TripImpl extends TripAbstract { |
| 103 | 100 |
public boolean isLevel2Computed() {
|
| 104 | 101 |
if (level2Computed == null) {
|
| 105 | 102 |
level2Computed = false;
|
| 106 |
- if (!isActivityEmpty()) {
|
|
| 103 |
+ if (isActivityNotEmpty()) {
|
|
| 107 | 104 |
for (Activity a : getActivity()) {
|
| 108 | 105 |
Boolean b = a.getUseMeanStratumCompositionN2();
|
| 109 | 106 |
if (b != null) {
|
| ... | ... | @@ -121,7 +118,7 @@ public class TripImpl extends TripAbstract { |
| 121 | 118 |
public boolean isLevel3Computed() {
|
| 122 | 119 |
if (level3Computed == null) {
|
| 123 | 120 |
level3Computed = false;
|
| 124 |
- if (!isActivityEmpty()) {
|
|
| 121 |
+ if (isActivityNotEmpty()) {
|
|
| 125 | 122 |
for (Activity a : getActivity()) {
|
| 126 | 123 |
Boolean b = a.getUseMeanStratumCompositionN3();
|
| 127 | 124 |
if (b != null) {
|
| ... | ... | @@ -147,38 +144,10 @@ public class TripImpl extends TripAbstract { |
| 147 | 144 |
return result;
|
| 148 | 145 |
}
|
| 149 | 146 |
|
| 150 |
- // only used for avdth import
|
|
| 151 |
- @Override
|
|
| 152 |
- public int getLogBookAvailability() {
|
|
| 153 |
- return logBookAvailability;
|
|
| 154 |
- }
|
|
| 155 |
- |
|
| 156 |
- // only used for avdth import
|
|
| 157 |
- @Override
|
|
| 158 |
- public void setLogBookAvailability(int logbookAvaibility) {
|
|
| 159 |
- this.logBookAvailability = logbookAvaibility;
|
|
| 160 |
- }
|
|
| 161 |
- |
|
| 162 |
- // /** @return the sum of all activities set duration in hours. */
|
|
| 163 |
-// @Override
|
|
| 164 |
-// public float getTotalSetsDuration() {
|
|
| 165 |
-// float result = 0;
|
|
| 166 |
-// if (!isActivityEmpty()) {
|
|
| 167 |
-// for (Activity activity : getActivity()) {
|
|
| 168 |
-//
|
|
| 169 |
-// // get the setDuration
|
|
| 170 |
-// Float setTime = activity.getSetDuration();
|
|
| 171 |
-//
|
|
| 172 |
-// result += setTime == null ? 0f : setTime;
|
|
| 173 |
-// }
|
|
| 174 |
-// }
|
|
| 175 |
-// return result / 60;
|
|
| 176 |
-// }
|
|
| 177 |
- |
|
| 178 | 147 |
@Override
|
| 179 | 148 |
public float getElementaryCatchTotalWeight(Collection<Species> species) {
|
| 180 | 149 |
float result = 0;
|
| 181 |
- if (!isActivityEmpty()) {
|
|
| 150 |
+ if (isActivityNotEmpty()) {
|
|
| 182 | 151 |
for (Activity activity : getActivity()) {
|
| 183 | 152 |
result += activity.getElementaryCatchTotalWeight(species);
|
| 184 | 153 |
}
|
| ... | ... | @@ -189,7 +158,7 @@ public class TripImpl extends TripAbstract { |
| 189 | 158 |
@Override
|
| 190 | 159 |
public float getElementaryCatchTotalWeightRf1(Collection<Species> species) {
|
| 191 | 160 |
float result = 0;
|
| 192 |
- if (getRf1() != null && !isActivityEmpty()) {
|
|
| 161 |
+ if (getRf1() != null && isActivityNotEmpty()) {
|
|
| 193 | 162 |
for (Activity activity : getActivity()) {
|
| 194 | 163 |
|
| 195 | 164 |
if (activity.isElementaryCatchEmpty()) {
|
| ... | ... | @@ -211,7 +180,7 @@ public class TripImpl extends TripAbstract { |
| 211 | 180 |
@Override
|
| 212 | 181 |
public float getElementaryCatchTotalWeightRf2(Collection<Species> species) {
|
| 213 | 182 |
float result = 0;
|
| 214 |
- if (getRf1() != null && !isActivityEmpty()) {
|
|
| 183 |
+ if (getRf1() != null && isActivityNotEmpty()) {
|
|
| 215 | 184 |
for (Activity activity : getActivity()) {
|
| 216 | 185 |
|
| 217 | 186 |
if (activity.isElementaryCatchEmpty()) {
|
| ... | ... | @@ -246,7 +215,7 @@ public class TripImpl extends TripAbstract { |
| 246 | 215 |
@Override
|
| 247 | 216 |
public float getElementaryLandingTotalWeight(Collection<Species> species) {
|
| 248 | 217 |
float result = 0;
|
| 249 |
- if (!isElementaryLandingEmpty()) {
|
|
| 218 |
+ if (isElementaryLandingNotEmpty()) {
|
|
| 250 | 219 |
for (ElementaryLanding elementaryLanding : getElementaryLanding()) {
|
| 251 | 220 |
if (species.contains(elementaryLanding.getWeightCategoryLanding().getSpecies())) {
|
| 252 | 221 |
result += elementaryLanding.getWeight();
|
| ... | ... | @@ -260,7 +229,7 @@ public class TripImpl extends TripAbstract { |
| 260 | 229 |
@Override
|
| 261 | 230 |
public Set<Species> getElementaryCatchSpecies() {
|
| 262 | 231 |
Set<Species> result = new HashSet<>();
|
| 263 |
- if (!isActivityEmpty()) {
|
|
| 232 |
+ if (isActivityNotEmpty()) {
|
|
| 264 | 233 |
for (Activity activity : getActivity()) {
|
| 265 | 234 |
if (!activity.isElementaryCatchEmpty()) {
|
| 266 | 235 |
for (ElementaryCatch aCatch : activity.getElementaryCatch()) {
|
| ... | ... | @@ -275,7 +244,7 @@ public class TripImpl extends TripAbstract { |
| 275 | 244 |
@Override
|
| 276 | 245 |
public Set<Species> getElementaryLandingSpecies() {
|
| 277 | 246 |
Set<Species> result = new HashSet<>();
|
| 278 |
- if (!isElementaryLandingEmpty()) {
|
|
| 247 |
+ if (isElementaryLandingNotEmpty()) {
|
|
| 279 | 248 |
for (ElementaryLanding landing : getElementaryLanding()) {
|
| 280 | 249 |
result.add(landing.getWeightCategoryLanding().getSpecies());
|
| 281 | 250 |
}
|
| ... | ... | @@ -286,7 +255,7 @@ public class TripImpl extends TripAbstract { |
| 286 | 255 |
@Override
|
| 287 | 256 |
public Set<Ocean> getAllOceans() {
|
| 288 | 257 |
Set<Ocean> result = new HashSet<>();
|
| 289 |
- if (!isActivityEmpty()) {
|
|
| 258 |
+ if (isActivityNotEmpty()) {
|
|
| 290 | 259 |
for (Activity activity : getActivity()) {
|
| 291 | 260 |
result.add(activity.getOcean());
|
| 292 | 261 |
}
|
| ... | ... | @@ -157,10 +157,10 @@ public class DecoratorService extends T3ServiceSupport implements T3ServiceSingl |
| 157 | 157 |
registerJXPathDecorator(locale, Trip.class, WITH_ID, "${vesselLabel}$s - ${landingDate}$td/%2$tm/%2$tY [${topiaId}$s]");
|
| 158 | 158 |
|
| 159 | 159 |
// trip (with topiaid) decorator
|
| 160 |
- registerJXPathDecorator(locale, CompleteTrip.class, "${landingTrip/vesselLabel}$s - ${landingTrip/landingDate}$td/%2$tm/%2$tY (nb trip(s) ${nbTrips}$s)");
|
|
| 160 |
+ registerJXPathDecorator(locale, CompleteTrip.class, "${landingTrip/vesselLabel}$s - ${departureTrip/departureDate}$td/%2$tm/%2$tY - ${landingTrip/landingDate}$td/%3$tm/%3$tY (nb trip(s) ${nbTrips}$s)");
|
|
| 161 | 161 |
|
| 162 | 162 |
// trip (with topiaid) decorator
|
| 163 |
- registerJXPathDecorator(locale, CompleteTrip.class, WITH_ID, "${landingTrip/vesselLabel}$s - ${landingTrip/landingDate}$td/%2$tm/%2$tY [${landingTrip/topiaId}$s] (nb trip(s) ${nbTrips}$s)");
|
|
| 163 |
+ registerJXPathDecorator(locale, CompleteTrip.class, WITH_ID, "${landingTrip/vesselLabel}$s - ${departureTrip/departureDate}$td/%2$tm/%2$tY - ${landingTrip/landingDate}$td/%3$tm/%3$tY [${landingTrip/topiaId}$s] (nb trip(s) ${nbTrips}$s)");
|
|
| 164 | 164 |
|
| 165 | 165 |
// well (with topiaid) decorator
|
| 166 | 166 |
registerJXPathDecorator(locale, Well.class, "Number ${wellNumber}$s - Position ${wellPosition}$s [${topiaId}$s]");
|
| 1 |
+package fr.ird.t3.services.migration;
|
|
| 2 |
+ |
|
| 3 |
+/*-
|
|
| 4 |
+ * #%L
|
|
| 5 |
+ * T3 :: Domain
|
|
| 6 |
+ * %%
|
|
| 7 |
+ * Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
|
|
| 8 |
+ * %%
|
|
| 9 |
+ * This program is free software: you can redistribute it and/or modify
|
|
| 10 |
+ * it under the terms of the GNU Affero General Public License as published by
|
|
| 11 |
+ * the Free Software Foundation, either version 3 of the License, or
|
|
| 12 |
+ * (at your option) any later version.
|
|
| 13 |
+ *
|
|
| 14 |
+ * This program is distributed in the hope that it will be useful,
|
|
| 15 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 16 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 17 |
+ * GNU General Public License for more details.
|
|
| 18 |
+ *
|
|
| 19 |
+ * You should have received a copy of the GNU Affero General Public License
|
|
| 20 |
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
| 21 |
+ * #L%
|
|
| 22 |
+ */
|
|
| 23 |
+ |
|
| 24 |
+import com.google.auto.service.AutoService;
|
|
| 25 |
+import org.nuiton.topia.migration.TopiaMigrationCallbackByClassNG;
|
|
| 26 |
+import org.nuiton.topia.persistence.TopiaException;
|
|
| 27 |
+import org.nuiton.topia.persistence.support.TopiaSqlSupport;
|
|
| 28 |
+import org.nuiton.version.Versions;
|
|
| 29 |
+ |
|
| 30 |
+import java.util.List;
|
|
| 31 |
+ |
|
| 32 |
+/**
|
|
| 33 |
+ * Created by tchemit on 03/03/2018.
|
|
| 34 |
+ *
|
|
| 35 |
+ * @author Tony Chemit - dev@tchemit.fr
|
|
| 36 |
+ */
|
|
| 37 |
+@AutoService(TopiaMigrationCallbackByClassNG.MigrationCallBackForVersion.class)
|
|
| 38 |
+public class T3MigrationCallbackV2_7 extends T3MigrationCallbackSupport {
|
|
| 39 |
+ |
|
| 40 |
+ public T3MigrationCallbackV2_7() {
|
|
| 41 |
+ super(Versions.valueOf("2.7"));
|
|
| 42 |
+ }
|
|
| 43 |
+ |
|
| 44 |
+ @Override
|
|
| 45 |
+ protected void prepareMigrationScript(TopiaSqlSupport sqlSupport, List<String> queries, boolean showSql, boolean showProgression) throws TopiaException {
|
|
| 46 |
+ addScript("01", "add-trip-logbookAvailability", queries);
|
|
| 47 |
+ }
|
|
| 48 |
+ |
|
| 49 |
+}
|
| 1 |
+---
|
|
| 2 |
+-- #%L
|
|
| 3 |
+-- T3 :: Domain
|
|
| 4 |
+-- %%
|
|
| 5 |
+-- Copyright (C) 2010 - 2018 IRD, Code Lutin, Ultreia.io
|
|
| 6 |
+-- %%
|
|
| 7 |
+-- This program is free software: you can redistribute it and/or modify
|
|
| 8 |
+-- it under the terms of the GNU Affero General Public License as published by
|
|
| 9 |
+-- the Free Software Foundation, either version 3 of the License, or
|
|
| 10 |
+-- (at your option) any later version.
|
|
| 11 |
+--
|
|
| 12 |
+-- This program is distributed in the hope that it will be useful,
|
|
| 13 |
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
| 14 |
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
| 15 |
+-- GNU General Public License for more details.
|
|
| 16 |
+--
|
|
| 17 |
+-- You should have received a copy of the GNU Affero General Public License
|
|
| 18 |
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
| 19 |
+-- #L%
|
|
| 20 |
+---
|
|
| 21 |
+ALTER TABLE Trip ADD COLUMN logBookAvailability int default 0 NOT NULL;
|
|
| 22 |
+ |
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 |
model.tagValue.notGenerateToString=true
|
| 22 | 22 |
model.tagValue.generateOperatorForDAOHelper=true
|
| 23 | 23 |
model.tagValue.constantPrefix=PROPERTY_
|
| 24 |
-model.tagValue.version=2.5
|
|
| 24 |
+model.tagValue.version=2.7
|
|
| 25 | 25 |
model.tagValue.indexForeignKeys=true
|
| 26 | 26 |
|
| 27 | 27 |
fr.ird.t3.entities.reference.WeightCategoryLogBookConversion.attribute.distributions.stereotype=ordered
|
No preview for this file type
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-input-avdthv33</artifactId>
|
| ... | ... | @@ -276,7 +276,7 @@ public class T3AccessEntityMetaProviderAvdth33 implements T3AccessEntityMetaProv |
| 276 | 276 |
Trip.PROPERTY_FALSE_FISHES_WEIGHT, Float.class, "V_POIDS_FP",
|
| 277 | 277 |
Trip.PROPERTY_LANDING_TOTAL_WEIGHT, Float.class, "V_POIDS_DBQ",
|
| 278 | 278 |
Trip.PROPERTY_FISH_HOLD_EMPTY, Integer.class, "F_CAL_VID",
|
| 279 |
- Trip.PROPERTY_LOG_BOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 279 |
+ Trip.PROPERTY_LOGBOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 280 | 280 |
);
|
| 281 | 281 |
|
| 282 | 282 |
// OPERA : [C_OPERA, L_OP8L, L_OPERA]
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-input-avdthv35</artifactId>
|
| ... | ... | @@ -303,7 +303,7 @@ public class T3AccessEntityMetaProviderAvdth35 implements T3AccessEntityMetaProv |
| 303 | 303 |
Trip.PROPERTY_FALSE_FISHES_WEIGHT, Float.class, "V_POIDS_FP",
|
| 304 | 304 |
Trip.PROPERTY_LANDING_TOTAL_WEIGHT, Float.class, "V_POIDS_DBQ",
|
| 305 | 305 |
Trip.PROPERTY_FISH_HOLD_EMPTY, Integer.class, "F_CAL_VID",
|
| 306 |
- Trip.PROPERTY_LOG_BOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 306 |
+ Trip.PROPERTY_LOGBOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 307 | 307 |
);
|
| 308 | 308 |
|
| 309 | 309 |
// FP_LOT : [C_BAT, D_DBQ, N_LOT, C_ESP, C_COND, , V_POIDS_PESE, L_ORIGINE, L_COM]
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-input-avdthv36</artifactId>
|
| ... | ... | @@ -306,7 +306,7 @@ public class T3AccessEntityMetaProviderAvdth36 implements T3AccessEntityMetaProv |
| 306 | 306 |
Trip.PROPERTY_FALSE_FISHES_WEIGHT, Float.class, "V_POIDS_FP",
|
| 307 | 307 |
Trip.PROPERTY_LANDING_TOTAL_WEIGHT, Float.class, "V_POIDS_DBQ",
|
| 308 | 308 |
Trip.PROPERTY_FISH_HOLD_EMPTY, Integer.class, "F_CAL_VID",
|
| 309 |
- Trip.PROPERTY_LOG_BOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 309 |
+ Trip.PROPERTY_LOGBOOK_AVAILABILITY, Integer.class, "F_ENQ"
|
|
| 310 | 310 |
);
|
| 311 | 311 |
|
| 312 | 312 |
// FP_LOT : [C_BAT, D_DBQ, N_LOT, C_ESP, C_COND, , V_POIDS_PESE, L_ORIGINE, L_COM]
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-installer</artifactId>
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-msaccess-importer</artifactId>
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-output-balbayav32</artifactId>
|
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 |
<parent>
|
| 25 | 25 |
<groupId>fr.ird.t3</groupId>
|
| 26 | 26 |
<artifactId>ird-t3</artifactId>
|
| 27 |
- <version>2.6</version>
|
|
| 27 |
+ <version>2.7</version>
|
|
| 28 | 28 |
</parent>
|
| 29 | 29 |
|
| 30 | 30 |
<artifactId>t3-web</artifactId>
|
| ... | ... | @@ -39,6 +39,7 @@ import org.nuiton.util.ZipUtil; |
| 39 | 39 |
import java.io.File;
|
| 40 | 40 |
import java.io.IOException;
|
| 41 | 41 |
import java.io.InputStream;
|
| 42 |
+import java.nio.charset.StandardCharsets;
|
|
| 42 | 43 |
import java.util.Arrays;
|
| 43 | 44 |
import java.util.Collections;
|
| 44 | 45 |
import java.util.Enumeration;
|
| ... | ... | @@ -154,8 +155,8 @@ public class ConfigureImportDataAction extends AbstractConfigureAction<AnalyzeIn |
| 154 | 155 |
File targetDirectory = getTreatmentDirectory();
|
| 155 | 156 |
String filename = getSourceToLoadFileName();
|
| 156 | 157 |
if (ZipUtil.isZipFile(upload)) {
|
| 157 |
- // let's decompress input stream it
|
|
| 158 |
- ZipFile zipfile = new ZipFile(upload);
|
|
| 158 |
+ // let's decompress input stream it (always in iso 8869_1)
|
|
| 159 |
+ ZipFile zipfile = new ZipFile(upload, StandardCharsets.ISO_8859_1);
|
|
| 159 | 160 |
Enumeration<? extends ZipEntry> entries = zipfile.entries();
|
| 160 | 161 |
if (!entries.hasMoreElements()) {
|
| 161 | 162 |
String message = t("t3.error.required.one.entry.in.zip.to.upload");
|
| ... | ... | @@ -166,7 +167,7 @@ public class ConfigureImportDataAction extends AbstractConfigureAction<AnalyzeIn |
| 166 | 167 |
// get first entry
|
| 167 | 168 |
ZipEntry zipEntry = entries.nextElement();
|
| 168 | 169 |
// keep the filename of the zip entry
|
| 169 |
- filename = zipEntry.getName();
|
|
| 170 |
+ filename = new String(zipEntry.getName().getBytes(),StandardCharsets.ISO_8859_1);
|
|
| 170 | 171 |
File target = new File(targetDirectory, filename);
|
| 171 | 172 |
log.info(String.format("Will copy loaded zipped entry file %s to treatment configuration directory %s", filename, target));
|
| 172 | 173 |
try (InputStream in = zipfile.getInputStream(zipEntry)) {
|
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 |
<parent>
|
| 27 | 27 |
<groupId>fr.ird.t3</groupId>
|
| 28 | 28 |
<artifactId>ird-t3</artifactId>
|
| 29 |
- <version>2.6</version>
|
|
| 29 |
+ <version>2.7</version>
|
|
| 30 | 30 |
</parent>
|
| 31 | 31 |
|
| 32 | 32 |
<artifactId>t3</artifactId>
|