147 Commits

Author SHA1 Message Date
fa0f6c0658 Merge pull request 'reajustement workflow' (#286) from features/fiche_refonte into develop
Reviewed-on: #286
2026-07-31 12:04:41 +00:00
0c0c6c8eb8 Merge pull request 'features/fiche_refonte' (#284) from features/fiche_refonte into develop
Reviewed-on: #284
2026-07-30 13:23:59 +00:00
7d922a0b54 Merge pull request 'reajustement workflow' (#282) from features/fiche_refonte into develop
Reviewed-on: #282
2026-07-29 17:39:26 +00:00
29f2347bf9 Merge pull request 'reajustement workflow' (#280) from features/fiche_refonte into develop
Reviewed-on: #280
2026-07-29 15:21:46 +00:00
3b6a757c43 Merge pull request 'features/fiche_refonte' (#278) from features/fiche_refonte into develop
Reviewed-on: #278
2026-07-28 16:34:35 +00:00
924f8c140a Merge pull request 'reajustement secteur decoupage perimetre' (#276) from features/fiche_refonte into develop
Reviewed-on: #276
2026-07-28 16:10:48 +00:00
d1cbe9c06e Merge pull request 'reajustement secteur decoupage perimetre' (#274) from features/fiche_refonte into develop
Reviewed-on: #274
2026-07-28 13:26:24 +00:00
f2f9ed14ab Merge pull request 'reajustement secteur decoupage perimetre' (#272) from features/fiche_refonte into develop
Reviewed-on: #272
2026-07-27 16:56:37 +00:00
5a5c829805 Merge pull request 'features/fiche_refonte' (#270) from features/fiche_refonte into develop
Reviewed-on: #270
2026-07-27 16:18:24 +00:00
68eaf00e23 Merge pull request 'reajustement secteur decoupage perimetre' (#268) from features/fiche_refonte into develop
Reviewed-on: #268
2026-07-24 15:54:52 +00:00
10155a7f7b Merge pull request 'reajustement secteur decoupage perimetre' (#266) from features/fiche_refonte into develop
Reviewed-on: #266
2026-07-24 15:07:08 +00:00
a5a6eb574a Merge pull request 'reajustement secteur decoupage perimetre' (#264) from features/fiche_refonte into develop
Reviewed-on: #264
2026-07-24 14:15:32 +00:00
e1b9ac8915 Merge pull request 'reajustement secteur decoupage perimetre' (#262) from features/fiche_refonte into develop
Reviewed-on: #262
2026-07-24 13:36:02 +00:00
b135f20152 Merge pull request 'reajustement secteur decoupage perimetre' (#260) from features/fiche_refonte into develop
Reviewed-on: #260
2026-07-24 13:08:12 +00:00
63deb3fb51 Merge pull request 'reajustement secteur decoupage perimetre' (#258) from features/fiche_refonte into develop
Reviewed-on: #258
2026-07-23 10:45:29 +00:00
9acbdc6a9a Merge pull request 'reajustement secteur decoupage perimetre' (#256) from features/fiche_refonte into develop
Reviewed-on: #256
2026-07-23 09:36:47 +00:00
74e38d501a Merge pull request 'features/fiche_refonte' (#254) from features/fiche_refonte into develop
Reviewed-on: #254
2026-07-20 19:33:37 +00:00
4feb9b3e1a Merge pull request 'gestion situation fiscale' (#252) from features/fiche_refonte into develop
Reviewed-on: #252
2026-07-17 14:11:35 +00:00
fd900283c6 Merge pull request 'gestion processus de traitement des declarations de propriete' (#250) from features/fiche_refonte into develop
Reviewed-on: #250
2026-07-10 15:39:42 +00:00
5ea11fe63e Merge pull request 'gestion processus de traitement des declarations de propriete' (#248) from features/fiche_refonte into develop
Reviewed-on: #248
2026-07-09 21:42:13 +00:00
ed4da862f7 Merge pull request 'gestion processus de traitement des declarations de propriete' (#246) from features/fiche_refonte into develop
Reviewed-on: #246
2026-07-09 16:46:31 +00:00
9589395dfe Merge pull request 'gestion processus de traitement des declarations de propriete' (#244) from features/fiche_refonte into develop
Reviewed-on: #244
2026-07-08 15:42:48 +00:00
4779092b3d Merge pull request 'gestion processus reinitialisation de mot de passe' (#242) from features/fiche_refonte into develop
Reviewed-on: #242
2026-07-04 13:32:34 +00:00
b7d884fd68 Merge pull request 'gestion processus reinitialisation de mot de passe' (#240) from features/fiche_refonte into develop
Reviewed-on: #240
2026-07-04 10:38:21 +00:00
3d7cfa0fab Merge pull request 'gestion creation user' (#238) from features/fiche_refonte into develop
Reviewed-on: #238
2026-07-03 18:57:58 +00:00
de86f32f8a Merge pull request 'gestion creation user' (#236) from features/fiche_refonte into develop
Reviewed-on: #236
2026-07-03 15:03:43 +00:00
ea18e61cfa Merge pull request 'gestion creation user' (#234) from features/fiche_refonte into develop
Reviewed-on: #234
2026-07-03 14:38:59 +00:00
d54c11844b Merge pull request 'gestion creation user' (#232) from features/fiche_refonte into develop
Reviewed-on: #232
2026-07-02 15:13:50 +00:00
f4709c1750 Merge pull request 'gestion profil' (#230) from features/fiche_refonte into develop
Reviewed-on: #230
2026-07-01 19:29:04 +00:00
2c09a88a0c Merge pull request 'gestion profil' (#228) from features/fiche_refonte into develop
Reviewed-on: #228
2026-07-01 19:14:43 +00:00
002299ba82 Merge pull request 'gestion parametre frontend' (#226) from features/fiche_refonte into develop
Reviewed-on: #226
2026-06-19 19:00:20 +00:00
590e85964e Merge pull request 'gestion parametre frontend' (#224) from features/fiche_refonte into develop
Reviewed-on: #224
2026-06-19 18:38:54 +00:00
faf56ec592 Merge pull request 'gestion parametre frontend' (#222) from features/fiche_refonte into develop
Reviewed-on: #222
2026-06-18 10:57:19 +00:00
5279da4f31 Merge pull request 'features/fiche_refonte' (#220) from features/fiche_refonte into develop
Reviewed-on: #220
2026-06-17 23:47:38 +00:00
66eef2c669 Merge pull request 'features/fiche_refonte' (#218) from features/fiche_refonte into develop
Reviewed-on: #218
2026-06-12 13:32:53 +00:00
f976beabb8 Merge pull request 'gestion token leger' (#216) from features/fiche_refonte into develop
Reviewed-on: #216
2026-06-05 11:40:21 +00:00
38c0d04a19 Merge pull request 'gestion enum profile' (#214) from features/fiche_refonte into develop
Reviewed-on: #214
2026-06-01 17:35:15 +00:00
6595e003ae Merge pull request 'gestion enum profile' (#212) from features/fiche_refonte into develop
Reviewed-on: #212
2026-06-01 17:22:37 +00:00
a2283a835b Merge pull request 'features/fiche_refonte' (#210) from features/fiche_refonte into develop
Reviewed-on: #210
2026-05-15 12:08:11 +00:00
ea7e693759 Merge pull request 'liquidation pour une parcelle' (#208) from features/fiche_refonte into develop
Reviewed-on: #208
2026-04-30 16:04:27 +00:00
6b954c7467 Merge pull request 'liquidation pour une parcelle' (#206) from features/fiche_refonte into develop
Reviewed-on: #206
2026-04-30 10:32:29 +00:00
2b2805a125 Merge pull request 'liquidation pour une parcelle' (#204) from features/fiche_refonte into develop
Reviewed-on: #204
2026-04-24 15:46:11 +00:00
49aea6e50a Merge pull request 'liquidation pour une parcelle' (#202) from features/fiche_refonte into develop
Reviewed-on: #202
2026-04-24 13:53:38 +00:00
3e105855f0 Merge pull request 'centre assignation et parcelle de contact' (#200) from features/fiche_refonte into develop
Reviewed-on: #200
2026-04-10 14:08:13 +00:00
5b73474192 Merge pull request 'centre assignation' (#198) from features/fiche_refonte into develop
Reviewed-on: #198
2026-04-01 20:03:57 +00:00
13ce1f31e2 Merge pull request 'version finale avec imposition TFU, IRF et SRTB' (#196) from features/fiche_refonte into develop
Reviewed-on: #196
2026-03-24 21:17:26 +00:00
d8dd0ed95e Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#194) from features/fiche_refonte into develop
Reviewed-on: #194
2026-03-23 19:54:16 +00:00
ada442ffa4 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#192) from features/fiche_refonte into develop
Reviewed-on: #192
2026-03-22 18:43:38 +00:00
5d519855a7 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#190) from features/fiche_refonte into develop
Reviewed-on: #190
2026-03-21 20:27:23 +00:00
8bcae0751a Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#188) from features/fiche_refonte into develop
Reviewed-on: #188
2026-03-21 14:59:29 +00:00
34d1502334 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#186) from features/fiche_refonte into develop
Reviewed-on: #186
2026-03-21 14:16:31 +00:00
e2468328fd Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#184) from features/fiche_refonte into develop
Reviewed-on: #184
2026-03-21 10:13:37 +00:00
41e55da1df Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#182) from features/fiche_refonte into develop
Reviewed-on: #182
2026-03-20 13:39:59 +00:00
705af14b4e Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#181) from features/fiche_refonte into develop
Reviewed-on: #181
2026-03-20 13:39:00 +00:00
9063162c33 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#179) from features/fiche_refonte into develop
Reviewed-on: #179
2026-03-19 18:45:31 +00:00
3f9cdcdad3 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#177) from features/fiche_refonte into develop
Reviewed-on: #177
2026-03-19 18:00:14 +00:00
e58e338123 Merge pull request 'features/fiche_refonte' (#175) from features/fiche_refonte into develop
Reviewed-on: #175
2026-03-19 16:15:42 +00:00
253332bbd3 Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#173) from features/fiche_refonte into develop
Reviewed-on: #173
2026-03-19 10:24:32 +00:00
6dcd549889 Merge pull request 'features/fiche_refonte' (#171) from features/fiche_refonte into develop
Reviewed-on: #171
2026-03-18 17:18:14 +00:00
0d27aaebac Merge pull request 'fusion maj parcelle,batiment,ulo et leur enquete' (#169) from features/fiche_refonte into develop
Reviewed-on: #169
2026-03-16 13:27:34 +00:00
afbf525af5 Merge pull request 'Generation tfu batie et non batie avec ressource de liste de données imposition' (#167) from features/crud_entites into develop
Reviewed-on: #167
2026-03-14 14:47:18 +00:00
8ee2f7c9b0 Merge pull request 'Generation tfu batie et non batie avec ressource de liste de données imposition' (#165) from features/crud_entites into develop
Reviewed-on: #165
2026-03-12 20:01:27 +00:00
6bdfa3ad1e Merge pull request 'Generation tfu batie et non batie avec ressource de liste de données imposition' (#163) from features/crud_entites into develop
Reviewed-on: #163
2026-03-12 19:34:04 +00:00
b8ba15c6fb Merge pull request 'Generation tfu batie et non batie' (#161) from features/crud_entites into develop
Reviewed-on: #161
2026-03-12 11:27:12 +00:00
698b7e7c99 Merge pull request 'Generation tfu batie et non batie' (#158) from features/crud_entites into develop
Reviewed-on: #158
2026-03-12 11:06:47 +00:00
9e597386f8 Merge pull request 'Generation tfu batie et non batie' (#156) from features/crud_entites into develop
Reviewed-on: #156
2026-03-12 00:03:12 +00:00
cb2faeea32 Merge pull request 'Generation tfu batie et non batie' (#154) from features/crud_entites into develop
Reviewed-on: #154
2026-03-11 00:10:38 +00:00
6b3ab8fc43 Merge pull request 'Gestion des barem' (#152) from features/crud_entites into develop
Reviewed-on: #152
2026-03-10 21:37:55 +00:00
906a74571f Merge pull request 'features/crud_entites' (#150) from features/crud_entites into develop
Reviewed-on: #150
2026-03-09 20:13:24 +00:00
6494fe235e Merge pull request 'Gestion des barem' (#148) from features/crud_entites into develop
Reviewed-on: #148
2026-03-09 20:00:03 +00:00
28da361054 Merge pull request 'features/crud_entites' (#146) from features/crud_entites into develop
Reviewed-on: #146
2026-03-09 19:32:08 +00:00
3993d28d51 Merge pull request 'features/crud_entites' (#144) from features/crud_entites into develop
Reviewed-on: #144
2026-03-09 18:52:33 +00:00
09d8b21909 Merge pull request 'Gestion des barem' (#142) from features/crud_entites into develop
Reviewed-on: #142
2026-03-08 13:54:26 +00:00
274b47d116 Merge pull request 'Gestion des barem' (#141) from features/crud_entites into develop
Reviewed-on: #141
2026-03-08 13:52:20 +00:00
bdb08b88fd Merge pull request 'Gestion des barem' (#140) from features/crud_entites into develop
Reviewed-on: #140
2026-03-08 13:25:13 +00:00
b86c685cd0 Merge pull request 'Gestion cloture' (#138) from features/crud_entites into develop
Reviewed-on: #138
2026-03-06 19:08:53 +00:00
d46a14626e Merge pull request 'Gestion parcelle geom et changement https://gitea.com/actions/checkout@v4 #actions/checkout@v4' (#136) from features/crud_entites into develop
Reviewed-on: #136
2026-03-01 17:33:59 +00:00
920c70c877 Merge pull request 'Gestion parcelle geom' (#135) from features/crud_entites into develop
Reviewed-on: #135
2026-03-01 17:29:34 +00:00
2ab5b9299c Merge pull request 'Gestion parcelle geom' (#133) from features/crud_entites into develop
Reviewed-on: #133
2026-03-01 01:40:41 +00:00
bf19ab6e6a Merge pull request 'features/crud_entites' (#131) from features/crud_entites into develop
Reviewed-on: #131
2026-02-22 23:17:33 +00:00
84451d5a15 Merge pull request 'features/crud_entites' (#129) from features/crud_entites into develop
Reviewed-on: #129
2026-02-22 13:53:35 +00:00
e687a9a904 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#127) from features/crud_entites into develop
Reviewed-on: #127
2026-02-21 12:42:08 +00:00
9685c73513 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#125) from features/crud_entites into develop
Reviewed-on: #125
2026-02-20 19:33:57 +00:00
650470efff Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#123) from features/crud_entites into develop
Reviewed-on: #123
2026-02-20 18:54:07 +00:00
9f5cc61726 Merge pull request 'features/crud_entites' (#121) from features/crud_entites into develop
Reviewed-on: #121
2026-02-19 20:37:58 +00:00
41175d93f0 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#119) from features/crud_entites into develop
Reviewed-on: #119
2026-02-19 19:07:35 +00:00
1ecaecdee3 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#117) from features/crud_entites into develop
Reviewed-on: #117
2026-02-19 18:33:11 +00:00
122dfcbead Merge pull request 'features/crud_entites' (#115) from features/crud_entites into develop
Reviewed-on: #115
2026-02-19 12:00:31 +00:00
d168b68d4b Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#113) from features/crud_entites into develop
Reviewed-on: #113
2026-02-18 23:05:41 +00:00
2af14dd4cd Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#111) from features/crud_entites into develop
Reviewed-on: #111
2026-02-18 20:42:05 +00:00
76f0d34e79 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#109) from features/crud_entites into develop
Reviewed-on: #109
2026-02-18 14:01:25 +00:00
666779ecce Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#107) from features/crud_entites into develop
Reviewed-on: #107
2026-02-16 22:04:26 +00:00
7fcd676fc0 Merge pull request 'features/crud_entites' (#105) from features/crud_entites into develop
Reviewed-on: #105
2026-02-16 20:55:25 +00:00
fffdef7103 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#103) from features/crud_entites into develop
Reviewed-on: #103
2026-02-16 00:15:01 +00:00
95c0dacd1e Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#101) from features/crud_entites into develop
Reviewed-on: #101
2026-02-14 14:08:19 +00:00
7ac6b953d3 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#99) from features/crud_entites into develop
Reviewed-on: #99
2026-02-13 17:54:51 +00:00
e010100472 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#97) from features/crud_entites into develop
Reviewed-on: #97
2026-02-12 21:31:24 +00:00
177a9c7b56 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#95) from features/crud_entites into develop
Reviewed-on: #95
2026-02-12 02:15:05 +00:00
3054930a86 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#93) from features/crud_entites into develop
Reviewed-on: #93
2026-02-11 21:14:57 +00:00
4397abd041 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#91) from features/crud_entites into develop
Reviewed-on: #91
2026-02-11 21:10:08 +00:00
a4b403ca20 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#89) from features/crud_entites into develop
Reviewed-on: #89
2026-02-10 00:10:39 +00:00
ff7b88f9f8 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#87) from features/crud_entites into develop
Reviewed-on: #87
2026-02-09 23:26:42 +00:00
37fdba1d85 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#85) from features/crud_entites into develop
Reviewed-on: #85
2026-02-08 22:23:08 +00:00
f50ed9aa5f Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#83) from features/crud_entites into develop
Reviewed-on: #83
2026-02-04 01:33:32 +00:00
966fd2ca7a Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#81) from features/crud_entites into develop
Reviewed-on: #81
2026-02-03 19:32:06 +00:00
a10253b2e8 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#79) from features/crud_entites into develop
Reviewed-on: #79
2026-02-03 15:08:48 +00:00
08b68f9e08 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#77) from features/crud_entites into develop
Reviewed-on: #77
2026-02-02 23:03:26 +00:00
be487d6a03 Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#75) from features/crud_entites into develop
Reviewed-on: #75
2026-02-01 22:49:00 +00:00
3be64e7f44 Merge pull request 'gestion de profil, secteur, section et arbre decoupage' (#73) from features/crud_entites into develop
Reviewed-on: #73
2026-01-27 08:58:32 +00:00
03a661cdc0 Merge pull request 'gestion de profil, secteur, section et arbre decoupage' (#72) from features/crud_entites into develop
Reviewed-on: #72
2026-01-27 08:37:52 +00:00
a68ec444cc Merge pull request 'features/crud_entites' (#70) from features/crud_entites into develop
Reviewed-on: #70
2026-01-13 20:33:17 +00:00
58f517bf31 Merge pull request 'correction creation user par defaut' (#68) from features/crud_entites into develop
Reviewed-on: #68
2025-12-20 19:03:51 +00:00
7f18f22efb Merge pull request 'correction creation user par defaut' (#66) from features/crud_entites into develop
Reviewed-on: #66
2025-12-20 18:55:42 +00:00
af3218412f Merge pull request 'correction creation user par defaut' (#64) from features/crud_entites into develop
Reviewed-on: #64
2025-12-20 17:06:19 +00:00
f35670c72e Merge pull request 'correction creation user par defaut' (#62) from features/crud_entites into develop
Reviewed-on: #62
2025-12-20 15:03:45 +00:00
a77c0e854d Merge pull request 'correction creation user par defaut' (#60) from features/crud_entites into develop
Reviewed-on: #60
2025-12-20 14:48:47 +00:00
e75eff4e20 Merge pull request 'correction lecture de secret chargement' (#58) from features/crud_entites into develop
Reviewed-on: #58
2025-12-20 14:33:59 +00:00
40d078c653 Merge pull request 'correction lecture de secret chargement' (#56) from features/crud_entites into develop
Reviewed-on: #56
2025-12-20 14:14:02 +00:00
31dd11d017 Merge pull request 'correction lecture de secret chargement' (#54) from features/crud_entites into develop
Reviewed-on: #54
2025-12-20 13:10:40 +00:00
6dfd12fae8 Merge pull request 'correction lecture de secret chargement' (#52) from features/crud_entites into develop
Reviewed-on: #52
2025-12-20 12:57:46 +00:00
a4ad0a4556 Merge pull request 'correction lecture de secret chargement' (#50) from features/crud_entites into develop
Reviewed-on: #50
2025-12-20 12:41:09 +00:00
411a6c0c2d Merge pull request 'correction lecture de secret' (#48) from features/crud_entites into develop
Reviewed-on: #48
2025-12-20 12:21:25 +00:00
bed73b2b16 Merge pull request 'correction lecture de secret' (#46) from features/crud_entites into develop
Reviewed-on: #46
2025-12-20 12:10:00 +00:00
5a0814a0ba Merge pull request 'correction lecture de secret' (#44) from features/crud_entites into develop
Reviewed-on: #44
2025-12-20 12:00:12 +00:00
126254ea94 Merge pull request 'correction lecture de secret' (#42) from features/crud_entites into develop
Reviewed-on: #42
2025-12-20 11:43:55 +00:00
f9e4681af4 Merge pull request 'correction lecture de secret' (#40) from features/crud_entites into develop
Reviewed-on: #40
2025-12-20 11:39:40 +00:00
84089d3639 Merge pull request 'correction profil actif' (#38) from features/crud_entites into develop
Reviewed-on: #38
2025-12-20 10:48:01 +00:00
02b0a937b4 Merge pull request 'correction profil actif' (#36) from features/crud_entites into develop
Reviewed-on: #36
2025-12-20 10:02:19 +00:00
c0096457fb Merge pull request 'nouvelle verson ci-cd avec gitea runner natif intallé sur hote' (#34) from features/crud_entites into develop
Reviewed-on: #34
2025-12-19 19:14:24 +00:00
b6062ba4d1 Merge pull request 'nouvelle verson ci-cd avec gitea runner natif intallé sur hote' (#33) from features/crud_entites into develop
Reviewed-on: #33
2025-12-19 10:50:02 +00:00
8dc8c974d3 Merge pull request 'correction docker composer avec les secrets' (#32) from features/crud_entites into develop
Reviewed-on: #32
2025-12-19 10:39:57 +00:00
957416df9e Merge pull request 'correction docker composer avec les secrets' (#30) from features/crud_entites into develop
Reviewed-on: #30
2025-12-18 15:47:21 +00:00
8d8af75108 Merge pull request 'correction docker composer avec les secrets' (#28) from features/crud_entites into develop
Reviewed-on: #28
2025-12-18 15:46:02 +00:00
555f13508e Merge pull request 'correction docker composer avec les secrets' (#26) from features/crud_entites into develop
Reviewed-on: #26
2025-12-18 10:36:10 +00:00
d92a2b2503 Merge pull request 'correction docker composer avec les secrets' (#24) from features/crud_entites into develop
Reviewed-on: #24
2025-12-17 17:13:46 +00:00
5ccfdb6a3f Merge pull request 'correction docker composer avec les secrets' (#22) from features/crud_entites into develop
Reviewed-on: #22
2025-12-17 16:58:50 +00:00
87b3bfbe83 Merge pull request 'correction docker composer avec les secrets' (#20) from features/crud_entites into develop
Reviewed-on: #20
2025-12-17 16:49:15 +00:00
62f25ea726 Merge pull request 'correction docker composer avec les secrets' (#18) from features/crud_entites into develop
Reviewed-on: #18
2025-12-17 16:41:46 +00:00
6125fcbd0b Merge pull request 'correction docker composer' (#16) from features/crud_entites into develop
Reviewed-on: #16
2025-12-17 16:26:17 +00:00
211af6103a Merge pull request 'features/crud_entites' (#14) from features/crud_entites into develop
Reviewed-on: #14
2025-12-17 14:12:53 +00:00
d27b622db8 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#12) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 35s
Reviewed-on: #12
2025-12-16 18:22:48 +00:00
c80b40082c Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#10) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 44s
Reviewed-on: #10
2025-12-16 18:06:52 +00:00
4a88af6487 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#8) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 34s
Reviewed-on: #8
2025-12-05 19:24:00 +00:00
966b0af1c2 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#6) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 36s
Reviewed-on: #6
2025-12-05 19:20:57 +00:00
58aa088ac3 Merge pull request 'ajout de ci-cd' (#4) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 39s
Reviewed-on: #4
2025-12-05 19:10:37 +00:00
033b430051 Merge pull request 'ajout de ci-cd' (#2) from features/crud_entites into develop
Some checks failed
CD - Deploy on main / deploy (pull_request) Failing after 39s
Reviewed-on: #2
2025-12-05 19:06:43 +00:00
b8dbc7f625 Merge pull request 'ajout de ci-cd' (#1) from features/crud_entites into develop
Reviewed-on: #1
2025-12-05 17:53:30 +00:00
40 changed files with 224 additions and 1866 deletions

View File

@@ -6,7 +6,6 @@ import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.enums.StatusAvis;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.metier.DonneesImpositionTfuService;
import io.gmss.fiscad.interfaces.rfu.metier.ImpositionsTfuService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
@@ -409,7 +408,7 @@ public class DonneesImpositionTfuController {
@PreAuthorize("hasAnyAuthority('CREATE_DONNEESIMPOSITIONTFU', 'UPDATE_DONNEESIMPOSITIONTFU')")
public ResponseEntity<?> genererDonneesFiscaleBatieUneParcelle(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb,@PathVariable Long parcelleId) {
try {
Optional<ImpositionsTfuPaylaodWeb> optionalImpositionsTfu =impositionsTfuRepository.findByIdToDto(impositionsTfuPaylaodWeb.getId());
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
@@ -425,7 +424,6 @@ public class DonneesImpositionTfuController {
}
impositionsTfuPaylaodWeb=donneesImpositionTfuService.genererDonneesFiscalesParcelleBatieUneParcelle(impositionsTfuPaylaodWeb,userPrincipal.getUser().getId(),parcelleId);
System.out.println("OK apres sorti bati une parcelle");
return new ResponseEntity<>(
new ApiResponse<>(true,impositionsTfuPaylaodWeb, "Données d'imposition des fonciers batis Générées avec succès."),
HttpStatus.OK
@@ -509,7 +507,7 @@ public class DonneesImpositionTfuController {
@PreAuthorize("hasAnyAuthority('CREATE_DONNEESIMPOSITIONTFU', 'UPDATE_DONNEESIMPOSITIONTFU')")
public ResponseEntity<?> genererDonneesImpositionNonBatiesUneParcelle(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, @PathVariable Long parcelleId) {
try {
Optional<ImpositionsTfuPaylaodWeb> optionalImpositionsTfu = impositionsTfuRepository.findByIdToDto(impositionsTfuPaylaodWeb.getId());
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
@@ -518,13 +516,19 @@ public class DonneesImpositionTfuController {
);
}
// if(!optionalImpositionsTfu.get().getStatusAvis().equals(StatusAvis.GENERATION_AUTORISE)){
// return new ResponseEntity<>(
// new ApiResponse<>(false, null, "l'état actuel : "+optionalImpositionsTfu.get().getStatusAvis()+" ne permet pas cette opération."),
// HttpStatus.OK
// );
// }
if(userPrincipal==null){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'êtes pas autorisé à accéder à cette ressource"),
HttpStatus.OK
);
}
impositionsTfuPaylaodWeb=donneesImpositionTfuService.genererDonneesFiscalesParcelleNonBatieUneParcelle(impositionsTfuPaylaodWeb,userPrincipal.getUser().getId(),parcelleId);
return new ResponseEntity<>(

View File

@@ -1,17 +1,14 @@
package io.gmss.fiscad.controllers.rfu.metier;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.entities.user.User;
import io.gmss.fiscad.enums.StatusAvis;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.infocad.metier.EnqueteService;
import io.gmss.fiscad.interfaces.infocad.parametre.StructureService;
import io.gmss.fiscad.interfaces.rfu.metier.ImpositionsTfuService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.StructurePaylaodWeb;
import io.gmss.fiscad.security.CurrentUser;
import io.gmss.fiscad.security.UserPrincipal;
import io.swagger.v3.oas.annotations.Operation;
@@ -32,8 +29,6 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.HttpClientErrorException;
import java.util.Optional;
@RestController
@AllArgsConstructor
@@ -44,8 +39,6 @@ import java.util.Optional;
public class ImpositionsTfuController {
private final ImpositionsTfuService impositionsTfuService;
private final StructureService structureService;
private final EnqueteService enqueteService;
private static final Logger logger = LoggerFactory.getLogger(ImpositionsTfuController.class);
@@ -61,22 +54,11 @@ public class ImpositionsTfuController {
HttpStatus.OK
);
}
if(impositionsTfuPaylaodWeb.getStructureId()==null){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Veuillez préciser la strucuture."),
HttpStatus.OK
);
}
User user = currentUser.getUser();
StructurePaylaodWeb st = structureService.getStructureById(impositionsTfuPaylaodWeb.getStructureId()).orElseGet(null);
User user=currentUser.getUser();
if(user.getStructure().getId()!=impositionsTfuPaylaodWeb.getStructureId()){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource. Votre centre : "+ user.getStructure().getNom() +" le centre de liquidation : "+ st.getNom()),
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource."),
HttpStatus.OK
);
}

View File

@@ -1,236 +0,0 @@
package io.gmss.fiscad.controllers.rfu.metier;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.metier.ParticiperService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.HttpClientErrorException;
@RestController
@RequestMapping(value = "api/participer", produces = MediaType.APPLICATION_JSON_VALUE)
@SecurityRequirement(name = "bearer")
@Tag(name = "Participer")
@CrossOrigin(origins = "*")
public class ParticiperController {
private final ParticiperService participerService;
private static final Logger logger = LoggerFactory.getLogger(ParticiperController.class);
public ParticiperController(ParticiperService participerService) {
this.participerService = participerService;
}
@PostMapping("/create")
@PreAuthorize("hasAuthority('CREATE_PARTICIPER')")
public ResponseEntity<?> createParticiper(@RequestBody @Valid @Validated ParticiperPayloadWeb participerPaylaodWeb) {
try {
participerPaylaodWeb = participerService.createParticiper(participerPaylaodWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, participerPaylaodWeb, "Participer créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@PutMapping("/update/{id}")
@PreAuthorize("hasAuthority('UPDATE_PARTICIPER')")
public ResponseEntity<?> updateParticiper(@PathVariable Long id, @RequestBody ParticiperPayloadWeb participerPaylaodWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.updateParticiper(id,participerPaylaodWeb), "Participer mise à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@DeleteMapping("/delete/{id}")
@PreAuthorize("hasAuthority('DELETE_PARTICIPER')")
public ResponseEntity<?> deleteParticiper(@PathVariable Long id) {
try {
participerService.deleteParticiper(id);
return new ResponseEntity<>(
new ApiResponse<>(true, "Participer supprimée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/all")
@PreAuthorize("hasAuthority('READ_PARTICIPER')")
public ResponseEntity<?> getAllParticiperList() {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.getParticiperList(), "Liste des caractéristiques chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/all-paged")
@PreAuthorize("hasAuthority('READ_PARTICIPER')")
public ResponseEntity<?> getAllParticiperPaged(@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.getParticiperList(pageable), "Liste des caractéristiques chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/all/by-equipe-id/{equipeId}")
@PreAuthorize("hasAuthority('READ_PARTICIPER')")
public ResponseEntity<?> getAllParticiperByParcelleList(@PathVariable Long equipeId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.getParticiperListByEquipe(equipeId), "Liste des caractéristiques chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/all-paged/by-equipe-id/{equipeId}")
@PreAuthorize("hasAuthority('READ_PARTICIPER')")
public ResponseEntity<?> getAllParticiperByParcellePaged(@PathVariable Long equipeId, @RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.getParticiperListByEquipePageable(equipeId,pageable), "Liste des caractéristiques chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/id/{id}")
@PreAuthorize("hasAuthority('READ_PARTICIPER')")
public ResponseEntity<?> getParticiperById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, participerService.getParticiperById(id), "Participer trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
}

View File

@@ -5,7 +5,6 @@ import io.gmss.fiscad.enums.TypeCampagne;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.parametre.CampagneService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
@@ -38,11 +37,11 @@ public class CampagneController {
@PostMapping("/create")
@PreAuthorize("hasAuthority('CREATE_CAMPAGNE')")
public ResponseEntity<?> createCampagne(@RequestBody @Valid @Validated CampagnePayloadWeb campagnePayloadWeb) {
public ResponseEntity<?> createCampagne(@RequestBody @Valid @Validated Campagne campagne) {
try {
campagnePayloadWeb = campagneService.createCampagne(campagnePayloadWeb);
campagne = campagneService.createCampagne(campagne);
return new ResponseEntity<>(
new ApiResponse<>(true, campagnePayloadWeb, "Campagne créé avec succès."),
new ApiResponse<>(true, campagne, "Campagne créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -63,10 +62,10 @@ public class CampagneController {
@PutMapping("/update/{id}")
@PreAuthorize("hasAuthority('UPDATE_CAMPAGNE')")
public ResponseEntity<?> updateCampagne(@PathVariable Long id, @RequestBody CampagnePayloadWeb campagnePayloadWeb) {
public ResponseEntity<?> updateCampagne(@PathVariable Long id, @RequestBody Campagne campagne) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.updateCampagne(id, campagnePayloadWeb), "Campagne mis à jour avec succès."),
new ApiResponse<>(true, campagneService.updateCampagne(id, campagne), "Campagne mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -208,111 +207,5 @@ public class CampagneController {
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-exercice-id/{exerciceId}")
@PreAuthorize("hasAuthority('READ_CAMPAGNE')")
public ResponseEntity<?> getCampagneByExercice(@PathVariable Long exerciceId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.getCampagneByExerciceId(exerciceId), "Liste des campagne par type chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/page/by-exercice-id/{exerciceId}")
@PreAuthorize("hasAuthority('READ_CAMPAGNE')")
public ResponseEntity<?> getCampagneByExercice(@PathVariable Long exerciceId,@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.getCampagneByExerciceId(exerciceId,pageable), "Liste des campagne par type chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-structure-id/{structureId}")
@PreAuthorize("hasAuthority('READ_CAMPAGNE')")
public ResponseEntity<?> getCampagneByStructure(@PathVariable Long structureId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.getCampagneByStructureId(structureId), "Liste des campagne par type chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/page/by-structure-id/{structureId}")
@PreAuthorize("hasAuthority('READ_CAMPAGNE')")
public ResponseEntity<?> getCampagneByStructure(@PathVariable Long structureId,@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.getCampagneByStructureId(structureId,pageable), "Liste des campagne par type chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
}

View File

@@ -4,7 +4,6 @@ import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.parametre.EquipeService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb;
import io.gmss.fiscad.paylaods.request.synchronisation.EquipePayload;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -37,12 +36,12 @@ public class EquipeController {
@PostMapping("/create")
// @PreAuthorize("hasAuthority('CREATE_EQUIPE')")
public ResponseEntity<?> createEquipe(@RequestBody @Valid @Validated EquipePayloadWeb equipePayloadWeb) {
@PreAuthorize("hasAuthority('CREATE_EQUIPE')")
public ResponseEntity<?> createEquipe(@RequestBody @Valid @Validated EquipePayload equipePayload) {
try {
equipePayloadWeb = equipeService.create(equipePayloadWeb);
Equipe equipe = equipeService.createEquipe(equipePayload);
return new ResponseEntity<>(
new ApiResponse<>(true, equipePayloadWeb, "Equipe créé avec succès."),
new ApiResponse<>(true, equipe, "Equipe créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -56,18 +55,17 @@ public class EquipeController {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@PutMapping("/update/{id}")
// @PreAuthorize("hasAuthority('UPDATE_EQUIPE')")
public ResponseEntity<?> updateEquipe(@PathVariable Long id, @RequestBody EquipePayloadWeb equipePayloadWeb) {
@PreAuthorize("hasAuthority('UPDATE_EQUIPE')")
public ResponseEntity<?> updateEquipe(@PathVariable Long id, @RequestBody EquipePayload equipePayload) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.update(id, equipePayloadWeb), "Equipe mis à jour avec succès."),
new ApiResponse<>(true, equipeService.updateEquipe(id, equipePayload), "Equipe mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -90,7 +88,7 @@ public class EquipeController {
@PreAuthorize("hasAuthority('DELETE_EQUIPE')")
public ResponseEntity<?> deleteEquiper(@PathVariable Long id) {
try {
equipeService.delete(id);
equipeService.deleteEquipe(id);
return new ResponseEntity<>(
new ApiResponse<>(true, "Equipe supprimée avec succès."),
HttpStatus.OK
@@ -106,18 +104,17 @@ public class EquipeController {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/all")
//@PreAuthorize("hasAuthority('READ_EQUIPE')")
@PreAuthorize("hasAuthority('READ_EQUIPE')")
public ResponseEntity<?> getAllEquipeList() {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findAll(), "Liste des equipes chargée avec succès."),
new ApiResponse<>(true, equipeService.getEquipeList(), "Liste des equipes chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -143,7 +140,7 @@ public class EquipeController {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findAll(pageable), "Liste des equipes chargée avec succès."),
new ApiResponse<>(true, equipeService.getEquipeList(pageable), "Liste des equipes chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -167,81 +164,7 @@ public class EquipeController {
public ResponseEntity<?> getEquipeById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findById(id), "Equipe trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-compagne-id/{campagneId}")
@PreAuthorize("hasAuthority('READ_EQUIPE')")
public ResponseEntity<?> getEquipeByCompagneId(@PathVariable Long campagneId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findByCampagneId(campagneId), "Equipe trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-secteur-id/{secteurId}")
@PreAuthorize("hasAuthority('READ_EQUIPE')")
public ResponseEntity<?> getEquipeBySecteurId(@PathVariable Long secteurId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findBySecteurId(secteurId), "Equipe trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Method POST/GET is required."), HttpStatus.OK);
} catch (NotFoundException | BadRequestException | MyFileNotFoundException | ResourceNotFoundException |
FileStorageException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, e.getMessage()), HttpStatus.OK);
} catch (NullPointerException e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "Null value has been detected {" + e.getMessage() + "}."), HttpStatus.OK);
} catch (Exception e) {
logger.error(e.getLocalizedMessage());
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-quartier-id/{quartierId}")
@PreAuthorize("hasAuthority('READ_EQUIPE')")
public ResponseEntity<?> getEquipeByQuartierId(@PathVariable Long quartierId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.findByQuartierId(quartierId), "Equipe trouvée avec succès."),
new ApiResponse<>(true, equipeService.getEquipeById(id), "Equipe trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -38,8 +38,6 @@ public class ExerciceController {
@PreAuthorize("hasAuthority('CREATE_EXERCICE')")
public ResponseEntity<?> createExercice(@RequestBody @Valid @Validated Exercice exercice) {
try {
exercice = exerciceService.createExercice(exercice);
return new ResponseEntity<>(
new ApiResponse<>(true, exercice, "Exercice créé avec succès."),

View File

@@ -27,7 +27,6 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Formula;
import java.io.Serializable;
import java.time.LocalDate;
@@ -184,14 +183,6 @@ public class Enquete extends BaseEntity implements Serializable {
private Integer nbreIndivisiaire;
private String autreAdresse;
private Float superficie ;
@Formula("""
(
SELECT COUNT(DISTINCT (bat.id))
FROM enquete e
join batiment bat on bat.parcelle_id =e.parcelle_id
WHERE bat.parcelle_id = parcelle_id
)
""")
private Integer nbreBatiment;
private Integer nbrePiscine;
private Long montantMensuelleLocation;

View File

@@ -94,7 +94,7 @@ public class DonneesImpositionTfu extends BaseEntity implements Serializable {
private Long nombrePiscine;
private Long nombreUlog;
private Long nombreBat;
//@Column(nullable = true, columnDefinition = "boolean default true")
@Column(nullable = true, columnDefinition = "boolean default true")
private Boolean homologable ;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)

View File

@@ -8,6 +8,7 @@ import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.decoupage.Commune;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.entities.rfu.parametre.Participer;
import io.gmss.fiscad.enums.StatusAvis;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
@@ -15,6 +16,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Formula;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import java.io.Serializable;
import java.time.LocalDate;
@@ -51,7 +54,6 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
private String datePieceAdmin;
@Enumerated(EnumType.STRING)
private StatusAvis statusAvis;
@Formula("""
(
@@ -60,7 +62,6 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
WHERE d.impositions_tfu_id = id
)
""")
@Transient
private Integer nombreAvis;
@Formula("""
(
@@ -70,7 +71,6 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
and (d.nature_impot='FNB' or d.nature_impot='FB')
)
""")
@Transient
private Integer nombreAvisFnb;
@Formula("""
(
@@ -81,9 +81,7 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
and d.batiment_id is not null
)
""")
@Transient
private Integer nombreAvisBatiment;
@Formula("""
(
SELECT COUNT(DISTINCT (d.annee, d.code_commune, d.personne_id))
@@ -93,16 +91,15 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
and d.unite_logement_id is not null
)
""")
@Transient
private Integer nombreAvisUniteLog;
@Column(columnDefinition = "TEXT")
private String motif;
// @JsonIgnore
// @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
// @JoinColumn(name = "impositions_tfu_id")
// private List<DonneesImpositionTfu> donneesImpositionTfus;
@JsonIgnore
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "impositions_tfu_id")
private List<DonneesImpositionTfu> donneesImpositionTfus;
}

View File

@@ -6,7 +6,6 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.enums.TypeCampagne;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
@@ -40,12 +39,12 @@ public class Campagne extends BaseEntity implements Serializable {
private LocalDate dateFin;
@Enumerated(EnumType.STRING)
private TypeCampagne typeCampagne;
@ManyToOne
private Exercice exercice ;
@ManyToOne
private Structure structure ;
// @JsonIgnore
// @OneToMany(mappedBy = "campagne")
// private List<Equipe> equipes;
// @JsonIgnore
// @OneToMany(mappedBy = "campagne")
// private List<Enquete> enquetes;
}

View File

@@ -1,13 +1,10 @@
package io.gmss.fiscad.entities.rfu.parametre;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.decoupage.Quartier;
import io.gmss.fiscad.entities.decoupage.Secteur;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.parametre.Bloc;
import io.gmss.fiscad.entities.rfu.metier.Participer;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -16,7 +13,6 @@ import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@@ -36,10 +32,6 @@ public class Equipe extends BaseEntity implements Serializable {
private Bloc bloc;
@ManyToOne
private Secteur secteur;
@ManyToOne
private Quartier quartier;
@ManyToOne
private Campagne campagne;
@@ -47,14 +39,6 @@ public class Equipe extends BaseEntity implements Serializable {
@JoinColumn(name = "equipe_id")
private List<Participer> participers;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebut;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFin;
// @JsonIgnore
// @OneToMany(mappedBy = "equipe")
// private List<Enquete> enquetes;

View File

@@ -21,11 +21,6 @@ import java.time.LocalDate;
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = " deleted = false")
@Table(
uniqueConstraints = {
@UniqueConstraint(name = "uk_exercice_annee", columnNames = "annee")
}
)
public class Exercice extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -1,11 +1,10 @@
package io.gmss.fiscad.entities.rfu.metier;
package io.gmss.fiscad.entities.rfu.parametre;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.entities.user.User;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
@@ -22,15 +21,7 @@ import java.time.LocalDate;
@Data
@NoArgsConstructor
@AllArgsConstructor
//@Where(clause = " deleted = false")
@Table(
uniqueConstraints = {
@UniqueConstraint(
name = "uk_participer_equipe_user",
columnNames = {"equipe_id", "user_id"}
)
}
)
@Where(clause = " deleted = false")
public class Participer extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -1,9 +1,15 @@
package io.gmss.fiscad.entities.user;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.decoupage.Secteur;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.metier.Participer;
import io.gmss.fiscad.entities.rfu.parametre.Participer;
import io.gmss.fiscad.enums.UserRole;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -13,6 +19,7 @@ import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.List;

View File

@@ -267,6 +267,7 @@ public class PersonneServiceImpl implements PersonneService {
}
if(request.getNpi()!=null && !request.getNpi().equals("")){
List<PersonnePayLoadWeb> personnePayLoadWebs = personneRepository.findAllPersonneByNpiToDto(request.getNpi());
if(!personnePayLoadWebs.isEmpty())
return personnePayLoadWebs;
@@ -276,14 +277,13 @@ public class PersonneServiceImpl implements PersonneService {
result = recherchePersonneLocal(request);
if (result != null && ! result.isEmpty()) {
if (result != null && !result.isEmpty()) {
return result;
}
// Conversion date en String format yyyy-MM-dd
String dateNaissance = Optional.ofNullable(request.getDateNaissance())
.map(d -> d.format(DateTimeFormatter.ISO_LOCAL_DATE))
.orElse(null);
// Construction du body IFU
IfuEnLigneRechercheBody ifuRequest = new IfuEnLigneRechercheBody();
ifuRequest.setNom(request.getNom());

View File

@@ -2,16 +2,16 @@ package io.gmss.fiscad.implementations.rfu.metier;
import io.gmss.fiscad.entities.decoupage.Arrondissement;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.metier.DonneesImpositionTfu;
import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuNonBati;
import io.gmss.fiscad.enums.StatusAvis;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.infocad.parametre.StructureService;
import io.gmss.fiscad.interfaces.rfu.metier.DonneesImpositionTfuService;
import io.gmss.fiscad.paylaods.request.crudweb.*;
import io.gmss.fiscad.paylaods.request.crudweb.ArrondissementPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.paylaods.response.DonneesImpositionTfuResponse;
import io.gmss.fiscad.persistence.repositories.decoupage.ArrondissementRepository;
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
@@ -45,7 +45,6 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
private final ArrondissementRepository arrondissementRepository;
private final BaremRfuRepository baremRfuRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
private final StructureService structureService;
@@ -117,38 +116,23 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
@Override
@Transactional
public ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleNonBatieUneParcelle(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, Long userId,Long parcelleId) {
boolean existsBareme = baremRfuNonBatiRepository.existsBaremForParcelleNonBati(parcelleId);
Optional<ParcellePayLoadWeb> optionalParcelle= parcelleRepository.findParcelleToDtoById(parcelleId);
Optional<Parcelle> optionalParcelle= parcelleRepository.findById(parcelleId);
String nomQuartier="";
String nomArrondissement="";
String nomCommune="";
if(optionalParcelle.isPresent()){
nomQuartier= optionalParcelle.get().getQuartierNom();
nomQuartier= optionalParcelle.get().getQuartier().getNom();
nomArrondissement= optionalParcelle.get().getQuartier().getArrondissement().getNom();
nomCommune= optionalParcelle.get().getQuartier().getArrondissement().getCommune().getNom();
}
if(!existsBareme){
throw new BadRequestException("Impossible de continuer la liquidation : Il n'existe pas de barème configuré pour la zone de cette parcelle : "+nomQuartier);
throw new BadRequestException("Impossible de continuer la liquidation : Il n'existe pas de barème configuré pour la zone de cette parcelle : "+nomCommune+" : "+nomArrondissement+" : "+nomQuartier);
}
List<Structure> structures = structureService.getListStructureUserId(userId);
boolean existe = structures.stream()
.anyMatch(s -> s.getId().equals(impositionsTfuPaylaodWeb.getStructureId()));
if (!existe) {
throw new BadRequestException("Impossible de continuer la liquidation : La parcelle ne se trouve pas dans votre territoire ");
}
Integer nb= donneesImpositionTfuRepository.genererDonneesTfuNonBatie(impositionsTfuPaylaodWeb.getId(), userId, parcelleId);
System.out.println(nb);
Integer nb= donneesImpositionTfuRepository.genererDonneesTfuNonBatie(impositionsTfuPaylaodWeb.getId(),userId,parcelleId);
ImpositionsTfu impositionsTfu = entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.TFU_FNB_GENERE);
//impositionsTfu.setNombreAvisFnb(nb);
impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@@ -189,21 +173,23 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
public ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleBatieUneParcelle(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, Long userId, Long parcelleId) {
Optional<ImpositionsTfuPaylaodWeb> imp=impositionsTfuRepository.findByIdToDto(impositionsTfuPaylaodWeb.getId());
if(imp.isPresent()){
if(imp.isPresent()){
boolean dejaLiquide = donneesImpositionTfuRepository.existsByImpositionAnneeAndParcelle(Long.valueOf(imp.get().getExerciceAnnee()),parcelleId);
if(dejaLiquide){
return imp.orElse(null);
}
}
boolean existsBareme = baremRfuRepository.existsBaremForParcelle(parcelleId);
Optional<ParcellePayLoadWeb> optionalParcelle= parcelleRepository.findParcelleToDtoById(parcelleId);
boolean existsBareme = baremRfuRepository.existsBaremForParcelle(parcelleId);
Optional<Parcelle> optionalParcelle= parcelleRepository.findById(parcelleId);
String nomQuartier="";
String nomArrondissement="";
String nomCommune="";
if(optionalParcelle.isPresent()){
nomQuartier= optionalParcelle.get().getQuartierNom();
nomQuartier= optionalParcelle.get().getQuartier().getNom();
nomArrondissement= optionalParcelle.get().getQuartier().getArrondissement().getNom();
nomCommune= optionalParcelle.get().getQuartier().getArrondissement().getCommune().getNom();
}
if(!existsBareme){
throw new BadRequestException("Impossible de continuer la liquidation : Il n'existe pas de barème configuré pour la zone de cette parcelle : "+nomCommune+" : "+nomArrondissement+" : "+nomQuartier);
@@ -223,10 +209,15 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
Integer nbMajAcompteRirf= donneesImpositionTfuRepository.majDonneesAcompteRirfUneParcelle(impositionsTfuPaylaodWeb.getId(),parcelleId);
ImpositionsTfu impositionsTfu = entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.GENERE);
//impositionsTfu.setNombreAvis(impositionsTfu.getNombreAvis()+1);
//impositionsTfu.setNombreAvisBatiment(impositionsTfu.getNombreAvisFnb()+1);
//impositionsTfu.setNombreAvisUniteLog(impositionsTfu.getNombreAvisUniteLog()+1);
impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);

View File

@@ -1,136 +0,0 @@
package io.gmss.fiscad.implementations.rfu.metier;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.entities.rfu.metier.Participer;
import io.gmss.fiscad.exceptions.ApplicationException;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.metier.ParticiperService;
import io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb;
import io.gmss.fiscad.persistence.repositories.infocad.metier.ParcelleRepository;
import io.gmss.fiscad.persistence.repositories.rfu.metier.ParticiperRepository;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.EquipeRepository;
import io.gmss.fiscad.persistence.repositories.user.UserRepository;
import io.gmss.fiscad.service.EntityFromPayLoadService;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
@AllArgsConstructor
@Service
public class ParticiperServiceImpl implements ParticiperService {
private final ParticiperRepository participerRepository;
private final EquipeRepository equipeRepository;
private final UserRepository userRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
@Override
public ParticiperPayloadWeb createParticiper(ParticiperPayloadWeb participerPaylaodWeb) throws BadRequestException {
if (participerPaylaodWeb.getId() != null) {
throw new BadRequestException("Impossible de créer un nouveau participer ayant un id non null.");
}
if (participerPaylaodWeb.getEquipeId() == null) {
throw new BadRequestException("Impossible de créer un nouveau participer: L'équipe doit être précisée.");
}else {
if(!equipeRepository.existsById(participerPaylaodWeb.getEquipeId()))
throw new BadRequestException("Impossible de créer la participation: L'équipe doit être précisée.");
}
if (participerPaylaodWeb.getUserId() == null) {
throw new BadRequestException("Impossible de créer la participation : Le participant doit être précisé.");
}else {
if(!userRepository.existsById(participerPaylaodWeb.getUserId()))
throw new BadRequestException("Impossible de créer un nouveau participer: Le participant doit être précisé.");
}
if (participerRepository.existsByEquipeIdAndUserId(
participerPaylaodWeb.getEquipeId(),
participerPaylaodWeb.getUserId())) {
throw new ApplicationException("Cet utilisateur participe déjà à cette équipe.");
}
Participer participer= entityFromPayLoadService.getParticiperFromPayLoadWeb(participerPaylaodWeb);
participer= participerRepository.save(participer);
return participerRepository.findPayloadById(participer.getId()).orElse(null);
}
@Override
public ParticiperPayloadWeb updateParticiper(Long id,ParticiperPayloadWeb participerPaylaodWeb) throws NotFoundException {
if (participerPaylaodWeb.getId() == null) {
throw new BadRequestException("Participation non spécifiée");
}
if (!participerRepository.existsById(participerPaylaodWeb.getId())) {
throw new NotFoundException("Impossible de trouver la participation.");
}
if (participerPaylaodWeb.getEquipeId() == null) {
throw new BadRequestException("Impossible de créer un nouveau participer: L'équipe doit être précisée.");
}else {
if(!equipeRepository.existsById(participerPaylaodWeb.getEquipeId()))
throw new BadRequestException("Impossible de créer un nouveau participer: L'équipe doit être précisée.");
}
if (participerPaylaodWeb.getUserId() == null) {
throw new BadRequestException("Impossible de créer un nouveau participer: Le participant doit être précisé.");
}else {
if(!userRepository.existsById(participerPaylaodWeb.getUserId()))
throw new BadRequestException("Impossible de créer un nouveau participer: Le participant doit être précisé.");
}
Participer participer= entityFromPayLoadService.getParticiperFromPayLoadWeb(participerPaylaodWeb);
participer= participerRepository.save(participer);
return participerRepository.findPayloadById(participer.getId()).orElse(null);
}
@Override
public void deleteParticiper(Long id) throws NotFoundException {
Optional<Participer> participerOptional = participerRepository.findById(id);
if (participerOptional.isPresent()) {
participerRepository.deleteById(participerOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver le participer spécifié dans notre base de données.");
}
}
@Override
public Page<ParticiperPayloadWeb> getParticiperList(Pageable pageable) {
return participerRepository.findAllPayload(pageable);
}
@Override
public List<ParticiperPayloadWeb> getParticiperList() {
return participerRepository.findAllPayload();
}
@Override
public Page<ParticiperPayloadWeb> getParticiperListByEquipePageable(Long equipeId, Pageable pageable) {
return participerRepository.findAllPayloadByEquipeId(equipeId,pageable);
}
@Override
public List<ParticiperPayloadWeb> getParticiperListByEquipe(Long equipeId) {
return participerRepository.findAllPayloadByEquipeId(equipeId);
}
@Override
public Optional<ParticiperPayloadWeb> getParticiperById(Long id) {
if (participerRepository.existsById(id)) {
return participerRepository.findPayloadById(id);
} else {
throw new NotFoundException("Impossible de trouver la participation spécifiée dans la base de données.");
}
}
}

View File

@@ -1,16 +1,11 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.entities.rfu.metier.Batiment;
import io.gmss.fiscad.entities.rfu.parametre.Campagne;
import io.gmss.fiscad.enums.TypeCampagne;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.CampagneService;
import io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.CampagneRepository;
import io.gmss.fiscad.service.EntityFromPayLoadService;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
@@ -19,36 +14,29 @@ import java.util.List;
import java.util.Optional;
@Service
@AllArgsConstructor
public class CampagneServiceImpl implements CampagneService {
private final CampagneRepository campagneRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
public CampagneServiceImpl(CampagneRepository campagneRepository) {
this.campagneRepository = campagneRepository;
}
@Override
public CampagnePayloadWeb createCampagne(CampagnePayloadWeb campagnePayloadWeb) throws BadRequestException {
if (campagnePayloadWeb.getId() != null) {
public Campagne createCampagne(Campagne campagne) throws BadRequestException {
if (campagne.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
}
Campagne campagne= entityFromPayLoadService.getCampagneFromPayLoadWeb(campagnePayloadWeb);
campagne= campagneRepository.save(campagne);
return campagneRepository.findPayloadById(campagne.getId()).orElse(null);
return campagneRepository.save(campagne);
}
@Override
public CampagnePayloadWeb updateCampagne(Long id, CampagnePayloadWeb campagnePayloadWeb) throws NotFoundException {
if (campagnePayloadWeb.getId() == null) {
public Campagne updateCampagne(Long id, Campagne campagne) throws NotFoundException {
if (campagne.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle campagne ayant un id null.");
}
if (!campagneRepository.existsById(campagnePayloadWeb.getId())) {
if (!campagneRepository.existsById(campagne.getId())) {
throw new NotFoundException("Impossible de trouver la campagne spécifiée dans notre base de données.");
}
Campagne campagne= entityFromPayLoadService.getCampagneFromPayLoadWeb(campagnePayloadWeb);
campagne= campagneRepository.save(campagne);
return campagneRepository.findPayloadById(campagne.getId()).orElse(null);
return campagneRepository.save(campagne);
}
@Override
@@ -61,13 +49,13 @@ public class CampagneServiceImpl implements CampagneService {
}
}
@Override
public Page<CampagnePayloadWeb> getCampagneList(Pageable pageable) {
return campagneRepository.findAllPayload(pageable);
public Page<Campagne> getCampagneList(Pageable pageable) {
return campagneRepository.findAll(pageable);
}
@Override
public List<CampagnePayloadWeb> getCampagneList() {
return campagneRepository.findAllPayload();
public List<Campagne> getCampagneList() {
return campagneRepository.findAll();
}
@Override
@@ -76,28 +64,8 @@ public class CampagneServiceImpl implements CampagneService {
}
@Override
public Optional<CampagnePayloadWeb> getCampagneById(Long id) {
return campagneRepository.findPayloadById(id);
}
@Override
public List<CampagnePayloadWeb> getCampagneByExerciceId(Long exerciceId) {
return campagneRepository.findAllPayloadByExerciceId(exerciceId);
}
@Override
public Page<CampagnePayloadWeb> getCampagneByExerciceId(Long exerciceId, Pageable pageable) {
return campagneRepository.findAllPayloadByExerciceId(exerciceId,pageable);
}
@Override
public List<CampagnePayloadWeb> getCampagneByStructureId(Long structureId) {
return campagneRepository.findAllPayloadByStructureId(structureId);
}
@Override
public Page<CampagnePayloadWeb> getCampagneByStructureId(Long structureId, Pageable pageable) {
return campagneRepository.findAllPayloadByStructureId(structureId,pageable);
public Optional<Campagne> getCampagneById(Long id) {
return campagneRepository.findById(id);
}
}

View File

@@ -1,131 +1,121 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.decoupage.Secteur;
import io.gmss.fiscad.entities.infocad.parametre.Bloc;
import io.gmss.fiscad.entities.rfu.parametre.Campagne;
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.entities.rfu.parametre.Participer;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.EquipeService;
import io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb;
import io.gmss.fiscad.paylaods.request.synchronisation.EquipePayload;
import io.gmss.fiscad.paylaods.request.synchronisation.ParticiperPayload;
import io.gmss.fiscad.persistence.repositories.decoupage.SecteurRepository;
import io.gmss.fiscad.persistence.repositories.infocad.parametre.BlocRepository;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.CampagneRepository;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.EquipeRepository;
import io.gmss.fiscad.service.EntityFromPayLoadService;
import lombok.AllArgsConstructor;
import io.gmss.fiscad.persistence.repositories.user.UserRepository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@AllArgsConstructor
@Service
public class EquipeServiceImpl implements EquipeService {
private final EntityFromPayLoadService entityFromPayLoadService;
private final EquipeRepository equipeRepository;
private final EquipeRepository equipeRepository;
private final UserRepository userRepository;
private final BlocRepository blocRepository;
private final SecteurRepository secteurRepository;
private final CampagneRepository campagneRepository;
public EquipeServiceImpl(EquipeRepository equipeRepository, UserRepository userRepository, BlocRepository blocRepository, SecteurRepository secteurRepository, CampagneRepository campagneRepository) {
this.equipeRepository = equipeRepository;
this.userRepository = userRepository;
this.blocRepository = blocRepository;
this.secteurRepository = secteurRepository;
this.campagneRepository = campagneRepository;
}
@Override
public EquipePayloadWeb create(EquipePayloadWeb equipePayloadWeb) {
if (equipePayloadWeb.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle caracteristique ayant un id non null.");
public Equipe createEquipe(EquipePayload equipePayload) throws BadRequestException {
if (equipePayload.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle equipe ayant un id non null.");
}
Equipe equipe = entityFromPayLoadService.getEquipeFromPayLoadWeb(equipePayloadWeb);
equipe = equipeRepository.save(equipe);
return equipeRepository.findPayloadById(equipe.getId()).orElse(null);
Equipe equipe = getEquipeFromPayload(equipePayload);
return equipeRepository.save(equipe);
}
private Equipe getEquipeFromPayload(EquipePayload equipePayload) {
Equipe equipe = new Equipe();
Optional<Bloc> optionalBloc = blocRepository.findById(equipePayload.getBlocId());
equipe.setBloc(optionalBloc.orElse(null));
equipe.setId(equipePayload.getId());
equipe.setCode(equipePayload.getCode());
equipe.setNom(equipePayload.getNom());
Optional<Secteur> optionalSecteur = secteurRepository.findById(equipePayload.getSecteurId());
equipe.setSecteur(optionalSecteur.orElse(null));
Optional<Campagne> optionalCampagne = campagneRepository.findById(equipePayload.getCampagneId());
equipe.setCampagne(optionalCampagne.orElse(null));
List<Participer> participerList = new ArrayList<>();
for (ParticiperPayload pp : equipePayload.getParticiperPayloads()) {
Participer part = new Participer();
part.setId(pp.getId());
if (pp.getEquipeId() != null && equipeRepository.existsById(equipe.getId())) {
part.setEquipe(equipeRepository.findById(equipe.getId()).orElse(null));
}
if (pp.getUserId() != null && userRepository.existsById(pp.getUserId())) {
part.setUser(userRepository.findById(pp.getUserId()).orElse(null));
}
part.setDateDebut(pp.getDateDebut());
part.setDateFin(pp.getDateFin());
participerList.add(part);
}
equipe.setParticipers(participerList);
return equipe;
}
@Override
public EquipePayloadWeb update(Long id, EquipePayloadWeb equipePayloadWeb) {
if (equipePayloadWeb.getId() == null) {
throw new BadRequestException("Impossible de faire la mise à jour: Equipe non fournie");
public Equipe updateEquipe(Long id, EquipePayload equipePayload) throws NotFoundException {
if (equipePayload.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle equipe ayant un id null.");
}
Optional<Equipe> optionalEquipe=Optional.empty();
if(!equipeRepository.existsById(equipePayloadWeb.getId())){
throw new BadRequestException("Impossible de faire la mise à jour: Equipe non fournie");
if (!equipeRepository.existsById(equipePayload.getId())) {
throw new NotFoundException("Impossible de trouver la equipe spécifiée dans notre base de données.");
}
Equipe equipe = entityFromPayLoadService.getEquipeFromPayLoadWeb(equipePayloadWeb);
equipe = equipeRepository.save(equipe);
return equipeRepository.findPayloadById(equipe.getId()).orElse(null);
Equipe equipe = getEquipeFromPayload(equipePayload);
return equipeRepository.save(equipe);
}
@Override
public void delete(Long id) {
Optional<Equipe> optionalEquipe = equipeRepository.findById(id);
if (optionalEquipe.isPresent()) {
equipeRepository.deleteById(optionalEquipe.get().getId());
public void deleteEquipe(Long id) throws NotFoundException {
Optional<Equipe> equipeOptional = equipeRepository.findById(id);
if (equipeOptional.isPresent()) {
equipeRepository.deleteById(equipeOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver lquipe spécifiée.");
throw new NotFoundException("Impossible de trouver la equipe spécifiée dans notre base de données.");
}
}
@Override
public EquipePayloadWeb findById(Long id) {
if (equipeRepository.existsById(id)) {
return equipeRepository.findPayloadById(id).orElse(null);
} else {
throw new NotFoundException("Impossible de trouver la caractéristique spécifiée dans la base de données.");
}
public Page<Equipe> getEquipeList(Pageable pageable) {
return equipeRepository.findAll(pageable);
}
@Override
public List<EquipePayloadWeb> findAll() {
return equipeRepository.findAllPayload();
public List<Equipe> getEquipeList() {
return equipeRepository.findAll();
}
@Override
public Page<EquipePayloadWeb> findAll(Pageable pageable) {
return equipeRepository.findAllPayload(pageable);
}
@Override
public List<EquipePayloadWeb> findByCampagneId(Long campagneId) {
return equipeRepository.findAllPayloadByCampagneId(campagneId);
}
@Override
public Page<EquipePayloadWeb> findByCampagneId(Long campagneId, Pageable pageable) {
return equipeRepository.findAllPayloadByCampagneId(campagneId,pageable);
}
@Override
public List<EquipePayloadWeb> findBySecteurId(Long secteurId) {
return equipeRepository.findAllPayloadBySecteurId(secteurId);
}
@Override
public Page<EquipePayloadWeb> findBySecteurId(Long secteurId, Pageable pageable) {
return null;
}
@Override
public List<EquipePayloadWeb> findByQuartierId(Long quartierId) {
return equipeRepository.findAllPayloadByQuartierId(quartierId);
}
@Override
public Page<EquipePayloadWeb> findByQuartierId(Long quartierId, Pageable pageable) {
return null;
}
@Override
public List<EquipePayloadWeb> findByBlocId(Long blocId) {
return null;
}
@Override
public Page<EquipePayloadWeb> findByBlocId(Long blocId, Pageable pageable) {
return null;
}
@Override
public boolean existsById(Long id) {
return false;
}
@Override
public boolean existsByCode(String code) {
return false;
}
@Override
public Optional<Equipe> findEntityById(Long id) {
return Optional.empty();
public Optional<Equipe> getEquipeById(Long id) {
return equipeRepository.findById(id);
}
}

View File

@@ -1,7 +1,6 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.exceptions.ApplicationException;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.ExerciceService;
@@ -23,14 +22,8 @@ public class ExerciceServiceImpl implements ExerciceService {
@Override
public Exercice createExercice(Exercice exercice) throws BadRequestException {
if (exercice.getId() == null) {
if (exerciceRepository.existsByAnnee(exercice.getAnnee())) {
throw new ApplicationException("Un exercice existe déjà pour l'année " + exercice.getAnnee() + ".");
}
} else {
if (exerciceRepository.existsByAnneeAndIdNot(exercice.getAnnee(), exercice.getId())) {
throw new ApplicationException("Un exercice existe déjà pour l'année " + exercice.getAnnee() + ".");
}
if (exercice.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
}
return exerciceRepository.save(exercice);
}

View File

@@ -137,10 +137,9 @@ public class UserServiceImpl implements UserService {
public UserPaylaodWeb updateUser(Long id, UserPaylaodWeb userPaylaodWeb) {
if ((userRepository.findByUsername(userPaylaodWeb.getLogin()).isEmpty())
&& (userRepository.findByEmail(userPaylaodWeb.getEmail()).isEmpty())) {
|| (userRepository.findByEmail(userPaylaodWeb.getEmail()).isEmpty())) {
throw new BadRequestException("Cet utilisateur n'existe pas.");
}
if (userPaylaodWeb.getId() == null) {
throw new BadRequestException("Cet utilisateur n'existe déjà.");
}

View File

@@ -1,30 +0,0 @@
package io.gmss.fiscad.interfaces.rfu.metier;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Optional;
public interface ParticiperService {
ParticiperPayloadWeb createParticiper(ParticiperPayloadWeb participerPayloadWeb) throws BadRequestException;
ParticiperPayloadWeb updateParticiper(Long id,ParticiperPayloadWeb participerPayloadWeb) throws NotFoundException;
void deleteParticiper(Long id) throws NotFoundException;
Page<ParticiperPayloadWeb> getParticiperList(Pageable pageable);
List<ParticiperPayloadWeb> getParticiperList();
Page<ParticiperPayloadWeb> getParticiperListByEquipePageable(Long equipeId, Pageable pageable);
List<ParticiperPayloadWeb> getParticiperListByEquipe(Long equipeId);
Optional<ParticiperPayloadWeb> getParticiperById(Long id);
}

View File

@@ -4,7 +4,6 @@ import io.gmss.fiscad.entities.rfu.parametre.Campagne;
import io.gmss.fiscad.enums.TypeCampagne;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -13,23 +12,18 @@ import java.util.Optional;
public interface CampagneService {
CampagnePayloadWeb createCampagne(CampagnePayloadWeb campagnePayloadWeb) throws BadRequestException;
Campagne createCampagne(Campagne campagne) throws BadRequestException;
CampagnePayloadWeb updateCampagne(Long id, CampagnePayloadWeb campagnePayloadWeb) throws NotFoundException;
Campagne updateCampagne(Long id, Campagne campagne) throws NotFoundException;
void deleteCampagne(Long id) throws NotFoundException;
Page<CampagnePayloadWeb> getCampagneList(Pageable pageable);
Page<Campagne> getCampagneList(Pageable pageable);
List<CampagnePayloadWeb> getCampagneList();
List<Campagne> getCampagneList();
List<Campagne> getCampagnesByType(TypeCampagne typeCampagne);
Optional<CampagnePayloadWeb> getCampagneById(Long id);
List<CampagnePayloadWeb> getCampagneByExerciceId(Long exerciceId);
Page<CampagnePayloadWeb> getCampagneByExerciceId(Long exerciceId,Pageable pageable);
List<CampagnePayloadWeb> getCampagneByStructureId(Long structureId);
Page<CampagnePayloadWeb> getCampagneByStructureId(Long structureId, Pageable pageable);
Optional<Campagne> getCampagneById(Long id);
}

View File

@@ -3,7 +3,6 @@ package io.gmss.fiscad.interfaces.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb;
import io.gmss.fiscad.paylaods.request.synchronisation.EquipePayload;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -13,42 +12,16 @@ import java.util.Optional;
public interface EquipeService {
// CRUD
EquipePayloadWeb create(EquipePayloadWeb payload);
Equipe createEquipe(EquipePayload equipePayload) throws BadRequestException;
EquipePayloadWeb update(Long id, EquipePayloadWeb payload);
Equipe updateEquipe(Long id, EquipePayload equipePayload) throws NotFoundException;
void delete(Long id);
void deleteEquipe(Long id) throws NotFoundException;
// Recherche
EquipePayloadWeb findById(Long id);
Page<Equipe> getEquipeList(Pageable pageable);
List<EquipePayloadWeb> findAll();
List<Equipe> getEquipeList();
Page<EquipePayloadWeb> findAll(Pageable pageable);
// Filtres
List<EquipePayloadWeb> findByCampagneId(Long campagneId);
Page<EquipePayloadWeb> findByCampagneId(Long campagneId, Pageable pageable);
List<EquipePayloadWeb> findBySecteurId(Long secteurId);
Page<EquipePayloadWeb> findBySecteurId(Long secteurId, Pageable pageable);
List<EquipePayloadWeb> findByQuartierId(Long quartierId);
Page<EquipePayloadWeb> findByQuartierId(Long quartierId, Pageable pageable);
List<EquipePayloadWeb> findByBlocId(Long blocId);
Page<EquipePayloadWeb> findByBlocId(Long blocId, Pageable pageable);
// Vérifications
boolean existsById(Long id);
boolean existsByCode(String code);
Optional<Equipe> findEntityById(Long id);
Optional<Equipe> getEquipeById(Long id);
}

View File

@@ -1,49 +0,0 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.enums.TypeCampagne;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class CampagnePayloadWeb {
private Long id;
private String refAdministrative;
private String nom;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebut;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFin;
@Enumerated(EnumType.STRING)
private TypeCampagne typeCampagne;
private Long exerciceId ;
private Integer exerciceAnnee ;
private Long structureId ;
private String structureCode ;
private String structureNom ;
public CampagnePayloadWeb(Long id, String refAdministrative, String nom, LocalDate dateDebut, LocalDate dateFin, TypeCampagne typeCampagne, Long exerciceId, Integer exerciceAnnee, Long structureId, String structureCode, String structureNom) {
this.id = id;
this.refAdministrative = refAdministrative;
this.nom = nom;
this.dateDebut = dateDebut;
this.dateFin = dateFin;
this.typeCampagne = typeCampagne;
this.exerciceId = exerciceId;
this.exerciceAnnee = exerciceAnnee;
this.structureId = structureId;
this.structureCode = structureCode;
this.structureNom = structureNom;
}
}

View File

@@ -36,7 +36,6 @@ public class EnquetePayLoadWeb {
private Long zoneRfuId;
private String zoneRfuNom;
private Long personneId;
private String personneIfu;
private String personneNom;
private String personnePrenom;
private String personneRaisonSociale;

View File

@@ -1,58 +0,0 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class EquipePayloadWeb {
private Long id;
private String code;
private String nom;
private Long blocId;
private String blocCode;
private Long secteurId;
private String secteurCode;
private String secteurNom;
private Long campagneId;
private String campagneNom;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebut;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFin;
private Long quartierId;
private String quartierCode;
private String quartierNom;
public EquipePayloadWeb(Long id, String code, String nom, Long blocId, String blocCode, Long secteurId, String secteurCode, String secteurNom, Long campagneId, String campagneNom, LocalDate dateDebut, LocalDate dateFin, Long quartierId, String quartierCode, String quartierNom) {
this.id = id;
this.code = code;
this.nom = nom;
this.blocId = blocId;
this.blocCode = blocCode;
this.secteurId = secteurId;
this.secteurCode = secteurCode;
this.secteurNom = secteurNom;
this.campagneId = campagneId;
this.campagneNom = campagneNom;
this.dateDebut = dateDebut;
this.dateFin = dateFin;
this.quartierId = quartierId;
this.quartierCode = quartierCode;
this.quartierNom = quartierNom;
}
}

View File

@@ -1,50 +0,0 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.entities.user.User;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.ManyToOne;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class ParticiperPayloadWeb {
private Long id;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebut;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFin;
private Long equipeId;
private String equipeCode;
private String equipeNom;
private Long userId;
private String userNom;
private String userPrenom;
public ParticiperPayloadWeb(Long id, LocalDate dateDebut, LocalDate dateFin, Long equipeId, String equipeCode, String equipeNom, Long userId, String userNom, String userPrenom) {
this.id = id;
this.dateDebut = dateDebut;
this.dateFin = dateFin;
this.equipeId = equipeId;
this.equipeCode = equipeCode;
this.equipeNom = equipeNom;
this.userId = userId;
this.userNom = userNom;
this.userPrenom = userPrenom;
}
}

View File

@@ -73,12 +73,12 @@ public class ParcelleRepositoryCustomImpl implements ParcelleRepositoryCustom {
r.numero as rueNumero,
r.nom as rueNom,
pers.id as proprietaireId,
pers.ifu as proprietaireIfu,
pers.npi as proprietaireNpi,
pers.nom as proprietaireNom,
pers.prenom as proprietairePrenom,
pers.raison_sociale as proprietaireRaisonSociale,
pers.id as personneId,
pers.ifu as ifu,
pers.npi as npi,
pers.nom as nom,
pers.prenom as prenom,
pers.raison_sociale as raisonSociale,
de.id as enqueteCouranteId

View File

@@ -121,10 +121,6 @@ FROM impositions_tfu imp
order by exo.annee,dimp.parcelle_id,dimp.nature_impot, dimp.montant_taxe-coalesce(dimp.acompte,0)-coalesce(dimp.retenu_irf,0) desc ;
select * from e_avis_view
select *
from impositions_tfu;
---------------------------------------------------

View File

@@ -63,15 +63,6 @@ $$;
call integrer_eavis();
call integrer_eavis_detail();
select * from eavis
select *
from e_avis_view ;
select * from eavis;
select * from eavis_detail;
select *
from donnees_imposition_tfu;
delete from eavis;

View File

@@ -147,11 +147,3 @@ select * from arrondissement
select left(code,4) as code_commune_fiscad, code as code_quartier_fiscad,nom as nom_quartier_fiscad
from quartier;
create function get_dblink_connection_sigibe() returns text
language sql
as
$$
SELECT 'host=193.181.208.4 port=5433 dbname=sigibe_test user=sigibe_test_user password=sigibe_test_pwd';
$$;

View File

@@ -667,7 +667,7 @@ SELECT new io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb(
LEFT join d.structure s
LEFT join d.zoneRfu z
WHERE itfu.id = :impositionTfuId
and d.homologable is null
and (d.homologable is true or d.homologable is null)
order by d.nomProp,d.nomProp asc
""")
Page<DonneesImpositionPaylaodWeb> findAllByImpositionTfuIdHomologablePageable(
@@ -682,7 +682,7 @@ SELECT new io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb(
UPDATE DonneesImpositionTfu d
SET d.homologable = true
WHERE d.impositionsTfu.id = :impositionsTfuId
AND d.homologable IS NULL
AND (d.homologable IS NULL OR d.homologable = true)
""")
int homologuerDonneesImposition(
@Param("impositionsTfuId") Long impositionsTfuId

View File

@@ -1,175 +0,0 @@
package io.gmss.fiscad.persistence.repositories.rfu.metier;
import io.gmss.fiscad.entities.rfu.metier.Participer;
import io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
public interface ParticiperRepository extends JpaRepository<Participer, Long> {
boolean existsByEquipeIdAndUserId(Long equipeId, Long userId);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
WHERE p.id = :id
""")
Optional<ParticiperPayloadWeb> findPayloadById(@Param("id") Long id);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
ORDER BY e.nom, u.nom, u.prenom
""")
List<ParticiperPayloadWeb> findAllPayload();
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
""",
countQuery = """
SELECT COUNT(p)
FROM Participer p
""")
Page<ParticiperPayloadWeb> findAllPayload(Pageable pageable);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
WHERE e.id = :equipeId
""",
countQuery = """
SELECT COUNT(p)
FROM Participer p
WHERE p.equipe.id = :equipeId
""")
Page<ParticiperPayloadWeb> findAllPayloadByEquipeId(
@Param("equipeId") Long equipeId,
Pageable pageable);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
WHERE u.id = :userId
""",
countQuery = """
SELECT COUNT(p)
FROM Participer p
WHERE p.user.id = :userId
""")
Page<ParticiperPayloadWeb> findAllPayloadByUserId(
@Param("userId") Long userId,
Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
WHERE e.id = :equipeId
ORDER BY u.nom, u.prenom
""")
List<ParticiperPayloadWeb> findAllPayloadByEquipeId(@Param("equipeId") Long equipeId);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParticiperPayloadWeb(
p.id,
p.dateDebut,
p.dateFin,
e.id,
e.code,
e.nom,
u.id,
u.nom,
u.prenom
)
FROM Participer p
LEFT JOIN p.equipe e
LEFT JOIN p.user u
WHERE u.id = :userId
ORDER BY e.nom
""")
List<ParticiperPayloadWeb> findAllPayloadByUserId(@Param("userId") Long userId);
}

View File

@@ -2,186 +2,11 @@ package io.gmss.fiscad.persistence.repositories.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Campagne;
import io.gmss.fiscad.enums.TypeCampagne;
import io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
public interface CampagneRepository extends JpaRepository<Campagne, Long> {
List<Campagne> findAllByTypeCampagne(TypeCampagne typeCampagne);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
WHERE c.id = :id
""")
Optional<CampagnePayloadWeb> findPayloadById(@Param("id") Long id);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
ORDER BY c.dateDebut DESC
""")
List<CampagnePayloadWeb> findAllPayload();
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
""",
countQuery = """
SELECT COUNT(c)
FROM Campagne c
""")
Page<CampagnePayloadWeb> findAllPayload(Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
WHERE e.id = :exerciceId
ORDER BY c.dateDebut DESC
""")
List<CampagnePayloadWeb> findAllPayloadByExerciceId(@Param("exerciceId") Long exerciceId);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
WHERE e.id = :exerciceId
""",
countQuery = """
SELECT COUNT(c)
FROM Campagne c
WHERE c.exercice.id = :exerciceId
""")
Page<CampagnePayloadWeb> findAllPayloadByExerciceId(
@Param("exerciceId") Long exerciceId,
Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
WHERE s.id = :structureId
ORDER BY c.dateDebut DESC
""")
List<CampagnePayloadWeb> findAllPayloadByStructureId(@Param("structureId") Long structureId);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.CampagnePayloadWeb(
c.id,
c.refAdministrative,
c.nom,
c.dateDebut,
c.dateFin,
c.typeCampagne,
e.id,
e.annee,
s.id,
s.code,
s.nom
)
FROM Campagne c
LEFT JOIN c.exercice e
LEFT JOIN c.structure s
WHERE s.id = :structureId
""",
countQuery = """
SELECT COUNT(c)
FROM Campagne c
WHERE c.structure.id = :structureId
""")
Page<CampagnePayloadWeb> findAllPayloadByStructureId(
@Param("exerciceId") Long structureId,
Pageable pageable);
}

View File

@@ -1,292 +1,9 @@
package io.gmss.fiscad.persistence.repositories.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
import io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
public interface EquipeRepository extends JpaRepository<Equipe, Long> {
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE e.id = :id
""")
Optional<EquipePayloadWeb> findPayloadById(@Param("id") Long id);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
ORDER BY e.nom
""")
List<EquipePayloadWeb> findAllPayload();
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
""",
countQuery = """
SELECT COUNT(e)
FROM Equipe e
""")
Page<EquipePayloadWeb> findAllPayload(Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE c.id = :campagneId
ORDER BY e.nom
""")
List<EquipePayloadWeb> findAllPayloadByCampagneId(@Param("campagneId") Long campagneId);
@Query(value ="""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE c.id = :campagneId
ORDER BY e.nom
""",
countQuery = """
SELECT COUNT(e)
FROM Equipe e
where e.campagne.id= :campagneId
""")
Page<EquipePayloadWeb> findAllPayloadByCampagneId(@Param("campagneId") Long campagneId,Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE s.id = :secteurId
ORDER BY e.nom
""")
List<EquipePayloadWeb> findAllPayloadBySecteurId(@Param("secteurId") Long secteurId);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE e.quartier.id = :quartierId
ORDER BY e.nom
""")
List<EquipePayloadWeb> findAllPayloadByQuartierId(@Param("quartierId") Long quartierId);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE e.quartier.id = :quartierId
""",
countQuery = """
SELECT COUNT(e)
FROM Equipe e
WHERE e.quartier.id = :quartierId
""")
Page<EquipePayloadWeb> findAllPayloadByQuartierId(
@Param("quartierId") Long quartierId,
Pageable pageable);
@Query(value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EquipePayloadWeb(
e.id,
e.code,
e.nom,
b.id,
b.cote,
s.id,
s.code,
s.nom,
c.id,
c.nom,
e.dateDebut,
e.dateFin,
q.id,
q.code,
q.nom
)
FROM Equipe e
LEFT JOIN e.bloc b
LEFT JOIN e.secteur s
LEFT JOIN e.campagne c
LEFT JOIN e.quartier q
WHERE e.secteur.id = :secteurId
""",
countQuery = """
SELECT COUNT(e)
FROM Equipe e
WHERE e.secteur.id = :secteurId
""")
Page<EquipePayloadWeb> findAllPayloadBySecteurId(
@Param("secteurId") Long secteurId,
Pageable pageable);
}

View File

@@ -10,8 +10,5 @@ import java.util.Optional;
public interface ExerciceRepository extends JpaRepository<Exercice, Long> {
Optional<Exercice> findFirstByAnnee(int annee);
boolean existsByAnnee(Integer annee);
boolean existsByAnneeAndIdNot(Integer annee, Long id);
}

View File

@@ -88,26 +88,25 @@ public interface AvoirFonctionRepository extends JpaRepository<AvoirFonction, Lo
Page<AvoirFonctionPaylaodWeb> findAllAvoirFonctionToDtoPageable(Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.AvoirFonctionPaylaodWeb(
af.id,
af.dateDebut,
af.dateFin,
f.id,
f.code,
f.nom,
u.id,
u.username,
u.nom,
u.prenom,
u.email,
af.titre
)
FROM AvoirFonction af
LEFT JOIN af.user u
LEFT JOIN af.fonction f
WHERE u.id = :userId
AND (af.dateFin IS NULL OR af.dateFin >= CURRENT_DATE)
""")
SELECT new io.gmss.fiscad.paylaods.request.crudweb.AvoirFonctionPaylaodWeb(
af.id,
af.dateDebut,
af.dateFin,
f.id,
f.code,
f.nom,
u.id,
u.username,
u.nom,
u.prenom,
u.email,
af.titre
)
FROM AvoirFonction af
LEFT JOIN af.user u
LEFT JOIN af.fonction f
WHERE u.id = :userId
""")
List<AvoirFonctionPaylaodWeb> findAllAvoirFonctionByUserToDto(@Param("userId") Long userId);

View File

@@ -38,9 +38,6 @@ public class EntityFromPayLoadService {
private final TypePieceRepository typePieceRepository;
private final PieceRepository pieceRepository;
private final CaracteristiqueRepository caracteristiqueRepository;
private final EquipeRepository equipeRepository;
private final BlocRepository blocRepository;
private final CampagneRepository campagneRepository;
private final ModeAcquisitionRepository modeAcquisitionRepository;
private final PersonneRepository personneRepository;
private final SourceDroitRepository sourceDroitRepository;
@@ -81,7 +78,6 @@ public class EntityFromPayLoadService {
private final CommuneCentreAssignationRepository communeCentreAssignationRepository ;
private final ModuleRepository moduleRepository ;
private final FonctionnaliteRepository fonctionnaliteRepository ;
private final ParticiperRepository participerRepository ;
private final ProfileModuleFonctionnaliteRepository profileModuleFonctionnaliteRepository ;
private final TypeCaracteristiqueRepository typeCaracteristiqueRepository ;
@@ -143,46 +139,6 @@ public class EntityFromPayLoadService {
}
public Equipe getEquipeFromPayLoadWeb(EquipePayloadWeb equipePayloadWeb){
Equipe equipe=new Equipe();
if(equipePayloadWeb.getId()!=null)
equipe = equipeRepository.findById(equipePayloadWeb.getId()).orElse(new Equipe());
Optional<Campagne> optionalCampagne=Optional.empty();
Optional<Secteur> optionalSecteur=Optional.empty();
Optional<Quartier> optionalQuartier=Optional.empty();
Optional<Bloc> optionalBloc=Optional.empty();
if(equipePayloadWeb.getBlocId()!=null)
optionalBloc=blocRepository.findById(equipePayloadWeb.getBlocId());
if(equipePayloadWeb.getCampagneId()!=null)
optionalCampagne=campagneRepository.findById(equipePayloadWeb.getCampagneId());
if(equipePayloadWeb.getSecteurId()!=null)
optionalSecteur=secteurRepository.findById(equipePayloadWeb.getSecteurId());
if(equipePayloadWeb.getQuartierId()!=null)
optionalQuartier=quartierRepository.findById(equipePayloadWeb.getQuartierId());
if(optionalBloc.isPresent())
equipe.setBloc(optionalBloc.get());
if(optionalCampagne.isPresent())
equipe.setCampagne(optionalCampagne.get());
if(optionalSecteur.isPresent())
equipe.setSecteur(optionalSecteur.get());
if(optionalQuartier.isPresent())
equipe.setQuartier(optionalQuartier.get());
equipe.setId(equipePayloadWeb.getId());
equipe.setNom(equipePayloadWeb.getNom());
equipe.setCode(equipePayloadWeb.getCode());
equipe.setDateDebut(equipePayloadWeb.getDateDebut());
equipe.setDateFin(equipePayloadWeb.getDateFin());
return equipe;
}
public ModeAcquisition getModeAcquisitionFromPayLoadWeb(ModeAcquisitionPayloadWeb modeAcquisitionPayloadWeb){
ModeAcquisition modeAcquisition=new ModeAcquisition();
if(modeAcquisitionPayloadWeb.getId()!=null)
@@ -1206,56 +1162,4 @@ public class EntityFromPayLoadService {
return profileModuleFonctionnalite ;
}
public Participer getParticiperFromPayLoadWeb(ParticiperPayloadWeb participerPayloadWeb) {
Participer participer =new Participer();
if(participerPayloadWeb.getId()!=null)
participer = participerRepository.findById(participerPayloadWeb.getId()).orElse(new Participer());
if (participerPayloadWeb.getEquipeId() != null) {
Equipe equipe = new Equipe();
equipe.setId(participerPayloadWeb.getEquipeId());
participer.setEquipe(equipe);
}
if (participerPayloadWeb.getUserId() != null) {
User user = new User();
user.setId(participerPayloadWeb.getUserId());
participer.setUser(user);
}
participer.setId(participerPayloadWeb.getId());
participer.setDateDebut(participerPayloadWeb.getDateDebut());
participer.setDateFin(participerPayloadWeb.getDateFin());
return participer ;
}
public Campagne getCampagneFromPayLoadWeb(CampagnePayloadWeb campagnePayloadWeb) {
Campagne campagne =new Campagne();
if(campagnePayloadWeb.getId()!=null)
campagne = campagneRepository.findById(campagnePayloadWeb.getId()).orElse(new Campagne());
if (campagnePayloadWeb.getExerciceId() != null) {
Exercice exercice = new Exercice();
exercice.setId(campagnePayloadWeb.getExerciceId());
campagne.setExercice(exercice);
}
if (campagnePayloadWeb.getStructureId() != null) {
Structure structure = new Structure();
structure.setId(campagnePayloadWeb.getStructureId());
campagne.setStructure(structure);
}
campagne.setId(campagnePayloadWeb.getId());
campagne.setDateDebut(campagnePayloadWeb.getDateDebut());
campagne.setDateFin(campagnePayloadWeb.getDateFin());
campagne.setTypeCampagne(campagnePayloadWeb.getTypeCampagne());
campagne.setRefAdministrative(campagnePayloadWeb.getRefAdministrative());
campagne.setNom(campagnePayloadWeb.getNom());
return campagne ;
}
}

View File

@@ -2,16 +2,16 @@ server.port=8282
io.gmss.fiscad.profile=test
# LOCAL ENV TEST
#spring.datasource.url=jdbc:postgresql://localhost:5432/fiscad_dgi
#spring.datasource.username=infocad_user
#spring.datasource.password=W5fwD({9*q53
spring.datasource.url=jdbc:postgresql://193.181.208.4:5432/fiscad_db
spring.datasource.username=fiscad_user
spring.datasource.url=jdbc:postgresql://localhost:5432/fiscad_dgi
spring.datasource.username=infocad_user
spring.datasource.password=W5fwD({9*q53
#spring.datasource.url=jdbc:postgresql://193.181.208.4:5432/fiscad_db
#spring.datasource.username=fiscad_user
#spring.datasource.password=W5fwD({9*q53
app.default-user.username=fiscad_admin
app.default-user.password=1234567890