Tony CHEMIT pushed to branch develop-9.0.x at ultreiaio / ird-observe Commits: ca00c3d3 by Tony Chemit at 2023-03-10T17:27:27+01:00 Imperfection sur le rapport Observations - Dénombrement des captures selon le type d'association, filtrées par groupe et mode (rejeté/conservé) - Closes #2640 - - - - - 2 changed files: - core/persistence/report/src/main/resources/observe-reports.properties - model/src/main/resources/observe-reports-legacy.properties Changes: ===================================== core/persistence/report/src/main/resources/observe-reports.properties ===================================== @@ -1095,7 +1095,7 @@ Join t.routeObs r \ Join r.activity a \ Join a.set c \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ @@ -1107,7 +1107,8 @@ 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.speciesFate.discard = :discardMode \ +Join c.catches ca with ca.totalCount Is Not Null \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.faoCode @@ -1131,7 +1132,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -1151,7 +1152,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -1171,7 +1172,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -1195,7 +1196,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -1374,7 +1375,7 @@ Join t.routeObs r \ Join r.activity a \ Join a.set c \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ @@ -1386,7 +1387,8 @@ 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.speciesFate.discard = :discardMode \ +Join c.catches ca with ca.catchWeight Is Not Null \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.faoCode @@ -1410,7 +1412,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -1430,7 +1432,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -1450,7 +1452,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -1474,7 +1476,7 @@ Join m.routeObs r \ Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode, \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ ===================================== model/src/main/resources/observe-reports-legacy.properties ===================================== @@ -590,7 +590,7 @@ Join t.routeObs r \ Join r.activity a \ Join a.set c \ Join c.catches ca with ca.catchWeight Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ @@ -601,7 +601,8 @@ 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.speciesFate.discard = :discardMode \ +Join c.catches ca with ca.catchWeight Is Not Null \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.faoCode @@ -625,7 +626,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.catchWeight Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -643,7 +644,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.catchWeight Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -661,7 +662,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.catchWeight Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -683,7 +684,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.catchWeight Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -721,7 +722,7 @@ Join t.routeObs r \ Join r.activity a \ Join a.set c \ Join c.catches ca with ca.totalCount Is Not Null \ -Join ca.speciesFate sf with sf.discard = :discardMode \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e \ Join e.speciesGroup sg \ Where t.id In :tripId \ @@ -732,7 +733,8 @@ 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.speciesFate.discard = :discardMode \ +Join c.catches ca with ca.totalCount Is Not Null \ +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \ Join ca.species e with e.speciesGroup.id = :speciesGroup \ Where t.id In :tripId \ Order By e.faoCode @@ -756,7 +758,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.totalCount Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -774,7 +776,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \ Join c.catches ca with ca.totalCount Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os, \ SpeciesImpl e \ Where \ @@ -792,7 +794,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.totalCount Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ @@ -814,7 +816,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re Join r.activity a \ Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \ Join c.catches ca with ca.totalCount Is Not Null \ - Join ca.speciesFate sf with sf.discard = :discardMode, \ + Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \ ObservedSystemImpl os1, \ ObservedSystemImpl os2, \ ObservedSystemImpl os3, \ View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/ca00c3d358414d6fb1afefcb40... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/ca00c3d358414d6fb1afefcb40... You're receiving this email because of your account on gitlab.com.