Tony CHEMIT pushed to branch develop at ultreiaio / ird-t3

Commits:

5 changed files:

Changes:

  • t3-actions/src/main/java/fr/ird/t3/actions/data/level0/ComputeRF1Action.java
    ... ... @@ -467,13 +467,14 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati
    467 467
             // do the computation of rf1 for all trips of the complete trip
    
    468 468
             float sumLanding = 0;
    
    469 469
             float sumCatch = 0;
    
    470
    +        float sumLocalMarket = 0;
    
    471
    +        float sumLocalMarketDetailled = 0;
    
    470 472
     
    
    471 473
             for (Trip trip : completeTrip) {
    
    472 474
     
    
    473 475
                 String tripStr = decorate(trip, DecoratorService.WITH_ID);
    
    474 476
                 if (log.isDebugEnabled()) {
    
    475
    -                log.debug("Start count for trip " +
    
    476
    -                          tripStr);
    
    477
    +                log.debug("Start count for trip " + tripStr);
    
    477 478
                 }
    
    478 479
     
    
    479 480
                 float elementaryLandingTotalWeight =
    
    ... ... @@ -507,20 +508,24 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati
    507 508
                     );
    
    508 509
                 }
    
    509 510
     
    
    511
    +            float localMarketTotalWeight = trip.getFalseFishesWeight();
    
    512
    +            float localMarketTotalWeightDetailled = trip.getLocalMarketBatchTotalWeight(speciesList);
    
    513
    +
    
    510 514
                 addInfoMessage(l(locale, "t3.level0.computeRF1.resume.for.trip",
    
    511
    -                              tripStr, elementaryCatchTotalWeight,
    
    512
    -                              elementaryLandingTotalWeight)
    
    513
    -            );
    
    515
    +                    tripStr, elementaryCatchTotalWeight, elementaryLandingTotalWeight,
    
    516
    +                    localMarketTotalWeight, localMarketTotalWeightDetailled));
    
    514 517
     
    
    515 518
                 if (log.isDebugEnabled()) {
    
    516
    -                log.debug("elementaryLandingTotalWeight = " +
    
    517
    -                          elementaryLandingTotalWeight);
    
    518
    -                log.debug("elementaryCatchTotalWeight = " +
    
    519
    -                          elementaryCatchTotalWeight);
    
    519
    +                log.debug("elementaryLandingTotalWeight    = " + elementaryLandingTotalWeight);
    
    520
    +                log.debug("elementaryCatchTotalWeight      = " + elementaryCatchTotalWeight);
    
    521
    +                log.debug("localMarketTotalWeight          = " + localMarketTotalWeight);
    
    522
    +                log.debug("localMarketTotalWeightDetailled = " + localMarketTotalWeightDetailled);
    
    520 523
                 }
    
    521 524
     
    
    522 525
                 sumLanding += elementaryLandingTotalWeight;
    
    523 526
                 sumCatch += elementaryCatchTotalWeight;
    
    527
    +            sumLocalMarket += localMarketTotalWeight;
    
    528
    +            sumLocalMarketDetailled += localMarketTotalWeightDetailled;
    
    524 529
             }
    
    525 530
     
    
    526 531
             float rf1 = 1;
    
    ... ... @@ -533,8 +538,7 @@ public class ComputeRF1Action extends AbstractLevel0Action<ComputeRF1Configurati
    533 538
     
    
    534 539
             addInfoMessage(
    
    535 540
                     l(locale, "t3.level0.computeRF1.resume.for.complete.trip",
    
    536
    -                   sumCatch, sumLanding, rf1)
    
    537
    -        );
    
    541
    +                        sumCatch, sumLanding, sumLocalMarket, sumLocalMarketDetailled, rf1));
    
    538 542
     
    
    539 543
             return rf1;
    
    540 544
         }
    

  • t3-actions/src/main/resources/i18n/t3-actions_en_GB.properties
    ... ... @@ -20,8 +20,8 @@ t3.input.ImportInputSource=Input Data Import
    20 20
     t3.level0.action=Level 0 Operation\: %s
    
    21 21
     t3.level0.computeActivitySetDurationAndPositiveSetCount=%s, set duration\: %s, positiveSetCount\: %s
    
    22 22
     t3.level0.computeRF1.complete.trips.to.use.for.vessel=Found %s complete trip(s) for vessel %s
    
    23
    -t3.level0.computeRF1.resume.for.complete.trip=Total catches weight %s / Total landing weight %s / RF1 \= %s
    
    24
    -t3.level0.computeRF1.resume.for.trip=Trip %s, Total catches weight %s / Total landing weight %s
    
    23
    +t3.level0.computeRF1.resume.for.complete.trip=Total catches weight %s / Total landing weight %s / Total local market weight %s / Detailled total local market weight %s / RF1 \= %s
    
    24
    +t3.level0.computeRF1.resume.for.trip=Trip %s, Total catches weight %s / Total landing weight %s / Total local market weight %s / Detailled total local market weight %s
    
    25 25
     t3.level0.computeRF1.resume.rf1.for.trip=Trip %s, rf1 to use %s
    
    26 26
     t3.level0.computeRF1.resume.rf2.for.trip=Trip %s, rf2 to use %s
    
    27 27
     t3.level0.computeRF1.species.to.use=Will use %s species \: %s
    

  • t3-actions/src/main/resources/i18n/t3-actions_fr_FR.properties
    ... ... @@ -20,8 +20,8 @@ t3.input.ImportInputSource=Import de données
    20 20
     t3.level0.action=Opération du niveau 0 \: %s
    
    21 21
     t3.level0.computeActivitySetDurationAndPositiveSetCount=%s, durée de calée \: %s, positiveSetCount \: %s
    
    22 22
     t3.level0.computeRF1.complete.trips.to.use.for.vessel=%s marée(s) complète(s) trouvées pour le navire %s
    
    23
    -t3.level0.computeRF1.resume.for.complete.trip=Poids total capturé %s / Poids total vendu %s / RF1 \= %s
    
    24
    -t3.level0.computeRF1.resume.for.trip=Marée %s, Poids total capturé %s / Poids total vendu %s
    
    23
    +t3.level0.computeRF1.resume.for.complete.trip=Poids total capturé %s / Poids total vendu %s / Poids marché local résumé %s / Poids marché local détaillé %s / RF1 \= %s
    
    24
    +t3.level0.computeRF1.resume.for.trip=Marée %s, Poids total capturé %s / Poids total vendu %s / Poids marché local résumé %s / Poids marché local détaillé %s
    
    25 25
     t3.level0.computeRF1.resume.rf1.for.trip=Marée %s, rf1 utilisé %s
    
    26 26
     t3.level0.computeRF1.resume.rf2.for.trip=Marée %s, rf2 utilisé %s
    
    27 27
     t3.level0.computeRF1.species.to.use=%s espèces à utiliser \: %s
    

  • t3-domain/src/main/java/fr/ird/t3/entities/data/TripImpl.java
    ... ... @@ -30,10 +30,10 @@ import fr.ird.t3.entities.reference.Ocean;
    30 30
     import fr.ird.t3.entities.reference.Species;
    
    31 31
     import fr.ird.t3.entities.reference.Vessel;
    
    32 32
     import fr.ird.t3.entities.reference.VesselImpl;
    
    33
    +
    
    33 34
     import java.util.Collection;
    
    34 35
     import java.util.Set;
    
    35 36
     
    
    36
    -
    
    37 37
     import static org.nuiton.i18n.I18n.n;
    
    38 38
     
    
    39 39
     /**
    
    ... ... @@ -191,6 +191,19 @@ public class TripImpl extends TripAbstract {
    191 191
         }
    
    192 192
     
    
    193 193
         @Override
    
    194
    +    public float getLocalMarketBatchTotalWeight(Collection<Species> species) {
    
    195
    +        float result = 0;
    
    196
    +        if (isLocalMarketBatchNotEmpty()) {
    
    197
    +            for (LocalMarketBatch localMarketBatch : getLocalMarketBatch()) {
    
    198
    +                if (species.contains(localMarketBatch.getSpecies()) && localMarketBatch.getWeight() != null) {
    
    199
    +                    result += localMarketBatch.getWeight();
    
    200
    +                }
    
    201
    +            }
    
    202
    +        }
    
    203
    +        return result;
    
    204
    +    }
    
    205
    +
    
    206
    +    @Override
    
    194 207
         public float getElementaryLandingTotalWeight(Collection<Species> species) {
    
    195 208
             float result = 0;
    
    196 209
             if (!isElementaryLandingEmpty()) {
    

  • t3-domain/src/main/xmi/t3-persistence.zargo
    No preview for this file type