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

Commits:

11 changed files:

Changes:

  • core/api/dto/src/main/resources/observe-reports.properties
    ... ... @@ -889,10 +889,10 @@ report.psObservationCatch.request.3.repeat=speciesId|column
    889 889
     ################################################################################
    
    890 890
     ## Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe
    
    891 891
     ################################################################################
    
    892
    -report.psObservationCatchTotalCountByGroup.modelType=PS
    
    893
    -report.psObservationCatchTotalCountByGroup.name=Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe
    
    894
    -report.psObservationCatchTotalCountByGroup.description=Afficher les nombres de captures par groupe d'espèce selon le type de banc et le devenir, filtré par groupe
    
    895
    -report.psObservationCatchTotalCountByGroup.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    892
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.modelType=PS
    
    893
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.name=Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe
    
    894
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.description=Afficher les nombres de captures par groupe d'espèce selon le type de banc et le devenir, filtré par groupe
    
    895
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    896 896
     Select distinct sg \
    
    897 897
     From TripImpl t \
    
    898 898
     Join t.routeObs r \
    
    ... ... @@ -903,7 +903,7 @@ Join ca.species e \
    903 903
     Join e.speciesGroup sg \
    
    904 904
     Where t.id In :tripId \
    
    905 905
     Order By sg.code
    
    906
    -report.psObservationCatchTotalCountByGroup.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    906
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    907 907
     Select distinct e \
    
    908 908
     From TripImpl t \
    
    909 909
     Join t.routeObs r \
    
    ... ... @@ -913,11 +913,11 @@ Join c.catches ca with ca.totalCount Is Not Null \
    913 913
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    914 914
     Where t.id In :tripId \
    
    915 915
     Order By e.homeId
    
    916
    -report.psObservationCatchTotalCountByGroup.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\
    
    916
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\
    
    917 917
     Select sf \
    
    918 918
     From SpeciesFateImpl sf \
    
    919 919
     Order by sf.discard, sf.code
    
    920
    -report.psObservationCatchTotalCountByGroup.request.1=0,0|row|\
    
    920
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.request.1=0,0|row|\
    
    921 921
       Select \
    
    922 922
         concat(\
    
    923 923
           '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \
    
    ... ... @@ -934,7 +934,7 @@ report.psObservationCatchTotalCountByGroup.request.1=0,0|row|\
    934 934
       Where m.id In :tripId \
    
    935 935
       Group by e \
    
    936 936
       Order By e.homeId
    
    937
    -report.psObservationCatchTotalCountByGroup.operations.1=ExecuteRequestAndReorganizeCountByRepeatVariable:species|speciesFate|\
    
    937
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|speciesFate|\
    
    938 938
     Select \
    
    939 939
     s.id, sf.id, Sum(ca.totalCount) \
    
    940 940
     From TripImpl m \
    
    ... ... @@ -947,27 +947,27 @@ Join ca.speciesFate sf with sf.id In :speciesFate \
    947 947
     Where m.id In :tripId \
    
    948 948
     Group by s, sf \
    
    949 949
     Order By s.homeId
    
    950
    -report.psObservationCatchTotalCountByGroup.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate
    
    951
    -report.psObservationCatchTotalCountByGroup.operations.3=SumIntRow:1|3
    
    952
    -report.psObservationCatchTotalCountByGroup.operations.4=SumIntColumn:1|1
    
    950
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate
    
    951
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.3=SumIntRow:1|3
    
    952
    +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.4=SumIntColumn:1|1
    
    953 953
     ################################################################################
    
    954 954
     ## Poids des captures par groupe d'espèces
    
    955 955
     ################################################################################
    
    956
    -report.psObservationCatchWeightByGroup.modelType=PS
    
    957
    -report.psObservationCatchWeightByGroup.name=Observations - Poids des captures par type de banc et devenir, filtrés par groupe
    
    958
    -report.psObservationCatchWeightByGroup.description=Afficher le poids de captures par groupe d'espèce selon le type de banc et le devenir, filtrés par groupe
    
    959
    -report.psObservationCatchWeightByGroup.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    956
    +report.psObservationCatchWeightByGroupPerSpeciesFate.modelType=PS
    
    957
    +report.psObservationCatchWeightByGroupPerSpeciesFate.name=Observations - Poids des captures par type de banc et devenir, filtrés par groupe
    
    958
    +report.psObservationCatchWeightByGroupPerSpeciesFate.description=Afficher le poids de captures par groupe d'espèce selon le type de banc et le devenir, filtrés par groupe
    
    959
    +report.psObservationCatchWeightByGroupPerSpeciesFate.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    960 960
     Select distinct sg \
    
    961 961
     From TripImpl t \
    
    962 962
     Join t.routeObs r \
    
    963 963
     Join r.activity a \
    
    964 964
     Join a.set c \
    
    965
    -Join c.catches ca with ca.totalCount Is Not Null \
    
    965
    +Join c.catches ca with ca.catchWeight Is Not Null \
    
    966 966
     Join ca.species e \
    
    967 967
     Join e.speciesGroup sg \
    
    968 968
     Where t.id In :tripId \
    
    969 969
     Order By sg.code
    
    970
    -report.psObservationCatchWeightByGroup.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    970
    +report.psObservationCatchWeightByGroupPerSpeciesFate.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    971 971
     Select distinct e \
    
    972 972
     From TripImpl t \
    
    973 973
     Join t.routeObs r \
    
    ... ... @@ -977,11 +977,11 @@ Join c.catches ca with ca.catchWeight Is Not Null \
    977 977
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    978 978
     Where t.id In :tripId \
    
    979 979
     Order By e.homeId
    
    980
    -report.psObservationCatchWeightByGroup.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\
    
    980
    +report.psObservationCatchWeightByGroupPerSpeciesFate.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\
    
    981 981
     Select sf \
    
    982 982
     From SpeciesFateImpl sf \
    
    983 983
     Order by sf.discard, sf.code
    
    984
    -report.psObservationCatchWeightByGroup.request.1=0,0|row|\
    
    984
    +report.psObservationCatchWeightByGroupPerSpeciesFate.request.1=0,0|row|\
    
    985 985
       Select \
    
    986 986
         concat(\
    
    987 987
           '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \
    
    ... ... @@ -998,7 +998,7 @@ report.psObservationCatchWeightByGroup.request.1=0,0|row|\
    998 998
       Where m.id In :tripId \
    
    999 999
       Group by e \
    
    1000 1000
       Order By e.homeId
    
    1001
    -report.psObservationCatchWeightByGroup.operations.1=ExecuteRequestAndReorganizeCountByRepeatVariable:species|speciesFate|\
    
    1001
    +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|speciesFate|\
    
    1002 1002
     Select \
    
    1003 1003
     s.id, sf.id, Sum(ca.catchWeight) \
    
    1004 1004
     From TripImpl m \
    
    ... ... @@ -1011,9 +1011,137 @@ Join ca.speciesFate sf with sf.id In :speciesFate \
    1011 1011
     Where m.id In :tripId \
    
    1012 1012
     Group by s, sf \
    
    1013 1013
     Order By s.homeId
    
    1014
    -report.psObservationCatchWeightByGroup.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate
    
    1015
    -report.psObservationCatchWeightByGroup.operations.3=SumIntRow:1|3
    
    1016
    -report.psObservationCatchWeightByGroup.operations.4=SumIntColumn:1|1
    
    1014
    +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate
    
    1015
    +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.3=SumIntRow:1|3
    
    1016
    +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.4=SumIntColumn:1|1
    
    1017
    +################################################################################
    
    1018
    +## Poids des captures par groupe d'espèces, type de banc et et raison de rejet
    
    1019
    +################################################################################
    
    1020
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.modelType=PS
    
    1021
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.name=Observations - Poids des rejets par type de banc et raison de rejet, filtrés par groupe
    
    1022
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.description=Afficher le poids de captures rejetées par espèce selon le type de banc et type de rejet, filtrés par groupe
    
    1023
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    1024
    +Select distinct sg \
    
    1025
    +From TripImpl t \
    
    1026
    +Join t.routeObs r \
    
    1027
    +Join r.activity a \
    
    1028
    +Join a.set c \
    
    1029
    +Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1030
    +Join ca.species e \
    
    1031
    +Join e.speciesGroup sg \
    
    1032
    +Where t.id In :tripId \
    
    1033
    +Order By sg.code
    
    1034
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    1035
    +Select distinct e \
    
    1036
    +From TripImpl t \
    
    1037
    +Join t.routeObs r \
    
    1038
    +Join r.activity a \
    
    1039
    +Join a.set c \
    
    1040
    +Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1041
    +Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    1042
    +Where t.id In :tripId \
    
    1043
    +Order By e.homeId
    
    1044
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.repeatVariable.2.reasonForDiscard=fr.ird.observe.entities.referential.ps.observation.ReasonForDiscard|\
    
    1045
    +Select sf \
    
    1046
    +From ReasonForDiscardImpl sf \
    
    1047
    +Order by sf.code
    
    1048
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.request.1=0,0|row|\
    
    1049
    +  Select \
    
    1050
    +    concat(\
    
    1051
    +      '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \
    
    1052
    +      ' [sc]', (case when e.scientificLabel is not null then e.scientificLabel else '-' end), \
    
    1053
    +      ' [fr]', (case when e.label2 is not null then e.label2 else '-' end)), \
    
    1054
    +    Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#2' then ca.catchWeight else 0 end), \
    
    1055
    +    Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#1' then ca.catchWeight else 0 end) \
    
    1056
    +  From TripImpl m \
    
    1057
    +  Join m.routeObs r \
    
    1058
    +  Join r.activity a \
    
    1059
    +  Join a.set c \
    
    1060
    +  Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1061
    +  Join ca.species e with e.id In :species \
    
    1062
    +  Where m.id In :tripId \
    
    1063
    +  Group by e \
    
    1064
    +  Order By e.homeId
    
    1065
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|reasonForDiscard|\
    
    1066
    +Select \
    
    1067
    +s.id, sf.id, Sum(ca.catchWeight) \
    
    1068
    +From TripImpl m \
    
    1069
    +Join m.routeObs r \
    
    1070
    +Join r.activity a \
    
    1071
    +Join a.set c \
    
    1072
    +Join c.catches ca with ca.catchWeight Is Not Null \
    
    1073
    +Join ca.species s with s.id In :species \
    
    1074
    +Join ca.reasonForDiscard sf with sf.id In :reasonForDiscard \
    
    1075
    +Where m.id In :tripId \
    
    1076
    +Group by s, sf \
    
    1077
    +Order By s.homeId
    
    1078
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|reasonForDiscard
    
    1079
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.3=SumIntRow:1|3
    
    1080
    +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.4=SumIntColumn:1|1
    
    1081
    +################################################################################
    
    1082
    +## Dénombrement des rejets par groupe d'espèces, type de banc et raison de rejet
    
    1083
    +################################################################################
    
    1084
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.modelType=PS
    
    1085
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.name=Observations - Dénombrement des rejets par type de banc et raison de rejet, filtrés par groupe
    
    1086
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.description=Afficher le nombre de captures rejetées par espèce selon le type de banc et le type de rejet, filtrés par groupe
    
    1087
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\
    
    1088
    +Select distinct sg \
    
    1089
    +From TripImpl t \
    
    1090
    +Join t.routeObs r \
    
    1091
    +Join r.activity a \
    
    1092
    +Join a.set c \
    
    1093
    +Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1094
    +Join ca.species e \
    
    1095
    +Join e.speciesGroup sg \
    
    1096
    +Where t.id In :tripId \
    
    1097
    +Order By sg.code
    
    1098
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\
    
    1099
    +Select distinct e \
    
    1100
    +From TripImpl t \
    
    1101
    +Join t.routeObs r \
    
    1102
    +Join r.activity a \
    
    1103
    +Join a.set c \
    
    1104
    +Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1105
    +Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    1106
    +Where t.id In :tripId \
    
    1107
    +Order By e.homeId
    
    1108
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.repeatVariable.2.reasonForDiscard=fr.ird.observe.entities.referential.ps.observation.ReasonForDiscard|\
    
    1109
    +Select sf \
    
    1110
    +From ReasonForDiscardImpl sf \
    
    1111
    +Order by sf.code
    
    1112
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.request.1=0,0|row|\
    
    1113
    +  Select \
    
    1114
    +    concat(\
    
    1115
    +      '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \
    
    1116
    +      ' [sc]', (case when e.scientificLabel is not null then e.scientificLabel else '-' end), \
    
    1117
    +      ' [fr]', (case when e.label2 is not null then e.label2 else '-' end)), \
    
    1118
    +    Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#2' then ca.totalCount else 0 end), \
    
    1119
    +    Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#1' then ca.totalCount else 0 end) \
    
    1120
    +  From TripImpl m \
    
    1121
    +  Join m.routeObs r \
    
    1122
    +  Join r.activity a \
    
    1123
    +  Join a.set c \
    
    1124
    +  Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \
    
    1125
    +  Join ca.species e with e.id In :species \
    
    1126
    +  Where m.id In :tripId \
    
    1127
    +  Group by e \
    
    1128
    +  Order By e.homeId
    
    1129
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|reasonForDiscard|\
    
    1130
    +Select \
    
    1131
    +s.id, sf.id, Sum(ca.totalCount) \
    
    1132
    +From TripImpl m \
    
    1133
    +Join m.routeObs r \
    
    1134
    +Join r.activity a \
    
    1135
    +Join a.set c \
    
    1136
    +Join c.catches ca with ca.totalCount Is Not Null \
    
    1137
    +Join ca.species s with s.id In :species \
    
    1138
    +Join ca.reasonForDiscard sf with sf.id In :reasonForDiscard \
    
    1139
    +Where m.id In :tripId \
    
    1140
    +Group by s, sf \
    
    1141
    +Order By s.homeId
    
    1142
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|reasonForDiscard
    
    1143
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.3=SumIntRow:1|3
    
    1144
    +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.4=SumIntColumn:1|1
    
    1017 1145
     ###########################################################
    
    1018 1146
     ## Distribution des tailles par espèces et type de mesure
    
    1019 1147
     ###########################################################
    
    ... ... @@ -1050,7 +1178,7 @@ Join nts.sampleMeasure ntl with ntl.species.id = :species And ntl.sizeMeasureTyp
    1050 1178
     Where t.id In :tripId \
    
    1051 1179
     Order By ntl.length
    
    1052 1180
     report.psObservationLengthsDistribution.operations.1=CopyRepeatVariableToFirstColumn:length
    
    1053
    -report.psObservationLengthsDistribution.operations.2=ExecuteRequestAndReorganizeCountByRepeatVariable:length|speciesFate|\
    
    1181
    +report.psObservationLengthsDistribution.operations.2=ExecuteRequestAndReorganizeDataByRepeatVariable:length|speciesFate|\
    
    1054 1182
     Select ntl.length, sf.id, sum(ntl.count) \
    
    1055 1183
     From TripImpl t \
    
    1056 1184
     Join t.routeObs r \
    

  • core/services/local/src/test/java/fr/ird/observe/services/local/service/ReportServiceLocalReadTest.java
    ... ... @@ -37,13 +37,26 @@ public class ReportServiceLocalReadTest extends GeneratedReportServiceLocalReadT
    37 37
         }
    
    38 38
     
    
    39 39
         @Test
    
    40
    -    public void executeReportPsObservationCatchTotalCountByGroup() {
    
    40
    +    public void executeReportPsObservationCatchTotalCountByGroupPerSpeciesFate() {
    
    41 41
             ReportService service = getService();
    
    42
    -        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroup");
    
    42
    +        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroupPerSpeciesFate");
    
    43 43
         }
    
    44
    +
    
    45
    +    @Test
    
    46
    +    public void executeReportPsObservationCatchWeightByGroupPerSpeciesFate() {
    
    47
    +        ReportService service = getService();
    
    48
    +        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroupPerSpeciesFate");
    
    49
    +    }
    
    50
    +
    
    51
    +    @Test
    
    52
    +    public void executeReportPsObservationCatchWeightByGroupPerReasonForDiscard() {
    
    53
    +        ReportService service = getService();
    
    54
    +        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroupPerReasonForDiscard");
    
    55
    +    }
    
    56
    +
    
    44 57
         @Test
    
    45
    -    public void executeReportPsObservationCatchWeightByGroup() {
    
    58
    +    public void executeReportPsObservationCatchTotalCountByGroupPerReasonForDiscard() {
    
    46 59
             ReportService service = getService();
    
    47
    -        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroup");
    
    60
    +        fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroupPerReasonForDiscard");
    
    48 61
         }
    
    49 62
     }

  • core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerReasonForDiscardReportFixture.java
    1
    +package fr.ird.observe.services.service.report.ps;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe Core :: Services :: Test
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2022 IRD, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (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 General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +import com.google.auto.service.AutoService;
    
    26
    +import fr.ird.observe.dto.report.Report;
    
    27
    +import fr.ird.observe.dto.report.ReportRequest;
    
    28
    +import fr.ird.observe.services.service.ReportFixture;
    
    29
    +
    
    30
    +import java.util.Iterator;
    
    31
    +
    
    32
    +/**
    
    33
    + * Created on 05/12/2022.
    
    34
    + *
    
    35
    + * @author Tony Chemit - dev@tchemit.fr
    
    36
    + * @since 9.0.22
    
    37
    + */
    
    38
    +@AutoService(ReportFixture.class)
    
    39
    +public class PsObservationCatchTotalCountByGroupPerReasonForDiscardReportFixture  extends ReportFixture {
    
    40
    +
    
    41
    +    @Override
    
    42
    +    public void assertSyntax(Report report) {
    
    43
    +        super.assertSyntax(report);
    
    44
    +        Iterator<ReportRequest> requests = getRequestIterator(report);
    
    45
    +        assertReportRequestDimension(requests, ReportRequest.RequestLayout.row, 0, 0);
    
    46
    +    }
    
    47
    +
    
    48
    +    @Override
    
    49
    +    protected void setVariables(Report report) {
    
    50
    +        setVariableValue(report, "speciesGroup", "fr.ird.referential.common.SpeciesGroup#1239832683689#0.7120116158620075");
    
    51
    +    }
    
    52
    +}
    
    53
    +

  • core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupReportFixture.javacore/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerSpeciesFateReportFixture.java
    ... ... @@ -35,7 +35,7 @@ import java.util.Iterator;
    35 35
      * @since 1.9
    
    36 36
      */
    
    37 37
     @AutoService(ReportFixture.class)
    
    38
    -public class PsObservationCatchTotalCountByGroupReportFixture extends ReportFixture {
    
    38
    +public class PsObservationCatchTotalCountByGroupPerSpeciesFateReportFixture extends ReportFixture {
    
    39 39
     
    
    40 40
         @Override
    
    41 41
         public void assertSyntax(Report report) {
    

  • core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerReasonForDiscardReportFixture.java
    1
    +package fr.ird.observe.services.service.report.ps;
    
    2
    +
    
    3
    +/*-
    
    4
    + * #%L
    
    5
    + * ObServe Core :: Services :: Test
    
    6
    + * %%
    
    7
    + * Copyright (C) 2008 - 2022 IRD, Ultreia.io
    
    8
    + * %%
    
    9
    + * This program is free software: you can redistribute it and/or modify
    
    10
    + * it under the terms of the GNU General Public License as
    
    11
    + * published by the Free Software Foundation, either version 3 of the
    
    12
    + * License, or (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 General Public
    
    20
    + * License along with this program.  If not, see
    
    21
    + * <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    22
    + * #L%
    
    23
    + */
    
    24
    +
    
    25
    +import com.google.auto.service.AutoService;
    
    26
    +import fr.ird.observe.dto.report.Report;
    
    27
    +import fr.ird.observe.dto.report.ReportRequest;
    
    28
    +import fr.ird.observe.services.service.ReportFixture;
    
    29
    +
    
    30
    +import java.util.Iterator;
    
    31
    +
    
    32
    +/**
    
    33
    + * Created on 05/12/2022.
    
    34
    + *
    
    35
    + * @author Tony Chemit - dev@tchemit.fr
    
    36
    + * @since 9.0.22
    
    37
    + */
    
    38
    +@AutoService(ReportFixture.class)
    
    39
    +public class PsObservationCatchWeightByGroupPerReasonForDiscardReportFixture  extends ReportFixture {
    
    40
    +
    
    41
    +    @Override
    
    42
    +    public void assertSyntax(Report report) {
    
    43
    +        super.assertSyntax(report);
    
    44
    +        Iterator<ReportRequest> requests = getRequestIterator(report);
    
    45
    +        assertReportRequestDimension(requests, ReportRequest.RequestLayout.row, 0, 0);
    
    46
    +    }
    
    47
    +
    
    48
    +    @Override
    
    49
    +    protected void setVariables(Report report) {
    
    50
    +        setVariableValue(report, "speciesGroup", "fr.ird.referential.common.SpeciesGroup#1239832683689#0.7120116158620075");
    
    51
    +    }
    
    52
    +}

  • core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupReportFixture.javacore/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerSpeciesFateReportFixture.java
    ... ... @@ -36,7 +36,7 @@ import java.util.Iterator;
    36 36
      * @since 9.0.22
    
    37 37
      */
    
    38 38
     @AutoService(ReportFixture.class)
    
    39
    -public class PsObservationCatchWeightByGroupReportFixture extends ReportFixture {
    
    39
    +public class PsObservationCatchWeightByGroupPerSpeciesFateReportFixture extends ReportFixture {
    
    40 40
     
    
    41 41
         @Override
    
    42 42
         public void assertSyntax(Report report) {
    

  • core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroupPerReasonForDiscard.properties
    1
    +###
    
    2
    +# #%L
    
    3
    +# ObServe Core :: Services :: Test
    
    4
    +# %%
    
    5
    +# Copyright (C) 2008 - 2022 IRD, Ultreia.io
    
    6
    +# %%
    
    7
    +# This program is free software: you can redistribute it and/or modify
    
    8
    +# it under the terms of the GNU General Public License as
    
    9
    +# published by the Free Software Foundation, either version 3 of the
    
    10
    +# License, or (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 General Public
    
    18
    +# License along with this program.  If not, see
    
    19
    +# <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +# #L%
    
    21
    +###
    
    22
    +syntax.name=Observations - Dénombrement des rejets par type de banc et raison de rejet, filtrés par groupe
    
    23
    +syntax.description=Afficher le nombre de captures rejetées par espèce selon le type de banc et le type de rejet, filtrés par groupe
    
    24
    +syntax.rows=-1
    
    25
    +syntax.columns=-1
    
    26
    +syntax.columnsHeader=
    
    27
    +syntax.rowsHeader=
    
    28
    +syntax.nbRequests=1
    
    29
    +result.columns=9
    
    30
    +result.rows=2
    
    31
    +result.0=Espèce^Total BL^Total BO^Espèce non désirée ou protégée^Taille^Cuve pleine^Poisson abîmé ou impropre à la consommation humaine^Autre ( à préciser dans les notes )^Total
    
    32
    +result.1=[FAO]ALV [sc]Alopias vulpinus [fr]Renard^0^3^null^null^3^null^null^3
    \ No newline at end of file

  • core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroup.propertiescore/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroupPerSpeciesFate.properties

  • core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchWeightByGroupPerReasonForDiscard.properties
    1
    +###
    
    2
    +# #%L
    
    3
    +# ObServe Core :: Services :: Test
    
    4
    +# %%
    
    5
    +# Copyright (C) 2008 - 2022 IRD, Ultreia.io
    
    6
    +# %%
    
    7
    +# This program is free software: you can redistribute it and/or modify
    
    8
    +# it under the terms of the GNU General Public License as
    
    9
    +# published by the Free Software Foundation, either version 3 of the
    
    10
    +# License, or (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 General Public
    
    18
    +# License along with this program.  If not, see
    
    19
    +# <http://www.gnu.org/licenses/gpl-3.0.html>.
    
    20
    +# #L%
    
    21
    +###
    
    22
    +syntax.name=Observations - Poids des rejets par type de banc et raison de rejet, filtrés par groupe
    
    23
    +syntax.description=Afficher le poids de captures rejetées par espèce selon le type de banc et type de rejet, filtrés par groupe
    
    24
    +syntax.rows=-1
    
    25
    +syntax.columns=-1
    
    26
    +syntax.columnsHeader=
    
    27
    +syntax.rowsHeader=
    
    28
    +syntax.nbRequests=1
    
    29
    +result.columns=9
    
    30
    +result.rows=2
    
    31
    +result.0=Espèce^Total BL^Total BO^Espèce non désirée ou protégée^Taille^Cuve pleine^Poisson abîmé ou impropre à la consommation humaine^Autre ( à préciser dans les notes )^Total
    
    32
    +result.1=[FAO]ALV [sc]Alopias vulpinus [fr]Renard^0.0^12.0^null^null^12.0^null^null^12
    \ No newline at end of file

  • core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchWeightByGroup.propertiescore/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchWeightByGroupPerSpeciesFate.properties

  • toolkit/api/src/main/java/fr/ird/observe/dto/report/operations/ExecuteRequestAndReorganizeCountByRepeatVariable.javatoolkit/api/src/main/java/fr/ird/observe/dto/report/operations/ExecuteRequestAndReorganizeDataByRepeatVariable.java
    ... ... @@ -46,7 +46,7 @@ import java.util.Set;
    46 46
      * @since 9.0.17
    
    47 47
      */
    
    48 48
     @AutoService(ReportOperationConsumer.class)
    
    49
    -public class ExecuteRequestAndReorganizeCountByRepeatVariable implements ReportOperationConsumer {
    
    49
    +public class ExecuteRequestAndReorganizeDataByRepeatVariable implements ReportOperationConsumer {
    
    50 50
     
    
    51 51
         @Override
    
    52 52
         public DataMatrix consume(String parameters, ReportRequestExecutor requestExecutor, Report report, Set<String> tripId, DataMatrix incoming) {