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

Commits:

2 changed files:

Changes:

  • core/persistence/report/src/main/resources/observe-reports.properties
    ... ... @@ -1095,7 +1095,7 @@ Join t.routeObs r \
    1095 1095
     Join r.activity a \
    
    1096 1096
     Join a.set c \
    
    1097 1097
     Join c.catches ca with ca.totalCount Is Not Null \
    
    1098
    -Join ca.speciesFate sf with sf.discard = :discardMode \
    
    1098
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    1099 1099
     Join ca.species e \
    
    1100 1100
     Join e.speciesGroup sg \
    
    1101 1101
     Where t.id In :tripId \
    
    ... ... @@ -1107,7 +1107,8 @@ From TripImpl t \
    1107 1107
     Join t.routeObs r \
    
    1108 1108
     Join r.activity a \
    
    1109 1109
     Join a.set c \
    
    1110
    -Join c.catches ca with ca.totalCount Is Not Null And ca.speciesFate.discard = :discardMode \
    
    1110
    +Join c.catches ca with ca.totalCount Is Not Null \
    
    1111
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    1111 1112
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    1112 1113
     Where t.id In :tripId \
    
    1113 1114
     Order By e.faoCode
    
    ... ... @@ -1131,7 +1132,7 @@ Join m.routeObs r \
    1131 1132
     Join r.activity a \
    
    1132 1133
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    1133 1134
     Join c.catches ca with ca.totalCount Is Not Null \
    
    1134
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1135
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1135 1136
     ObservedSystemImpl os, \
    
    1136 1137
     SpeciesImpl e \
    
    1137 1138
     Where \
    
    ... ... @@ -1151,7 +1152,7 @@ Join m.routeObs r \
    1151 1152
     Join r.activity a \
    
    1152 1153
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    1153 1154
     Join c.catches ca with ca.totalCount Is Not Null \
    
    1154
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1155
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1155 1156
     ObservedSystemImpl os, \
    
    1156 1157
     SpeciesImpl e \
    
    1157 1158
     Where \
    
    ... ... @@ -1171,7 +1172,7 @@ Join m.routeObs r \
    1171 1172
     Join r.activity a \
    
    1172 1173
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    1173 1174
     Join c.catches ca with ca.totalCount Is Not Null \
    
    1174
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1175
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1175 1176
     ObservedSystemImpl os1, \
    
    1176 1177
     ObservedSystemImpl os2, \
    
    1177 1178
     ObservedSystemImpl os3, \
    
    ... ... @@ -1195,7 +1196,7 @@ Join m.routeObs r \
    1195 1196
     Join r.activity a \
    
    1196 1197
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    1197 1198
     Join c.catches ca with ca.totalCount Is Not Null \
    
    1198
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1199
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1199 1200
     ObservedSystemImpl os1, \
    
    1200 1201
     ObservedSystemImpl os2, \
    
    1201 1202
     ObservedSystemImpl os3, \
    
    ... ... @@ -1374,7 +1375,7 @@ Join t.routeObs r \
    1374 1375
     Join r.activity a \
    
    1375 1376
     Join a.set c \
    
    1376 1377
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    1377
    -Join ca.speciesFate sf with sf.discard = :discardMode \
    
    1378
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    1378 1379
     Join ca.species e \
    
    1379 1380
     Join e.speciesGroup sg \
    
    1380 1381
     Where t.id In :tripId \
    
    ... ... @@ -1386,7 +1387,8 @@ From TripImpl t \
    1386 1387
     Join t.routeObs r \
    
    1387 1388
     Join r.activity a \
    
    1388 1389
     Join a.set c \
    
    1389
    -Join c.catches ca with ca.catchWeight Is Not Null And ca.speciesFate.discard = :discardMode \
    
    1390
    +Join c.catches ca with ca.catchWeight Is Not Null \
    
    1391
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    1390 1392
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    1391 1393
     Where t.id In :tripId \
    
    1392 1394
     Order By e.faoCode
    
    ... ... @@ -1410,7 +1412,7 @@ Join m.routeObs r \
    1410 1412
     Join r.activity a \
    
    1411 1413
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    1412 1414
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    1413
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1415
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1414 1416
     ObservedSystemImpl os, \
    
    1415 1417
     SpeciesImpl e \
    
    1416 1418
     Where \
    
    ... ... @@ -1430,7 +1432,7 @@ Join m.routeObs r \
    1430 1432
     Join r.activity a \
    
    1431 1433
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    1432 1434
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    1433
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1435
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1434 1436
     ObservedSystemImpl os, \
    
    1435 1437
     SpeciesImpl e \
    
    1436 1438
     Where \
    
    ... ... @@ -1450,7 +1452,7 @@ Join m.routeObs r \
    1450 1452
     Join r.activity a \
    
    1451 1453
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    1452 1454
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    1453
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1455
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1454 1456
     ObservedSystemImpl os1, \
    
    1455 1457
     ObservedSystemImpl os2, \
    
    1456 1458
     ObservedSystemImpl os3, \
    
    ... ... @@ -1474,7 +1476,7 @@ Join m.routeObs r \
    1474 1476
     Join r.activity a \
    
    1475 1477
     Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    1476 1478
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    1477
    -Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    1479
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    1478 1480
     ObservedSystemImpl os1, \
    
    1479 1481
     ObservedSystemImpl os2, \
    
    1480 1482
     ObservedSystemImpl os3, \
    

  • model/src/main/resources/observe-reports-legacy.properties
    ... ... @@ -590,7 +590,7 @@ Join t.routeObs r \
    590 590
     Join r.activity a \
    
    591 591
     Join a.set c \
    
    592 592
     Join c.catches ca with ca.catchWeight Is Not Null \
    
    593
    -Join ca.speciesFate sf with sf.discard = :discardMode \
    
    593
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    594 594
     Join ca.species e \
    
    595 595
     Join e.speciesGroup sg \
    
    596 596
     Where t.id In :tripId \
    
    ... ... @@ -601,7 +601,8 @@ From TripImpl t \
    601 601
     Join t.routeObs r \
    
    602 602
     Join r.activity a \
    
    603 603
     Join a.set c \
    
    604
    -Join c.catches ca with ca.catchWeight Is Not Null And ca.speciesFate.discard = :discardMode \
    
    604
    +Join c.catches ca with ca.catchWeight Is Not Null \
    
    605
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    605 606
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    606 607
     Where t.id In :tripId \
    
    607 608
     Order By e.faoCode
    
    ... ... @@ -625,7 +626,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques
    625 626
       Join r.activity a \
    
    626 627
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    627 628
       Join c.catches ca with ca.catchWeight Is Not Null \
    
    628
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    629
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    629 630
       ObservedSystemImpl os, \
    
    630 631
       SpeciesImpl e \
    
    631 632
       Where \
    
    ... ... @@ -643,7 +644,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques
    643 644
       Join r.activity a \
    
    644 645
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    645 646
       Join c.catches ca with ca.catchWeight Is Not Null \
    
    646
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    647
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    647 648
       ObservedSystemImpl os, \
    
    648 649
       SpeciesImpl e \
    
    649 650
       Where \
    
    ... ... @@ -661,7 +662,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques
    661 662
       Join r.activity a \
    
    662 663
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    663 664
       Join c.catches ca with ca.catchWeight Is Not Null \
    
    664
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    665
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    665 666
       ObservedSystemImpl os1, \
    
    666 667
       ObservedSystemImpl os2, \
    
    667 668
       ObservedSystemImpl os3, \
    
    ... ... @@ -683,7 +684,7 @@ report.psObservationCatchWeightByGroupAndSpeciesFateDiscardPerAssociation.reques
    683 684
       Join r.activity a \
    
    684 685
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    685 686
       Join c.catches ca with ca.catchWeight Is Not Null \
    
    686
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    687
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    687 688
       ObservedSystemImpl os1, \
    
    688 689
       ObservedSystemImpl os2, \
    
    689 690
       ObservedSystemImpl os3, \
    
    ... ... @@ -721,7 +722,7 @@ Join t.routeObs r \
    721 722
     Join r.activity a \
    
    722 723
     Join a.set c \
    
    723 724
     Join c.catches ca with ca.totalCount Is Not Null \
    
    724
    -Join ca.speciesFate sf with sf.discard = :discardMode \
    
    725
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    725 726
     Join ca.species e \
    
    726 727
     Join e.speciesGroup sg \
    
    727 728
     Where t.id In :tripId \
    
    ... ... @@ -732,7 +733,8 @@ From TripImpl t \
    732 733
     Join t.routeObs r \
    
    733 734
     Join r.activity a \
    
    734 735
     Join a.set c \
    
    735
    -Join c.catches ca with ca.totalCount Is Not Null And ca.speciesFate.discard = :discardMode \
    
    736
    +Join c.catches ca with ca.totalCount Is Not Null \
    
    737
    +Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode) \
    
    736 738
     Join ca.species e with e.speciesGroup.id = :speciesGroup \
    
    737 739
     Where t.id In :tripId \
    
    738 740
     Order By e.faoCode
    
    ... ... @@ -756,7 +758,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re
    756 758
       Join r.activity a \
    
    757 759
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    758 760
       Join c.catches ca with ca.totalCount Is Not Null \
    
    759
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    761
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    760 762
       ObservedSystemImpl os, \
    
    761 763
       SpeciesImpl e \
    
    762 764
       Where \
    
    ... ... @@ -774,7 +776,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re
    774 776
       Join r.activity a \
    
    775 777
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#2' \
    
    776 778
       Join c.catches ca with ca.totalCount Is Not Null \
    
    777
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    779
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    778 780
       ObservedSystemImpl os, \
    
    779 781
       SpeciesImpl e \
    
    780 782
       Where \
    
    ... ... @@ -792,7 +794,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re
    792 794
       Join r.activity a \
    
    793 795
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    794 796
       Join c.catches ca with ca.totalCount Is Not Null \
    
    795
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    797
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    796 798
       ObservedSystemImpl os1, \
    
    797 799
       ObservedSystemImpl os2, \
    
    798 800
       ObservedSystemImpl os3, \
    
    ... ... @@ -814,7 +816,7 @@ report.psObservationCatchTotalCountByGroupAndSpeciesFateDiscardPerAssociation.re
    814 816
       Join r.activity a \
    
    815 817
       Join a.set c with c.schoolType.id = 'fr.ird.referential.ps.common.SchoolType#0#1' \
    
    816 818
       Join c.catches ca with ca.totalCount Is Not Null \
    
    817
    -  Join ca.speciesFate sf with sf.discard = :discardMode, \
    
    819
    +  Join ca.speciesFate sf with (:discardMode Is Null and sf.discard Is Null) Or (sf.discard = :discardMode), \
    
    818 820
       ObservedSystemImpl os1, \
    
    819 821
       ObservedSystemImpl os2, \
    
    820 822
       ObservedSystemImpl os3, \