173 Commits

Author SHA1 Message Date
4cb2ba8474 Merge pull request 'develop' (#311) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #311
2026-08-05 18:21:41 +00:00
f378b1f0eb Merge pull request 'reajustement workflow' (#310) from features/fiche_refonte into develop
Reviewed-on: #310
2026-08-05 18:20:43 +00:00
b0e0caf3bb reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 35s
2026-08-05 19:20:16 +01:00
57022e1def Merge pull request 'develop' (#309) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m6s
Reviewed-on: #309
2026-08-05 18:11:07 +00:00
4ae2620fc0 Merge pull request 'reajustement workflow' (#308) from features/fiche_refonte into develop
Reviewed-on: #308
2026-08-05 18:10:17 +00:00
c9f7afb23d reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 40s
2026-08-05 19:07:05 +01:00
22a2519b89 Merge pull request 'develop' (#307) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m2s
Reviewed-on: #307
2026-08-04 19:52:55 +00:00
93732ef18b Merge pull request 'reajustement workflow' (#306) from features/fiche_refonte into develop
Reviewed-on: #306
2026-08-04 19:51:42 +00:00
08a4762a83 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 58s
2026-08-04 20:46:21 +01:00
9b6ea82e15 Merge pull request 'develop' (#305) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m10s
Reviewed-on: #305
2026-08-04 11:22:30 +00:00
cb012adedb Merge pull request 'reajustement workflow' (#304) from features/fiche_refonte into develop
Reviewed-on: #304
2026-08-04 11:21:33 +00:00
d38784b682 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 44s
2026-08-04 12:18:55 +01:00
8fcd7d2e50 Merge pull request 'develop' (#303) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #303
2026-08-03 13:26:48 +00:00
a6fe645909 Merge pull request 'reajustement workflow' (#302) from features/fiche_refonte into develop
Reviewed-on: #302
2026-08-03 13:25:55 +00:00
a475a0d298 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 36s
2026-08-03 14:24:51 +01:00
917bd4b6c5 Merge pull request 'develop' (#301) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m10s
Reviewed-on: #301
2026-08-03 12:49:27 +00:00
d5f868a79e Merge pull request 'reajustement workflow' (#300) from features/fiche_refonte into develop
Reviewed-on: #300
2026-08-03 12:48:39 +00:00
0a24ef47c3 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 36s
2026-08-03 13:48:11 +01:00
4e72d329ed Merge pull request 'develop' (#299) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m9s
Reviewed-on: #299
2026-08-03 08:16:11 +00:00
1805ea92e1 Merge pull request 'reajustement workflow' (#298) from features/fiche_refonte into develop
Reviewed-on: #298
2026-08-03 08:14:43 +00:00
cd336225a3 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 42s
2026-08-03 09:14:06 +01:00
db36e8fa31 Merge pull request 'develop' (#297) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #297
2026-08-02 21:15:32 +00:00
37b967a6fe Merge pull request 'reajustement workflow' (#296) from features/fiche_refonte into develop
Reviewed-on: #296
2026-08-02 21:11:43 +00:00
3119060aa2 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 32s
2026-08-02 22:10:44 +01:00
1b87719ffe Merge pull request 'develop' (#295) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #295
2026-08-02 18:00:29 +00:00
2c4461979f Merge pull request 'reajustement workflow' (#294) from features/fiche_refonte into develop
Reviewed-on: #294
2026-08-02 17:58:08 +00:00
774611f0b8 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 36s
2026-08-02 18:57:14 +01:00
c4916022b2 Merge pull request 'develop' (#293) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #293
2026-08-02 16:57:45 +00:00
36d88abd3d Merge pull request 'reajustement workflow' (#292) from features/fiche_refonte into develop
Reviewed-on: #292
2026-08-02 16:56:55 +00:00
7885169c9a reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 34s
2026-08-02 17:55:56 +01:00
3eb4406f4a Merge pull request 'develop' (#291) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m6s
Reviewed-on: #291
2026-08-02 11:43:23 +00:00
c0c9f5e212 Merge pull request 'reajustement workflow' (#290) from features/fiche_refonte into develop
Reviewed-on: #290
2026-08-02 11:41:32 +00:00
70f7d6ba58 reajustement workflow
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 39s
2026-08-02 12:38:52 +01:00
53bdeb0734 Merge pull request 'develop' (#289) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m3s
Reviewed-on: #289
2026-07-31 13:24:25 +00:00
ed054ae4f3 Merge pull request 'develop' (#287) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #287
2026-07-31 12:05:34 +00:00
b3c563d4b6 Merge pull request 'develop' (#285) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 57s
Reviewed-on: #285
2026-07-30 13:24:54 +00:00
58b6924be2 Merge pull request 'develop' (#283) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #283
2026-07-29 17:39:55 +00:00
c224185aa1 Merge pull request 'develop' (#281) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #281
2026-07-29 15:22:44 +00:00
838eb03833 Merge pull request 'develop' (#279) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #279
2026-07-28 16:35:48 +00:00
bb2dccf7f5 Merge pull request 'develop' (#277) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #277
2026-07-28 16:11:36 +00:00
945391fb89 Merge pull request 'develop' (#275) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #275
2026-07-28 13:30:27 +00:00
87306e6c42 Merge pull request 'develop' (#273) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #273
2026-07-27 16:57:36 +00:00
121ac58f51 Merge pull request 'develop' (#271) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #271
2026-07-27 16:19:28 +00:00
9e652e2acc Merge pull request 'develop' (#269) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #269
2026-07-24 16:03:26 +00:00
dd8891a3fb Merge pull request 'develop' (#267) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #267
2026-07-24 15:07:58 +00:00
f7bb899497 Merge pull request 'develop' (#265) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #265
2026-07-24 14:18:41 +00:00
0bd56a6e44 Merge pull request 'develop' (#263) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #263
2026-07-24 13:36:52 +00:00
3a057aa155 Merge pull request 'develop' (#261) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #261
2026-07-24 13:09:06 +00:00
39d673270f Merge pull request 'develop' (#259) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #259
2026-07-23 10:46:54 +00:00
65050cf981 Merge pull request 'develop' (#257) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #257
2026-07-23 09:42:21 +00:00
27981d656e Merge pull request 'develop' (#255) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 58s
Reviewed-on: #255
2026-07-20 19:34:29 +00:00
98641cd52f Merge pull request 'develop' (#253) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #253
2026-07-17 14:13:07 +00:00
3c2bd72aeb Merge pull request 'develop' (#251) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #251
2026-07-10 15:40:56 +00:00
c16a64b1cc Merge pull request 'develop' (#249) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #249
2026-07-09 21:44:09 +00:00
ceb806db2d Merge pull request 'develop' (#247) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #247
2026-07-09 16:47:37 +00:00
02cd322eed Merge pull request 'develop' (#245) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #245
2026-07-08 15:44:19 +00:00
95828a304d Merge pull request 'develop' (#243) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #243
2026-07-04 13:34:01 +00:00
3edef3963e Merge pull request 'develop' (#241) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #241
2026-07-04 10:39:32 +00:00
cde3847b5f Merge pull request 'develop' (#239) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 58s
Reviewed-on: #239
2026-07-03 19:00:09 +00:00
919e3938eb Merge pull request 'develop' (#237) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 54s
Reviewed-on: #237
2026-07-03 15:04:43 +00:00
5cdd27a2f9 Merge pull request 'develop' (#235) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #235
2026-07-03 14:39:47 +00:00
8cba64f520 Merge pull request 'develop' (#233) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #233
2026-07-02 15:14:46 +00:00
5c4248a5ae Merge pull request 'develop' (#231) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #231
2026-07-01 19:30:02 +00:00
6a2aadd6dd Merge pull request 'develop' (#229) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #229
2026-07-01 19:17:09 +00:00
272182d605 Merge pull request 'develop' (#227) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m1s
Reviewed-on: #227
2026-06-19 19:01:46 +00:00
a404b9b678 Merge pull request 'develop' (#225) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m1s
Reviewed-on: #225
2026-06-19 18:40:12 +00:00
ce0bf6cdf9 Merge pull request 'develop' (#223) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m2s
Reviewed-on: #223
2026-06-18 10:58:23 +00:00
6c9c0d1920 Merge pull request 'develop' (#221) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 57s
Reviewed-on: #221
2026-06-17 23:48:39 +00:00
6ac42d08fb Merge pull request 'develop' (#219) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m0s
Reviewed-on: #219
2026-06-12 13:33:54 +00:00
816bff63bd Merge pull request 'develop' (#217) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m0s
Reviewed-on: #217
2026-06-05 11:41:33 +00:00
07dc4630db Merge pull request 'develop' (#215) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #215
2026-06-01 17:38:45 +00:00
752f01cfc4 Merge pull request 'develop' (#213) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #213
2026-06-01 17:23:31 +00:00
7911903bd8 Merge pull request 'develop' (#211) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #211
2026-05-15 12:10:42 +00:00
953deff41c Merge pull request 'develop' (#209) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 59s
Reviewed-on: #209
2026-04-30 16:09:27 +00:00
aa8a24f81e Merge pull request 'develop' (#207) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #207
2026-04-30 10:33:18 +00:00
ad28588b0a Merge pull request 'develop' (#205) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #205
2026-04-24 15:47:23 +00:00
1775c19c0a Merge pull request 'develop' (#203) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 58s
Reviewed-on: #203
2026-04-24 13:55:41 +00:00
dda6262b23 Merge pull request 'develop' (#201) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 57s
Reviewed-on: #201
2026-04-10 14:09:19 +00:00
5094b1a945 Merge pull request 'develop' (#199) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #199
2026-04-01 20:04:39 +00:00
0bedbf0764 Merge pull request 'develop' (#197) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Has been cancelled
Reviewed-on: #197
2026-03-24 21:18:04 +00:00
e333b82e96 Merge pull request 'develop' (#195) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #195
2026-03-23 19:56:07 +00:00
a192520b30 Merge pull request 'develop' (#193) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #193
2026-03-22 18:44:13 +00:00
4cd6e7cbae Merge pull request 'develop' (#191) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #191
2026-03-21 20:28:21 +00:00
6c0fa1ca27 Merge pull request 'develop' (#189) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #189
2026-03-21 15:00:15 +00:00
1e4e8f9ff6 Merge pull request 'develop' (#187) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #187
2026-03-21 14:17:09 +00:00
d4d4a7be44 Merge pull request 'develop' (#185) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 52s
Reviewed-on: #185
2026-03-21 10:14:49 +00:00
5ea1c93d2b Merge pull request 'develop' (#183) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #183
2026-03-20 13:40:42 +00:00
e325b12546 Merge pull request 'develop' (#180) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #180
2026-03-19 18:47:05 +00:00
47bcda41fd Merge pull request 'develop' (#178) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #178
2026-03-19 18:00:57 +00:00
3438da3880 Merge pull request 'develop' (#176) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 31s
Reviewed-on: #176
2026-03-19 16:16:29 +00:00
ebb91f8318 Merge pull request 'develop' (#174) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #174
2026-03-19 10:25:54 +00:00
767756acfc Merge pull request 'develop' (#172) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 2m58s
Reviewed-on: #172
2026-03-18 17:24:33 +00:00
84ede82428 Merge pull request 'develop' (#170) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m49s
Reviewed-on: #170
2026-03-16 13:30:32 +00:00
5beddc7c1b Merge pull request 'develop' (#168) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m49s
Reviewed-on: #168
2026-03-14 15:11:20 +00:00
a6f7f3d465 Merge pull request 'develop' (#166) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Successful in 48s
CI - Build & Test (develop) / build-and-test (pull_request) Has been cancelled
Reviewed-on: #166
2026-03-12 20:02:24 +00:00
43b060371a Merge pull request 'develop' (#164) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 47s
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
Reviewed-on: #164
2026-03-12 19:35:02 +00:00
71f0aa6cd0 Merge pull request 'develop' (#162) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 27s
Reviewed-on: #162
2026-03-12 11:28:15 +00:00
87f8ad7a61 Merge pull request 'develop' (#159) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
Reviewed-on: #159
2026-03-12 11:23:32 +00:00
6a29a3f43c Merge pull request 'develop' (#157) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #157
2026-03-12 00:03:43 +00:00
3e871a31e6 Merge pull request 'develop' (#155) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #155
2026-03-11 00:11:17 +00:00
9c62c99305 Merge pull request 'develop' (#153) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #153
2026-03-10 21:38:50 +00:00
8fb0088010 Merge pull request 'develop' (#151) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #151
2026-03-09 20:14:21 +00:00
1e810f0ddb Merge pull request 'develop' (#149) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #149
2026-03-09 20:00:49 +00:00
a54adcdcb8 Merge pull request 'develop' (#147) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #147
2026-03-09 19:32:55 +00:00
6b63ae2f52 Merge pull request 'develop' (#145) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #145
2026-03-09 18:53:16 +00:00
6851270bd5 Merge pull request 'develop' (#143) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #143
2026-03-08 13:55:11 +00:00
739cc89872 Merge pull request 'develop' (#139) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #139
2026-03-06 19:09:52 +00:00
dffd6a54a3 Merge pull request 'develop' (#137) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #137
2026-03-01 17:35:07 +00:00
267c09c064 Merge pull request 'develop' (#134) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 30s
Reviewed-on: #134
2026-03-01 01:41:31 +00:00
be4524ed67 Merge pull request 'develop' (#132) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #132
2026-02-22 23:18:39 +00:00
06ea9474f1 Merge pull request 'develop' (#130) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #130
2026-02-22 13:56:30 +00:00
c0267fca5e Merge pull request 'develop' (#128) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 55s
Reviewed-on: #128
2026-02-21 12:42:57 +00:00
55b97936ab Merge pull request 'develop' (#126) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #126
2026-02-20 19:34:40 +00:00
adcd51e32b Merge pull request 'develop' (#124) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #124
2026-02-20 18:54:49 +00:00
666519df84 Merge pull request 'develop' (#122) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #122
2026-02-19 20:40:30 +00:00
beb41af562 Merge pull request 'develop' (#120) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #120
2026-02-19 19:08:34 +00:00
57dfdaf64f Merge pull request 'develop' (#118) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #118
2026-02-19 18:33:57 +00:00
f7e3c118e2 Merge pull request 'develop' (#116) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #116
2026-02-19 12:01:26 +00:00
2b4adc0db2 Merge pull request 'develop' (#114) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #114
2026-02-18 23:06:18 +00:00
a0baf985d4 Merge pull request 'develop' (#112) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 53s
Reviewed-on: #112
2026-02-18 20:43:22 +00:00
85e9a41fe2 Merge pull request 'develop' (#110) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 1m1s
Reviewed-on: #110
2026-02-18 14:02:25 +00:00
3102dbc053 Merge pull request 'develop' (#108) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #108
2026-02-16 22:05:19 +00:00
a21be6aef3 Merge pull request 'develop' (#106) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #106
2026-02-16 20:58:29 +00:00
4d708ff4ca Merge pull request 'develop' (#104) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #104
2026-02-16 00:15:47 +00:00
ea1f92c7e2 Merge pull request 'develop' (#102) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #102
2026-02-14 14:09:03 +00:00
9e5e8551f0 Merge pull request 'develop' (#100) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 47s
Reviewed-on: #100
2026-02-13 17:56:04 +00:00
b8b28a673b Merge pull request 'develop' (#98) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 46s
Reviewed-on: #98
2026-02-12 21:33:39 +00:00
70c8c26367 Merge pull request 'develop' (#96) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 46s
Reviewed-on: #96
2026-02-12 02:16:05 +00:00
e1459d85ea Merge pull request 'develop' (#94) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 50s
Reviewed-on: #94
2026-02-11 21:15:46 +00:00
f927db064a Merge pull request 'develop' (#92) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Has been cancelled
Reviewed-on: #92
2026-02-11 21:13:33 +00:00
0589883f8e Merge pull request 'develop' (#90) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 46s
Reviewed-on: #90
2026-02-10 00:11:18 +00:00
d73e64dbac Merge pull request 'develop' (#88) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #88
2026-02-09 23:27:26 +00:00
cf7c3aaeb2 Merge pull request 'develop' (#86) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 51s
Reviewed-on: #86
2026-02-08 22:24:03 +00:00
cd4fcb7aa0 Merge pull request 'develop' (#84) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 47s
Reviewed-on: #84
2026-02-04 01:34:27 +00:00
1e0cfead5b Merge pull request 'develop' (#82) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #82
2026-02-03 19:34:06 +00:00
0837d0ce08 Merge pull request 'develop' (#80) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #80
2026-02-03 15:09:35 +00:00
b58316bb88 Merge pull request 'develop' (#78) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 49s
Reviewed-on: #78
2026-02-02 23:04:11 +00:00
209d1cd777 Merge pull request 'develop' (#76) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #76
2026-02-01 22:50:41 +00:00
1eb3aeeda0 Merge pull request 'develop' (#74) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 48s
Reviewed-on: #74
2026-01-27 08:59:25 +00:00
b3c288628c Merge pull request 'develop' (#71) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 56s
Reviewed-on: #71
2026-01-13 20:34:13 +00:00
d45e01ac85 Merge pull request 'develop' (#69) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 46s
Reviewed-on: #69
2025-12-20 19:04:38 +00:00
9bb0cc5c75 Merge pull request 'develop' (#67) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 47s
Reviewed-on: #67
2025-12-20 18:56:24 +00:00
3a68fd2ce4 Merge pull request 'develop' (#65) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 44s
Reviewed-on: #65
2025-12-20 17:07:04 +00:00
fa7421c35b Merge pull request 'develop' (#63) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 35s
Reviewed-on: #63
2025-12-20 15:04:55 +00:00
5cb9497163 Merge pull request 'develop' (#61) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 34s
Reviewed-on: #61
2025-12-20 14:50:28 +00:00
15cac660bc Merge pull request 'develop' (#59) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 34s
Reviewed-on: #59
2025-12-20 14:34:41 +00:00
0feec2982f Merge pull request 'develop' (#57) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 35s
Reviewed-on: #57
2025-12-20 14:14:47 +00:00
b5ab0772a0 Merge pull request 'develop' (#55) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 35s
Reviewed-on: #55
2025-12-20 13:11:40 +00:00
f293f65650 Merge pull request 'develop' (#53) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 35s
Reviewed-on: #53
2025-12-20 12:58:25 +00:00
cfd1104c28 Merge pull request 'develop' (#51) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 39s
Reviewed-on: #51
2025-12-20 12:42:50 +00:00
7d64390bae Merge pull request 'develop' (#49) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 34s
Reviewed-on: #49
2025-12-20 12:22:29 +00:00
4876d8ab14 Merge pull request 'develop' (#47) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 39s
Reviewed-on: #47
2025-12-20 12:11:18 +00:00
2bfb298054 Merge pull request 'develop' (#45) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 36s
Reviewed-on: #45
2025-12-20 12:01:44 +00:00
54ef33d1ab Merge pull request 'develop' (#43) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 33s
Reviewed-on: #43
2025-12-20 11:44:36 +00:00
3fd779854f Merge pull request 'develop' (#41) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 27s
Reviewed-on: #41
2025-12-20 11:40:18 +00:00
de2928414b Merge pull request 'develop' (#39) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 39s
Reviewed-on: #39
2025-12-20 10:49:00 +00:00
9d6d278d78 Merge pull request 'develop' (#37) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 34s
Reviewed-on: #37
2025-12-20 10:02:57 +00:00
c8b0457195 Merge pull request 'develop' (#35) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 35s
Reviewed-on: #35
2025-12-19 19:18:44 +00:00
9cc74a9a38 Merge pull request 'develop' (#31) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 33s
Reviewed-on: #31
2025-12-18 15:47:46 +00:00
8e6168d4ee Merge pull request 'develop' (#29) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Has been skipped
Reviewed-on: #29
2025-12-18 15:46:31 +00:00
c1a8ce86a6 Merge pull request 'develop' (#27) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Has been skipped
Reviewed-on: #27
2025-12-18 10:36:59 +00:00
14feb49dcd Merge pull request 'develop' (#25) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 33s
Reviewed-on: #25
2025-12-17 17:14:31 +00:00
39de1c48c0 Merge pull request 'develop' (#23) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 34s
Reviewed-on: #23
2025-12-17 16:59:31 +00:00
f9e2b32118 Merge pull request 'develop' (#21) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 33s
Reviewed-on: #21
2025-12-17 16:49:53 +00:00
3ebb1cf165 Merge pull request 'develop' (#19) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 33s
Reviewed-on: #19
2025-12-17 16:42:39 +00:00
c84176b8d3 Merge pull request 'develop' (#17) from develop into main
Some checks failed
CD - Deploy on main / deploy (push) Failing after 33s
Reviewed-on: #17
2025-12-17 16:27:26 +00:00
61f4dd513f Merge pull request 'develop' (#15) from develop into main
All checks were successful
CD - Deploy on main / deploy (push) Successful in 38s
Reviewed-on: #15
2025-12-17 14:16:12 +00:00
5e9f437497 Merge pull request 'develop' (#13) from develop into main
Reviewed-on: #13
2025-12-16 18:23:59 +00:00
69af57f876 Merge pull request 'develop' (#11) from develop into main
Reviewed-on: #11
2025-12-16 18:08:36 +00:00
56f78e77f3 Merge pull request 'develop' (#9) from develop into main
Reviewed-on: #9
2025-12-05 19:24:21 +00:00
0c7dc082fd Merge pull request 'develop' (#7) from develop into main
Reviewed-on: #7
2025-12-05 19:21:28 +00:00
3f5d7e980c Merge pull request 'develop' (#5) from develop into main
Reviewed-on: #5
2025-12-05 19:11:10 +00:00
87be4e4483 Merge pull request 'develop' (#3) from develop into main
Reviewed-on: #3
2025-12-05 19:07:16 +00:00
38 changed files with 1857 additions and 221 deletions

View File

@@ -6,6 +6,7 @@ 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;
@@ -408,7 +409,7 @@ public class DonneesImpositionTfuController {
@PreAuthorize("hasAnyAuthority('CREATE_DONNEESIMPOSITIONTFU', 'UPDATE_DONNEESIMPOSITIONTFU')")
public ResponseEntity<?> genererDonneesFiscaleBatieUneParcelle(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb,@PathVariable Long parcelleId) {
try {
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
Optional<ImpositionsTfuPaylaodWeb> optionalImpositionsTfu =impositionsTfuRepository.findByIdToDto(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
@@ -424,6 +425,7 @@ 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
@@ -507,7 +509,7 @@ public class DonneesImpositionTfuController {
@PreAuthorize("hasAnyAuthority('CREATE_DONNEESIMPOSITIONTFU', 'UPDATE_DONNEESIMPOSITIONTFU')")
public ResponseEntity<?> genererDonneesImpositionNonBatiesUneParcelle(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, @PathVariable Long parcelleId) {
try {
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
Optional<ImpositionsTfuPaylaodWeb> optionalImpositionsTfu = impositionsTfuRepository.findByIdToDto(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
@@ -516,19 +518,13 @@ 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,14 +1,17 @@
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;
@@ -29,6 +32,8 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.HttpClientErrorException;
import java.util.Optional;
@RestController
@AllArgsConstructor
@@ -39,6 +44,8 @@ import org.springframework.web.client.HttpClientErrorException;
public class ImpositionsTfuController {
private final ImpositionsTfuService impositionsTfuService;
private final StructureService structureService;
private final EnqueteService enqueteService;
private static final Logger logger = LoggerFactory.getLogger(ImpositionsTfuController.class);
@@ -54,11 +61,22 @@ 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);
if(user.getStructure().getId()!=impositionsTfuPaylaodWeb.getStructureId()){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource."),
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource. Votre centre : "+ user.getStructure().getNom() +" le centre de liquidation : "+ st.getNom()),
HttpStatus.OK
);
}

View File

@@ -0,0 +1,236 @@
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,6 +5,7 @@ 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;
@@ -37,11 +38,11 @@ public class CampagneController {
@PostMapping("/create")
@PreAuthorize("hasAuthority('CREATE_CAMPAGNE')")
public ResponseEntity<?> createCampagne(@RequestBody @Valid @Validated Campagne campagne) {
public ResponseEntity<?> createCampagne(@RequestBody @Valid @Validated CampagnePayloadWeb campagnePayloadWeb) {
try {
campagne = campagneService.createCampagne(campagne);
campagnePayloadWeb = campagneService.createCampagne(campagnePayloadWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, campagne, "Campagne créé avec succès."),
new ApiResponse<>(true, campagnePayloadWeb, "Campagne créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -62,10 +63,10 @@ public class CampagneController {
@PutMapping("/update/{id}")
@PreAuthorize("hasAuthority('UPDATE_CAMPAGNE')")
public ResponseEntity<?> updateCampagne(@PathVariable Long id, @RequestBody Campagne campagne) {
public ResponseEntity<?> updateCampagne(@PathVariable Long id, @RequestBody CampagnePayloadWeb campagnePayloadWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, campagneService.updateCampagne(id, campagne), "Campagne mis à jour avec succès."),
new ApiResponse<>(true, campagneService.updateCampagne(id, campagnePayloadWeb), "Campagne mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -207,5 +208,111 @@ 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,6 +4,7 @@ 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;
@@ -36,12 +37,12 @@ public class EquipeController {
@PostMapping("/create")
@PreAuthorize("hasAuthority('CREATE_EQUIPE')")
public ResponseEntity<?> createEquipe(@RequestBody @Valid @Validated EquipePayload equipePayload) {
// @PreAuthorize("hasAuthority('CREATE_EQUIPE')")
public ResponseEntity<?> createEquipe(@RequestBody @Valid @Validated EquipePayloadWeb equipePayloadWeb) {
try {
Equipe equipe = equipeService.createEquipe(equipePayload);
equipePayloadWeb = equipeService.create(equipePayloadWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, equipe, "Equipe créé avec succès."),
new ApiResponse<>(true, equipePayloadWeb, "Equipe créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -55,17 +56,18 @@ 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 EquipePayload equipePayload) {
// @PreAuthorize("hasAuthority('UPDATE_EQUIPE')")
public ResponseEntity<?> updateEquipe(@PathVariable Long id, @RequestBody EquipePayloadWeb equipePayloadWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.updateEquipe(id, equipePayload), "Equipe mis à jour avec succès."),
new ApiResponse<>(true, equipeService.update(id, equipePayloadWeb), "Equipe mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -88,7 +90,7 @@ public class EquipeController {
@PreAuthorize("hasAuthority('DELETE_EQUIPE')")
public ResponseEntity<?> deleteEquiper(@PathVariable Long id) {
try {
equipeService.deleteEquipe(id);
equipeService.delete(id);
return new ResponseEntity<>(
new ApiResponse<>(true, "Equipe supprimée avec succès."),
HttpStatus.OK
@@ -104,17 +106,18 @@ 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.getEquipeList(), "Liste des equipes chargée avec succès."),
new ApiResponse<>(true, equipeService.findAll(), "Liste des equipes chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -140,7 +143,7 @@ public class EquipeController {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.getEquipeList(pageable), "Liste des equipes chargée avec succès."),
new ApiResponse<>(true, equipeService.findAll(pageable), "Liste des equipes chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -164,7 +167,81 @@ public class EquipeController {
public ResponseEntity<?> getEquipeById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, equipeService.getEquipeById(id), "Equipe trouvée avec succès."),
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."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -38,6 +38,8 @@ 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,6 +27,7 @@ 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;
@@ -183,6 +184,14 @@ 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

@@ -8,7 +8,6 @@ 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;
@@ -16,8 +15,6 @@ 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;
@@ -96,10 +93,10 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
@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

@@ -1,10 +1,11 @@
package io.gmss.fiscad.entities.rfu.parametre;
package io.gmss.fiscad.entities.rfu.metier;
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;
@@ -21,7 +22,15 @@ import java.time.LocalDate;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = " deleted = false")
//@Where(clause = " deleted = false")
@Table(
uniqueConstraints = {
@UniqueConstraint(
name = "uk_participer_equipe_user",
columnNames = {"equipe_id", "user_id"}
)
}
)
public class Participer extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)

View File

@@ -6,6 +6,7 @@ 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;
@@ -39,12 +40,12 @@ public class Campagne extends BaseEntity implements Serializable {
private LocalDate dateFin;
@Enumerated(EnumType.STRING)
private TypeCampagne typeCampagne;
// @JsonIgnore
// @OneToMany(mappedBy = "campagne")
// private List<Equipe> equipes;
// @JsonIgnore
// @OneToMany(mappedBy = "campagne")
// private List<Enquete> enquetes;
@ManyToOne
private Exercice exercice ;
@ManyToOne
private Structure structure ;
}

View File

@@ -1,10 +1,13 @@
package io.gmss.fiscad.entities.rfu.parametre;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
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.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;
@@ -13,6 +16,7 @@ import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@@ -32,6 +36,10 @@ public class Equipe extends BaseEntity implements Serializable {
private Bloc bloc;
@ManyToOne
private Secteur secteur;
@ManyToOne
private Quartier quartier;
@ManyToOne
private Campagne campagne;
@@ -39,6 +47,14 @@ 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,6 +21,11 @@ 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,15 +1,9 @@
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.parametre.Participer;
import io.gmss.fiscad.enums.UserRole;
import io.gmss.fiscad.entities.rfu.metier.Participer;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Getter;
@@ -19,7 +13,6 @@ 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,7 +267,6 @@ public class PersonneServiceImpl implements PersonneService {
}
if(request.getNpi()!=null && !request.getNpi().equals("")){
List<PersonnePayLoadWeb> personnePayLoadWebs = personneRepository.findAllPersonneByNpiToDto(request.getNpi());
if(!personnePayLoadWebs.isEmpty())
return personnePayLoadWebs;
@@ -284,6 +283,7 @@ public class PersonneServiceImpl implements PersonneService {
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.ArrondissementPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.*;
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,6 +45,7 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
private final ArrondissementRepository arrondissementRepository;
private final BaremRfuRepository baremRfuRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
private final StructureService structureService;
@@ -116,23 +117,38 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
@Override
@Transactional
public ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleNonBatieUneParcelle(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, Long userId,Long parcelleId) {
boolean existsBareme = baremRfuNonBatiRepository.existsBaremForParcelleNonBati(parcelleId);
Optional<Parcelle> optionalParcelle= parcelleRepository.findById(parcelleId);
Optional<ParcellePayLoadWeb> optionalParcelle= parcelleRepository.findParcelleToDtoById(parcelleId);
String nomQuartier="";
String nomArrondissement="";
String nomCommune="";
if(optionalParcelle.isPresent()){
nomQuartier= optionalParcelle.get().getQuartier().getNom();
nomArrondissement= optionalParcelle.get().getQuartier().getArrondissement().getNom();
nomCommune= optionalParcelle.get().getQuartier().getArrondissement().getCommune().getNom();
nomQuartier= optionalParcelle.get().getQuartierNom();
}
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);
throw new BadRequestException("Impossible de continuer la liquidation : Il n'existe pas de barème configuré pour la zone de cette parcelle : "+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);
ImpositionsTfu impositionsTfu = entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.TFU_FNB_GENERE);
//impositionsTfu.setNombreAvisFnb(nb);
impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@@ -180,16 +196,14 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
}
}
boolean existsBareme = baremRfuRepository.existsBaremForParcelle(parcelleId);
Optional<Parcelle> optionalParcelle= parcelleRepository.findById(parcelleId);
Optional<ParcellePayLoadWeb> optionalParcelle= parcelleRepository.findParcelleToDtoById(parcelleId);
String nomQuartier="";
String nomArrondissement="";
String nomCommune="";
if(optionalParcelle.isPresent()){
nomQuartier= optionalParcelle.get().getQuartier().getNom();
nomArrondissement= optionalParcelle.get().getQuartier().getArrondissement().getNom();
nomCommune= optionalParcelle.get().getQuartier().getArrondissement().getCommune().getNom();
nomQuartier= optionalParcelle.get().getQuartierNom();
}
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);
@@ -209,15 +223,10 @@ 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

@@ -0,0 +1,136 @@
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,11 +1,16 @@
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;
@@ -14,29 +19,36 @@ 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 Campagne createCampagne(Campagne campagne) throws BadRequestException {
if (campagne.getId() != null) {
public CampagnePayloadWeb createCampagne(CampagnePayloadWeb campagnePayloadWeb) throws BadRequestException {
if (campagnePayloadWeb.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
}
return campagneRepository.save(campagne);
Campagne campagne= entityFromPayLoadService.getCampagneFromPayLoadWeb(campagnePayloadWeb);
campagne= campagneRepository.save(campagne);
return campagneRepository.findPayloadById(campagne.getId()).orElse(null);
}
@Override
public Campagne updateCampagne(Long id, Campagne campagne) throws NotFoundException {
if (campagne.getId() == null) {
public CampagnePayloadWeb updateCampagne(Long id, CampagnePayloadWeb campagnePayloadWeb) throws NotFoundException {
if (campagnePayloadWeb.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle campagne ayant un id null.");
}
if (!campagneRepository.existsById(campagne.getId())) {
if (!campagneRepository.existsById(campagnePayloadWeb.getId())) {
throw new NotFoundException("Impossible de trouver la campagne spécifiée dans notre base de données.");
}
return campagneRepository.save(campagne);
Campagne campagne= entityFromPayLoadService.getCampagneFromPayLoadWeb(campagnePayloadWeb);
campagne= campagneRepository.save(campagne);
return campagneRepository.findPayloadById(campagne.getId()).orElse(null);
}
@Override
@@ -49,13 +61,13 @@ public class CampagneServiceImpl implements CampagneService {
}
}
@Override
public Page<Campagne> getCampagneList(Pageable pageable) {
return campagneRepository.findAll(pageable);
public Page<CampagnePayloadWeb> getCampagneList(Pageable pageable) {
return campagneRepository.findAllPayload(pageable);
}
@Override
public List<Campagne> getCampagneList() {
return campagneRepository.findAll();
public List<CampagnePayloadWeb> getCampagneList() {
return campagneRepository.findAllPayload();
}
@Override
@@ -64,8 +76,28 @@ public class CampagneServiceImpl implements CampagneService {
}
@Override
public Optional<Campagne> getCampagneById(Long id) {
return campagneRepository.findById(id);
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);
}
}

View File

@@ -1,121 +1,131 @@
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.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.paylaods.request.crudweb.EquipePayloadWeb;
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.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 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 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.");
public EquipePayloadWeb create(EquipePayloadWeb equipePayloadWeb) {
if (equipePayloadWeb.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle caracteristique ayant un id non 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;
Equipe equipe = entityFromPayLoadService.getEquipeFromPayLoadWeb(equipePayloadWeb);
equipe = equipeRepository.save(equipe);
return equipeRepository.findPayloadById(equipe.getId()).orElse(null);
}
@Override
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.");
public EquipePayloadWeb update(Long id, EquipePayloadWeb equipePayloadWeb) {
if (equipePayloadWeb.getId() == null) {
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.");
Optional<Equipe> optionalEquipe=Optional.empty();
if(!equipeRepository.existsById(equipePayloadWeb.getId())){
throw new BadRequestException("Impossible de faire la mise à jour: Equipe non fournie");
}
Equipe equipe = getEquipeFromPayload(equipePayload);
return equipeRepository.save(equipe);
Equipe equipe = entityFromPayLoadService.getEquipeFromPayLoadWeb(equipePayloadWeb);
equipe = equipeRepository.save(equipe);
return equipeRepository.findPayloadById(equipe.getId()).orElse(null);
}
@Override
public void deleteEquipe(Long id) throws NotFoundException {
Optional<Equipe> equipeOptional = equipeRepository.findById(id);
if (equipeOptional.isPresent()) {
equipeRepository.deleteById(equipeOptional.get().getId());
public void delete(Long id) {
Optional<Equipe> optionalEquipe = equipeRepository.findById(id);
if (optionalEquipe.isPresent()) {
equipeRepository.deleteById(optionalEquipe.get().getId());
} else {
throw new NotFoundException("Impossible de trouver la equipe spécifiée dans notre base de données.");
throw new NotFoundException("Impossible de trouver lquipe spécifiée.");
}
}
@Override
public Page<Equipe> getEquipeList(Pageable pageable) {
return equipeRepository.findAll(pageable);
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.");
}
}
@Override
public List<Equipe> getEquipeList() {
return equipeRepository.findAll();
public List<EquipePayloadWeb> findAll() {
return equipeRepository.findAllPayload();
}
@Override
public Optional<Equipe> getEquipeById(Long id) {
return equipeRepository.findById(id);
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();
}
}

View File

@@ -1,6 +1,7 @@
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;
@@ -22,8 +23,14 @@ public class ExerciceServiceImpl implements ExerciceService {
@Override
public Exercice createExercice(Exercice exercice) throws BadRequestException {
if (exercice.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
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() + ".");
}
}
return exerciceRepository.save(exercice);
}

View File

@@ -137,9 +137,10 @@ 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

@@ -0,0 +1,30 @@
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,6 +4,7 @@ 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;
@@ -12,18 +13,23 @@ import java.util.Optional;
public interface CampagneService {
Campagne createCampagne(Campagne campagne) throws BadRequestException;
CampagnePayloadWeb createCampagne(CampagnePayloadWeb campagnePayloadWeb) throws BadRequestException;
Campagne updateCampagne(Long id, Campagne campagne) throws NotFoundException;
CampagnePayloadWeb updateCampagne(Long id, CampagnePayloadWeb campagnePayloadWeb) throws NotFoundException;
void deleteCampagne(Long id) throws NotFoundException;
Page<Campagne> getCampagneList(Pageable pageable);
Page<CampagnePayloadWeb> getCampagneList(Pageable pageable);
List<Campagne> getCampagneList();
List<CampagnePayloadWeb> getCampagneList();
List<Campagne> getCampagnesByType(TypeCampagne typeCampagne);
Optional<Campagne> getCampagneById(Long id);
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);
}

View File

@@ -3,6 +3,7 @@ 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;
@@ -12,16 +13,42 @@ import java.util.Optional;
public interface EquipeService {
Equipe createEquipe(EquipePayload equipePayload) throws BadRequestException;
// CRUD
EquipePayloadWeb create(EquipePayloadWeb payload);
Equipe updateEquipe(Long id, EquipePayload equipePayload) throws NotFoundException;
EquipePayloadWeb update(Long id, EquipePayloadWeb payload);
void deleteEquipe(Long id) throws NotFoundException;
void delete(Long id);
Page<Equipe> getEquipeList(Pageable pageable);
// Recherche
EquipePayloadWeb findById(Long id);
List<Equipe> getEquipeList();
List<EquipePayloadWeb> findAll();
Optional<Equipe> getEquipeById(Long id);
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);
}

View File

@@ -0,0 +1,49 @@
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,6 +36,7 @@ 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

@@ -0,0 +1,58 @@
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

@@ -0,0 +1,50 @@
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 personneId,
pers.ifu as ifu,
pers.npi as npi,
pers.nom as nom,
pers.prenom as prenom,
pers.raison_sociale as raisonSociale,
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,
de.id as enqueteCouranteId

View File

@@ -121,6 +121,10 @@ 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,6 +63,15 @@ $$;
call integrer_eavis();
select * from eavis
call integrer_eavis_detail();
delete from eavis;
select *
from e_avis_view ;
select * from eavis;
select * from eavis_detail;
select *
from donnees_imposition_tfu;

View File

@@ -147,3 +147,11 @@ 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

@@ -0,0 +1,175 @@
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,11 +2,186 @@ 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,9 +1,292 @@
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,5 +10,8 @@ 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

@@ -106,6 +106,7 @@ public interface AvoirFonctionRepository extends JpaRepository<AvoirFonction, Lo
LEFT JOIN af.user u
LEFT JOIN af.fonction f
WHERE u.id = :userId
AND (af.dateFin IS NULL OR af.dateFin >= CURRENT_DATE)
""")
List<AvoirFonctionPaylaodWeb> findAllAvoirFonctionByUserToDto(@Param("userId") Long userId);

View File

@@ -38,6 +38,9 @@ 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;
@@ -78,6 +81,7 @@ 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 ;
@@ -139,6 +143,46 @@ 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)
@@ -1162,4 +1206,56 @@ 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