Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: cdfa26c2 by Tony Chemit at 2022-12-05T21:22:47+01:00 Report - ajout du report psObservationCatchWeightByGroupPerReasonForDiscard - - - - - 03028d1f by Tony Chemit at 2022-12-05T21:22:47+01:00 Report - fix psObservationCatchWeightByGroup speciesGroup variable request - - - - - ded96bef by Tony Chemit at 2022-12-05T21:22:47+01:00 Report - ajout du report psObservationCatchTotalCountByGroupPerReasonForDiscard - - - - - e07b4510 by Tony Chemit at 2022-12-05T21:22:47+01:00 Report - renommage du report psObservationCatchTotalCountByGroup en psObservationCatchTotalCountByGroupPerSpeciesFate - - - - - ffd0eed7 by Tony Chemit at 2022-12-05T21:22:48+01:00 Report - renommage du report psObservationCatchWeightByGroup en psObservationCatchWeightByGroupPerSpeciesFate - - - - - d332c07a by Tony Chemit at 2022-12-05T21:22:48+01:00 Report - renommage opération ExecuteRequestAndReorganizeCountByRepeatVariable en ExecuteRequestAndReorganizeDataByRepeatVariable - - - - - ee6fc362 by Tony Chemit at 2022-12-05T21:23:03+01:00 Merge branch 'feature/issue_2555' into develop Besoin d'un rapport Observations fournissant les poids par raisons de rejets - Closes #2555 - - - - - 11 changed files: - core/api/dto/src/main/resources/observe-reports.properties - core/services/local/src/test/java/fr/ird/observe/services/local/service/ReportServiceLocalReadTest.java - + core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerReasonForDiscardReportFixture.java - core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupReportFixture.java → core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerSpeciesFateReportFixture.java - + core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerReasonForDiscardReportFixture.java - core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupReportFixture.java → core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerSpeciesFateReportFixture.java - + core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroupPerReasonForDiscard.properties - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroup.properties → core/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 - core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchWeightByGroup.properties → core/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.java → toolkit/api/src/main/java/fr/ird/observe/dto/report/operations/ExecuteRequestAndReorganizeDataByRepeatVariable.java Changes: ===================================== core/api/dto/src/main/resources/observe-reports.properties ===================================== @@ -889,10 +889,10 @@ report.psObservationCatch.request.3.repeat=speciesId|column ################################################################################ ## Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe ################################################################################ -report.psObservationCatchTotalCountByGroup.modelType=PS -report.psObservationCatchTotalCountByGroup.name=Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe -report.psObservationCatchTotalCountByGroup.description=Afficher les nombres de captures par groupe d'espèce selon le type de banc et le devenir, filtré par groupe -report.psObservationCatchTotalCountByGroup.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ +report.psObservationCatchTotalCountByGroupPerSpeciesFate.modelType=PS +report.psObservationCatchTotalCountByGroupPerSpeciesFate.name=Observations - Dénombrement des captures par type de banc et devenir, filtrés par groupe +report.psObservationCatchTotalCountByGroupPerSpeciesFate.description=Afficher les nombres de captures par groupe d'espèce selon le type de banc et le devenir, filtré par groupe +report.psObservationCatchTotalCountByGroupPerSpeciesFate.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ Select distinct sg \ From TripImpl t \ Join t.routeObs r \ @@ -903,7 +903,7 @@ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ Order By sg.code -report.psObservationCatchTotalCountByGroup.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ +report.psObservationCatchTotalCountByGroupPerSpeciesFate.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ Select distinct e \ From TripImpl t \ Join t.routeObs r \ @@ -913,11 +913,11 @@ Join c.catches ca with ca.totalCount Is Not Null \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.homeId -report.psObservationCatchTotalCountByGroup.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\ +report.psObservationCatchTotalCountByGroupPerSpeciesFate.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\ Select sf \ From SpeciesFateImpl sf \ Order by sf.discard, sf.code -report.psObservationCatchTotalCountByGroup.request.1=0,0|row|\ +report.psObservationCatchTotalCountByGroupPerSpeciesFate.request.1=0,0|row|\ Select \ concat(\ '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \ @@ -934,7 +934,7 @@ report.psObservationCatchTotalCountByGroup.request.1=0,0|row|\ Where m.id In :tripId \ Group by e \ Order By e.homeId -report.psObservationCatchTotalCountByGroup.operations.1=ExecuteRequestAndReorganizeCountByRepeatVariable:species|speciesFate|\ +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|speciesFate|\ Select \ s.id, sf.id, Sum(ca.totalCount) \ From TripImpl m \ @@ -947,27 +947,27 @@ Join ca.speciesFate sf with sf.id In :speciesFate \ Where m.id In :tripId \ Group by s, sf \ Order By s.homeId -report.psObservationCatchTotalCountByGroup.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate -report.psObservationCatchTotalCountByGroup.operations.3=SumIntRow:1|3 -report.psObservationCatchTotalCountByGroup.operations.4=SumIntColumn:1|1 +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.3=SumIntRow:1|3 +report.psObservationCatchTotalCountByGroupPerSpeciesFate.operations.4=SumIntColumn:1|1 ################################################################################ ## Poids des captures par groupe d'espèces ################################################################################ -report.psObservationCatchWeightByGroup.modelType=PS -report.psObservationCatchWeightByGroup.name=Observations - Poids des captures par type de banc et devenir, filtrés par groupe -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 -report.psObservationCatchWeightByGroup.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ +report.psObservationCatchWeightByGroupPerSpeciesFate.modelType=PS +report.psObservationCatchWeightByGroupPerSpeciesFate.name=Observations - Poids des captures par type de banc et devenir, filtrés par groupe +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 +report.psObservationCatchWeightByGroupPerSpeciesFate.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ Select distinct sg \ From TripImpl t \ Join t.routeObs r \ Join r.activity a \ Join a.set c \ -Join c.catches ca with ca.totalCount Is Not Null \ +Join c.catches ca with ca.catchWeight Is Not Null \ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ Order By sg.code -report.psObservationCatchWeightByGroup.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ +report.psObservationCatchWeightByGroupPerSpeciesFate.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ Select distinct e \ From TripImpl t \ Join t.routeObs r \ @@ -977,11 +977,11 @@ Join c.catches ca with ca.catchWeight Is Not Null \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.homeId -report.psObservationCatchWeightByGroup.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\ +report.psObservationCatchWeightByGroupPerSpeciesFate.repeatVariable.2.speciesFate=fr.ird.observe.entities.referential.ps.common.SpeciesFate|\ Select sf \ From SpeciesFateImpl sf \ Order by sf.discard, sf.code -report.psObservationCatchWeightByGroup.request.1=0,0|row|\ +report.psObservationCatchWeightByGroupPerSpeciesFate.request.1=0,0|row|\ Select \ concat(\ '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \ @@ -998,7 +998,7 @@ report.psObservationCatchWeightByGroup.request.1=0,0|row|\ Where m.id In :tripId \ Group by e \ Order By e.homeId -report.psObservationCatchWeightByGroup.operations.1=ExecuteRequestAndReorganizeCountByRepeatVariable:species|speciesFate|\ +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|speciesFate|\ Select \ s.id, sf.id, Sum(ca.catchWeight) \ From TripImpl m \ @@ -1011,9 +1011,137 @@ Join ca.speciesFate sf with sf.id In :speciesFate \ Where m.id In :tripId \ Group by s, sf \ Order By s.homeId -report.psObservationCatchWeightByGroup.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate -report.psObservationCatchWeightByGroup.operations.3=SumIntRow:1|3 -report.psObservationCatchWeightByGroup.operations.4=SumIntColumn:1|1 +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|speciesFate +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.3=SumIntRow:1|3 +report.psObservationCatchWeightByGroupPerSpeciesFate.operations.4=SumIntColumn:1|1 +################################################################################ +## Poids des captures par groupe d'espèces, type de banc et et raison de rejet +################################################################################ +report.psObservationCatchWeightByGroupPerReasonForDiscard.modelType=PS +report.psObservationCatchWeightByGroupPerReasonForDiscard.name=Observations - Poids des rejets par type de banc et raison de rejet, filtrés par groupe +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 +report.psObservationCatchWeightByGroupPerReasonForDiscard.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ +Select distinct sg \ +From TripImpl t \ +Join t.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \ +Join ca.species e \ +Join e.speciesGroup sg \ +Where t.id In :tripId \ +Order By sg.code +report.psObservationCatchWeightByGroupPerReasonForDiscard.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ +Select distinct e \ +From TripImpl t \ +Join t.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \ +Join ca.species e with e.speciesGroup.id = :speciesGroup \ +Where t.id In :tripId \ +Order By e.homeId +report.psObservationCatchWeightByGroupPerReasonForDiscard.repeatVariable.2.reasonForDiscard=fr.ird.observe.entities.referential.ps.observation.ReasonForDiscard|\ +Select sf \ +From ReasonForDiscardImpl sf \ +Order by sf.code +report.psObservationCatchWeightByGroupPerReasonForDiscard.request.1=0,0|row|\ + Select \ + concat(\ + '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \ + ' [sc]', (case when e.scientificLabel is not null then e.scientificLabel else '-' end), \ + ' [fr]', (case when e.label2 is not null then e.label2 else '-' end)), \ + Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#2' then ca.catchWeight else 0 end), \ + Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#1' then ca.catchWeight else 0 end) \ + From TripImpl m \ + Join m.routeObs r \ + Join r.activity a \ + Join a.set c \ + Join c.catches ca with ca.catchWeight Is Not Null And ca.reasonForDiscard Is Not Null \ + Join ca.species e with e.id In :species \ + Where m.id In :tripId \ + Group by e \ + Order By e.homeId +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|reasonForDiscard|\ +Select \ +s.id, sf.id, Sum(ca.catchWeight) \ +From TripImpl m \ +Join m.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.catchWeight Is Not Null \ +Join ca.species s with s.id In :species \ +Join ca.reasonForDiscard sf with sf.id In :reasonForDiscard \ +Where m.id In :tripId \ +Group by s, sf \ +Order By s.homeId +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|reasonForDiscard +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.3=SumIntRow:1|3 +report.psObservationCatchWeightByGroupPerReasonForDiscard.operations.4=SumIntColumn:1|1 +################################################################################ +## Dénombrement des rejets par groupe d'espèces, type de banc et raison de rejet +################################################################################ +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.modelType=PS +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.name=Observations - Dénombrement des rejets par type de banc et raison de rejet, filtrés par groupe +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 +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.variable.speciesGroup=fr.ird.observe.dto.referential.common.SpeciesGroupDto|\ +Select distinct sg \ +From TripImpl t \ +Join t.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \ +Join ca.species e \ +Join e.speciesGroup sg \ +Where t.id In :tripId \ +Order By sg.code +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.repeatVariable.1.species=fr.ird.observe.entities.referential.common.Species|\ +Select distinct e \ +From TripImpl t \ +Join t.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \ +Join ca.species e with e.speciesGroup.id = :speciesGroup \ +Where t.id In :tripId \ +Order By e.homeId +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.repeatVariable.2.reasonForDiscard=fr.ird.observe.entities.referential.ps.observation.ReasonForDiscard|\ +Select sf \ +From ReasonForDiscardImpl sf \ +Order by sf.code +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.request.1=0,0|row|\ + Select \ + concat(\ + '[FAO]', (case when e.faoCode is not null then e.faoCode else '-' end), \ + ' [sc]', (case when e.scientificLabel is not null then e.scientificLabel else '-' end), \ + ' [fr]', (case when e.label2 is not null then e.label2 else '-' end)), \ + Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#2' then ca.totalCount else 0 end), \ + Sum(case c.schoolType.id when 'fr.ird.referential.ps.common.SchoolType#0#1' then ca.totalCount else 0 end) \ + From TripImpl m \ + Join m.routeObs r \ + Join r.activity a \ + Join a.set c \ + Join c.catches ca with ca.totalCount Is Not Null And ca.reasonForDiscard Is Not Null \ + Join ca.species e with e.id In :species \ + Where m.id In :tripId \ + Group by e \ + Order By e.homeId +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.1=ExecuteRequestAndReorganizeDataByRepeatVariable:species|reasonForDiscard|\ +Select \ +s.id, sf.id, Sum(ca.totalCount) \ +From TripImpl m \ +Join m.routeObs r \ +Join r.activity a \ +Join a.set c \ +Join c.catches ca with ca.totalCount Is Not Null \ +Join ca.species s with s.id In :species \ +Join ca.reasonForDiscard sf with sf.id In :reasonForDiscard \ +Where m.id In :tripId \ +Group by s, sf \ +Order By s.homeId +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.2=ComputeDynamicHeader:Espèce,Total BL,Total BO|reasonForDiscard +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.3=SumIntRow:1|3 +report.psObservationCatchTotalCountByGroupPerReasonForDiscard.operations.4=SumIntColumn:1|1 ########################################################### ## Distribution des tailles par espèces et type de mesure ########################################################### @@ -1050,7 +1178,7 @@ Join nts.sampleMeasure ntl with ntl.species.id = :species And ntl.sizeMeasureTyp Where t.id In :tripId \ Order By ntl.length report.psObservationLengthsDistribution.operations.1=CopyRepeatVariableToFirstColumn:length -report.psObservationLengthsDistribution.operations.2=ExecuteRequestAndReorganizeCountByRepeatVariable:length|speciesFate|\ +report.psObservationLengthsDistribution.operations.2=ExecuteRequestAndReorganizeDataByRepeatVariable:length|speciesFate|\ Select ntl.length, sf.id, sum(ntl.count) \ From TripImpl t \ 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 } @Test - public void executeReportPsObservationCatchTotalCountByGroup() { + public void executeReportPsObservationCatchTotalCountByGroupPerSpeciesFate() { ReportService service = getService(); - fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroup"); + fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroupPerSpeciesFate"); } + + @Test + public void executeReportPsObservationCatchWeightByGroupPerSpeciesFate() { + ReportService service = getService(); + fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroupPerSpeciesFate"); + } + + @Test + public void executeReportPsObservationCatchWeightByGroupPerReasonForDiscard() { + ReportService service = getService(); + fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroupPerReasonForDiscard"); + } + @Test - public void executeReportPsObservationCatchWeightByGroup() { + public void executeReportPsObservationCatchTotalCountByGroupPerReasonForDiscard() { ReportService service = getService(); - fixtures.executeReport(getServicesProvider(), service, "psObservationCatchWeightByGroup"); + fixtures.executeReport(getServicesProvider(), service, "psObservationCatchTotalCountByGroupPerReasonForDiscard"); } } ===================================== core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerReasonForDiscardReportFixture.java ===================================== @@ -0,0 +1,53 @@ +package fr.ird.observe.services.service.report.ps; + +/*- + * #%L + * ObServe Core :: Services :: Test + * %% + * Copyright (C) 2008 - 2022 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.auto.service.AutoService; +import fr.ird.observe.dto.report.Report; +import fr.ird.observe.dto.report.ReportRequest; +import fr.ird.observe.services.service.ReportFixture; + +import java.util.Iterator; + +/** + * Created on 05/12/2022. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.0.22 + */ +@AutoService(ReportFixture.class) +public class PsObservationCatchTotalCountByGroupPerReasonForDiscardReportFixture extends ReportFixture { + + @Override + public void assertSyntax(Report report) { + super.assertSyntax(report); + Iterator<ReportRequest> requests = getRequestIterator(report); + assertReportRequestDimension(requests, ReportRequest.RequestLayout.row, 0, 0); + } + + @Override + protected void setVariables(Report report) { + setVariableValue(report, "speciesGroup", "fr.ird.referential.common.SpeciesGroup#1239832683689#0.7120116158620075"); + } +} + ===================================== core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupReportFixture.java → core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchTotalCountByGroupPerSpeciesFateReportFixture.java ===================================== @@ -35,7 +35,7 @@ import java.util.Iterator; * @since 1.9 */ @AutoService(ReportFixture.class) -public class PsObservationCatchTotalCountByGroupReportFixture extends ReportFixture { +public class PsObservationCatchTotalCountByGroupPerSpeciesFateReportFixture extends ReportFixture { @Override public void assertSyntax(Report report) { ===================================== core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerReasonForDiscardReportFixture.java ===================================== @@ -0,0 +1,52 @@ +package fr.ird.observe.services.service.report.ps; + +/*- + * #%L + * ObServe Core :: Services :: Test + * %% + * Copyright (C) 2008 - 2022 IRD, Ultreia.io + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU 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 General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ + +import com.google.auto.service.AutoService; +import fr.ird.observe.dto.report.Report; +import fr.ird.observe.dto.report.ReportRequest; +import fr.ird.observe.services.service.ReportFixture; + +import java.util.Iterator; + +/** + * Created on 05/12/2022. + * + * @author Tony Chemit - dev@tchemit.fr + * @since 9.0.22 + */ +@AutoService(ReportFixture.class) +public class PsObservationCatchWeightByGroupPerReasonForDiscardReportFixture extends ReportFixture { + + @Override + public void assertSyntax(Report report) { + super.assertSyntax(report); + Iterator<ReportRequest> requests = getRequestIterator(report); + assertReportRequestDimension(requests, ReportRequest.RequestLayout.row, 0, 0); + } + + @Override + protected void setVariables(Report report) { + setVariableValue(report, "speciesGroup", "fr.ird.referential.common.SpeciesGroup#1239832683689#0.7120116158620075"); + } +} ===================================== core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupReportFixture.java → core/services/test/src/main/java/fr/ird/observe/services/service/report/ps/PsObservationCatchWeightByGroupPerSpeciesFateReportFixture.java ===================================== @@ -36,7 +36,7 @@ import java.util.Iterator; * @since 9.0.22 */ @AutoService(ReportFixture.class) -public class PsObservationCatchWeightByGroupReportFixture extends ReportFixture { +public class PsObservationCatchWeightByGroupPerSpeciesFateReportFixture extends ReportFixture { @Override public void assertSyntax(Report report) { ===================================== core/services/test/src/main/resources/fixtures/fr/ird/observe/services/service/ReportService-psObservationCatchTotalCountByGroupPerReasonForDiscard.properties ===================================== @@ -0,0 +1,32 @@ +### +# #%L +# ObServe Core :: Services :: Test +# %% +# Copyright (C) 2008 - 2022 IRD, Ultreia.io +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### +syntax.name=Observations - Dénombrement des rejets par type de banc et raison de rejet, filtrés par groupe +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 +syntax.rows=-1 +syntax.columns=-1 +syntax.columnsHeader= +syntax.rowsHeader= +syntax.nbRequests=1 +result.columns=9 +result.rows=2 +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 +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.properties → core/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 ===================================== @@ -0,0 +1,32 @@ +### +# #%L +# ObServe Core :: Services :: Test +# %% +# Copyright (C) 2008 - 2022 IRD, Ultreia.io +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/gpl-3.0.html>. +# #L% +### +syntax.name=Observations - Poids des rejets par type de banc et raison de rejet, filtrés par groupe +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 +syntax.rows=-1 +syntax.columns=-1 +syntax.columnsHeader= +syntax.rowsHeader= +syntax.nbRequests=1 +result.columns=9 +result.rows=2 +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 +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.properties → core/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.java → toolkit/api/src/main/java/fr/ird/observe/dto/report/operations/ExecuteRequestAndReorganizeDataByRepeatVariable.java ===================================== @@ -46,7 +46,7 @@ import java.util.Set; * @since 9.0.17 */ @AutoService(ReportOperationConsumer.class) -public class ExecuteRequestAndReorganizeCountByRepeatVariable implements ReportOperationConsumer { +public class ExecuteRequestAndReorganizeDataByRepeatVariable implements ReportOperationConsumer { @Override public DataMatrix consume(String parameters, ReportRequestExecutor requestExecutor, Report report, Set<String> tripId, DataMatrix incoming) { View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/c83e69d18c66b158044ce87fc... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/c83e69d18c66b158044ce87fc... You're receiving this email because of your account on gitlab.com.