37 Commits

Author SHA1 Message Date
81bd7d9034 Generation tfu batie et non batie avec ressource de liste de données imposition
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 33s
2026-03-14 15:40:32 +01:00
cec02e24ae Generation tfu batie et non batie avec ressource de liste de données imposition
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2026-03-12 21:00:21 +01:00
dae64dc079 Generation tfu batie et non batie avec ressource de liste de données imposition
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 32s
2026-03-12 20:33:32 +01:00
9de2564108 Generation tfu batie et non batie
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 28s
2026-03-12 12:26:45 +01:00
b3e3e7109f Generation tfu batie et non batie
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 28s
2026-03-12 12:05:36 +01:00
b22b6c8288 Generation tfu batie et non batie
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 27s
2026-03-12 01:00:03 +01:00
d326e227c4 Generation tfu batie et non batie
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 26s
2026-03-11 01:09:42 +01:00
85be8a2e24 Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 33s
2026-03-10 22:36:38 +01:00
fcc81e0607 Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 28s
2026-03-09 21:12:09 +01:00
862b917689 Gestion des barem 2026-03-09 21:11:24 +01:00
9b4edcdcea Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-03-09 20:59:23 +01:00
db1fd2c821 Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-03-09 20:31:09 +01:00
ee07fec0ac Gestion des barem 2026-03-09 20:03:25 +01:00
a5cabc8102 Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 28s
2026-03-09 19:52:00 +01:00
443b563d69 Gestion des barem 2026-03-09 19:51:44 +01:00
a799764d16 Gestion des barem 2026-03-09 19:51:40 +01:00
eba53a42aa Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 27s
2026-03-08 14:54:00 +01:00
bd8bd64a2d Gestion des barem
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2026-03-08 14:51:54 +01:00
5dcb2adf30 Gestion des barem
Some checks failed
CI - Build & Test (develop) / build-and-test (pull_request) Failing after 9s
2026-03-08 14:23:14 +01:00
d1c3cb190d Gestion cloture
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2026-03-06 20:08:05 +01:00
4897712e08 Gestion parcelle geom et changement https://gitea.com/actions/checkout@v4 #actions/checkout@v4
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 44s
2026-03-01 18:33:30 +01:00
dc28d88763 Gestion parcelle geom
Some checks failed
CI - Build & Test (develop) / build-and-test (pull_request) Failing after 31s
2026-03-01 18:29:12 +01:00
35393954c3 Gestion parcelle geom
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 38s
2026-03-01 02:39:38 +01:00
51845b085a prise en charge des données entrant dans la liquidation
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-02-23 00:17:01 +01:00
4567074f08 prise en charge des données entrant dans la liquidation 2026-02-23 00:16:43 +01:00
933c209f67 prise en charge des données entrant dans la liquidation
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-02-22 14:52:47 +01:00
dc59006e99 prise en charge des données entrant dans la liquidation 2026-02-22 11:50:39 +01:00
b0abdee729 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 32s
2026-02-21 13:41:44 +01:00
2a53e653c3 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 31s
2026-02-20 20:33:29 +01:00
1ce98edc32 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-02-20 19:52:44 +01:00
144a6af6f8 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2026-02-19 21:37:28 +01:00
e0a211d8bd gestion revu de code en utilisant uniquement les DTO 2026-02-19 21:22:46 +01:00
d1813d7460 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 30s
2026-02-19 20:06:45 +01:00
95bf4779f7 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 31s
2026-02-19 19:30:28 +01:00
5e9aae2bc2 gestion revu de code en utilisant uniquement les DTO
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2026-02-19 11:23:50 +01:00
06fa55fe2a gestion revu de code en utilisant uniquement les DTO 2026-02-19 11:23:28 +01:00
c272257930 gestion revu de code en utilisant uniquement les DTO 2026-02-19 08:50:46 +01:00
112 changed files with 4314 additions and 554 deletions

View File

@@ -52,8 +52,10 @@ jobs:
echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
# 4) Checkout du dépôt
#- name: Checkout repository
# uses: https://gitea.com/actions/checkout@v4 #actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
# 5) Informations de contexte (sans secrets)
- name: Show context information

View File

@@ -52,8 +52,10 @@ jobs:
echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
# 4) Checkout du dépôt
#- name: Checkout repository
# uses: https://gitea.com/actions/checkout@v4 #actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }} .
# 5) Création des secrets runtime (CI uniquement)
- name: Create runtime secrets

View File

@@ -315,5 +315,31 @@ public class SecteurController {
}
@Operation(
summary = "recuperer tous les secteurs d'un departement",
description = "Permet de récuperer l'ensemble des secteurs du departement dont l'ID est fourni en path"
)
@GetMapping("/by-departement-id/{departementId}")
public ResponseEntity<?> getSecteurByDepartementId(@PathVariable Long departementId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, secteurService.getListSecteurByDepartementId(departementId), "Secteur 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

@@ -2,6 +2,7 @@ package io.gmss.fiscad.controllers.infocad.metier;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.rfu.metier.EnqueteBatiment;
import io.gmss.fiscad.entities.user.User;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.infocad.metier.EnqueteService;
import io.gmss.fiscad.paylaods.ApiResponse;
@@ -10,6 +11,8 @@ import io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb;
import io.gmss.fiscad.paylaods.request.synchronisation.EnquetePayLoad;
import io.gmss.fiscad.paylaods.request.EnqueteTraitementPayLoad;
import io.gmss.fiscad.paylaods.request.FiltreEnquetePayLoad;
import io.gmss.fiscad.security.CurrentUser;
import io.gmss.fiscad.security.UserPrincipal;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -480,5 +483,8 @@ public class EnqueteController {
}

View File

@@ -388,6 +388,33 @@ public class ParcelleController {
@PutMapping("/syncrhonise-etat-batie-parcelle")
public ResponseEntity<?> putSynchroniseEtatBatieParcelle() {
try {
Integer nombreParcelleSync= parcelleService.majParcelleBatieNonbatie();
return new ResponseEntity<>(
new ApiResponse<>(true,nombreParcelleSync , "Parcelle mise à jour avec succes."),
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

@@ -20,7 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
@SecurityRequirement(name = "bearer")
@Tag(name = "ParcelleGeometrie")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class ParcelleGeomController {
private final ParcelleGeomService parcelleGeomService;
@@ -63,6 +63,24 @@ public class ParcelleGeomController {
);
}
@GetMapping("/by-quartier-id/{quartierId}")
public ResponseEntity<?> getParcellesGeomsByQuartierId(@PathVariable Long quartierId) {
return new ResponseEntity<>(
new ApiResponse<>(true, parcelleGeomService.getParcelleGeomListByQuatierId(quartierId), "Liste des parcelle chargée avec succès."),
HttpStatus.OK
);
}
@GetMapping("/page/by-quartier-id/{quartierId}")
public ResponseEntity<?> getParcellesGeomsByQuartierIdPaged(@PathVariable Long quartierId,@RequestParam int pageNo, @RequestParam int pageSize) {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, parcelleGeomService.getParcelleGeomListByQuatierIdPaged(quartierId,pageable), "Liste des parcelle chargée avec succès."),
HttpStatus.OK
);
}
@GetMapping("/by-arrondissement/{codeArrondissement}")
public ResponseEntity<?> getParcellesGeomsByArrondissement(@PathVariable String codeArrondissement) {
return new ResponseEntity<>(

View File

@@ -167,11 +167,11 @@ public class CaracteristiqueBatimentController {
}
}
@GetMapping("/by-enquete-batiment-id/{batimentId}")
public ResponseEntity<?> getCaracteristiqueBatimentByBatimentId(@PathVariable Long enquteBatimentId) {
@GetMapping("/by-enquete-batiment-id/{enqueteBatimentId}")
public ResponseEntity<?> getCaracteristiqueBatimentByBatimentId(@PathVariable Long enqueteBatimentId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatiment(enquteBatimentId), "Caracteristique du batiment trouvée avec succès."),
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatiment(enqueteBatimentId), "Caracteristique du batiment trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -190,12 +190,12 @@ public class CaracteristiqueBatimentController {
}
}
@GetMapping("/page/by-enquete-batiment-id/{batimentId}")
public ResponseEntity<?> getCaracteristiqueBatimentByEnqueteBatimentIdPaged(@PathVariable Long enquteBatimentId,@RequestParam int pageNo, @RequestParam int pageSize) {
@GetMapping("/page/by-enquete-batiment-id/{enqueteBatimentId}")
public ResponseEntity<?> getCaracteristiqueBatimentByEnqueteBatimentIdPaged(@PathVariable Long enqueteBatimentId,@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatimentPageable(enquteBatimentId,pageable), "Caracteristique du batiment trouvée avec succès."),
new ApiResponse<>(true, caracteristiqueBatimentService.getCaracteristiqueBatimentListByEnqueteBatimentPageable(enqueteBatimentId,pageable), "Caracteristique du batiment trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -199,7 +199,7 @@ public class CaracteristiqueUniteLogementController {
}
}
@GetMapping("/page//by-enquete-ulo-id/{enqueteUloId}")
@GetMapping("/page/by-enquete-ulo-id/{enqueteUloId}")
public ResponseEntity<?> getAllCaracteristiqueUniteLogementByEulPaged(@PathVariable Long enqueteUloId,@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);

View File

@@ -7,7 +7,10 @@ import io.gmss.fiscad.enums.StatusAvis;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.metier.DonneesImpositionTfuService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.persistence.repositories.rfu.metier.ImpositionsTfuRepository;
import io.gmss.fiscad.security.CurrentUser;
import io.gmss.fiscad.security.UserPrincipal;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
@@ -160,6 +163,104 @@ public class DonneesImpositionTfuController {
}
}
@GetMapping("/all-page/by-imposition-id/{impositionId}")
public ResponseEntity<?> getAllDonneesImpositionTfuByImpositionIdPaged(@PathVariable Long impositionId, @RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesFiscalesByImpositionTfuIdPageable(impositionId, 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-page/by-imposition-id/non-batie/{impositionId}")
public ResponseEntity<?> getAllDonneesImpositionTfuByImpositionIdNonBatiePaged(@PathVariable Long impositionId, @RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesFiscalesByImpositionTfuIdNonBatiePageable(impositionId, 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-page/by-imposition-id/batie-batiment/{impositionId}")
public ResponseEntity<?> getAllDonneesImpositionTfuByImpositionIdBatieBatimentPaged(@PathVariable Long impositionId, @RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesFiscalesByImpositionTfuIdBatieBatimentPageable(impositionId, 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-page/by-imposition-id/batie-unite-logement/{impositionId}")
public ResponseEntity<?> getAllDonneesImpositionTfuByImpositionIdBatieUniteLogPaged(@PathVariable Long impositionId, @RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, donneesImpositionTfuService.getDonneesFiscalesByImpositionTfuIdBatieUniteLogPageable(impositionId, 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}")
public ResponseEntity<?> getDonneesImpositionTfuById(@PathVariable Long id) {
try {
@@ -182,31 +283,91 @@ public class DonneesImpositionTfuController {
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@Operation(summary = "Générer les données fiscales TFU")
@PostMapping("/generer")
public ResponseEntity<?> genererDonneesFiscale(@RequestBody ImpositionsTfu impositionsTfu) {
@Operation(summary = "Générer les données fiscales TFU des parcelle baties")
@PostMapping("/generer-batie")
public ResponseEntity<?> genererDonneesFiscaleBatie(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
try {
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfu.getId());
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "L'imposition tfu n'est pas trouvée."),
new ApiResponse<>(false, null, "L'instance d'imposition n'est pas trouvée."),
HttpStatus.OK
);
}
if(!optionalImpositionsTfu.get().getStatusAvis().equals(StatusAvis.CREE)){
if(!optionalImpositionsTfu.get().getStatusAvis().equals(StatusAvis.TFU_FNB_GENERE)){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "le statut actuel ne permet pas cette opération."),
new ApiResponse<>(false, null, "l'état actuel : "+optionalImpositionsTfu.get().getStatusAvis()+" ne permet pas cette opération."),
HttpStatus.OK
);
}
optionalImpositionsTfu.get().setStatusAvis(StatusAvis.GENERE);
if(userPrincipal==null){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'êtes pas autorisé à accéder à cette ressource"),
HttpStatus.OK
);
}
impositionsTfuPaylaodWeb=donneesImpositionTfuService.genererDonneesFiscalesParcelleBatie(impositionsTfuPaylaodWeb,userPrincipal.getUser().getId());
return new ResponseEntity<>(
new ApiResponse<>(true, donneesImpositionTfuService.genererDonneesFiscales(optionalImpositionsTfu.get()), "DonneesImpositionTfu trouvée avec succès."),
new ApiResponse<>(true,impositionsTfuPaylaodWeb, "Données d'imposition des fonciers batis Générées 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);
}
}
@Operation(summary = "Générer les données fiscales TFU des parcelle baties")
@PostMapping("/generer-non-batie")
public ResponseEntity<?> genererDonneesImpositionNonBaties(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
try {
Optional<ImpositionsTfu> optionalImpositionsTfu =impositionsTfuRepository.findById(impositionsTfuPaylaodWeb.getId());
if(optionalImpositionsTfu.isEmpty()){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "L'instance d'imposition n'est pas trouvée."),
HttpStatus.OK
);
}
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.genererDonneesFiscalesParcelleNonBatie(impositionsTfuPaylaodWeb,userPrincipal.getUser().getId());
return new ResponseEntity<>(
new ApiResponse<>(true,impositionsTfuPaylaodWeb, "Données d'imposition pour les fonciers non batis Générées 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);

View File

@@ -2,12 +2,21 @@ package io.gmss.fiscad.controllers.rfu.metier;
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.rfu.metier.ImpositionsTfuService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.security.CurrentUser;
import io.gmss.fiscad.security.UserPrincipal;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import jakarta.ws.rs.NotAcceptableException;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.PageRequest;
@@ -21,6 +30,7 @@ import org.springframework.web.client.HttpClientErrorException;
@RestController
@AllArgsConstructor
@RequestMapping(value = "api/impositions-tfu", produces = MediaType.APPLICATION_JSON_VALUE)
@SecurityRequirement(name = "bearer")
@Tag(name = "Impositions TFU")
@@ -28,41 +38,32 @@ import org.springframework.web.client.HttpClientErrorException;
public class ImpositionsTfuController {
private final ImpositionsTfuService impositionsTfuService;
private final EnqueteService enqueteService;
private static final Logger logger = LoggerFactory.getLogger(ImpositionsTfuController.class);
public ImpositionsTfuController(ImpositionsTfuService impositionsTfuService) {
this.impositionsTfuService = impositionsTfuService;
}
@PostMapping("/create")
public ResponseEntity<?> createImpositionsTfu(@RequestBody @Valid @Validated ImpositionsTfu impositionsTfu) {
public ResponseEntity<?> createImpositionsTfu(@CurrentUser UserPrincipal currentUser,@RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
try {
impositionsTfu = impositionsTfuService.createImpositionsTfu(impositionsTfu);
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfu, "Unite de logement 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);
}
}
if(currentUser==null){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource."),
HttpStatus.OK
);
}
User user=currentUser.getUser();
@PutMapping("/update/{id}")
public ResponseEntity<?> updateImpositionsTfu(@PathVariable Long id, @RequestBody ImpositionsTfu impositionsTfu) {
try {
if(user.getStructure().getId()!=impositionsTfuPaylaodWeb.getStructureId()){
return new ResponseEntity<>(
new ApiResponse<>(false, null, "Vous n'etes pas autorisé à accéder à cette ressource."),
HttpStatus.OK
);
}
impositionsTfuPaylaodWeb = impositionsTfuService.createImpositionsTfu(impositionsTfuPaylaodWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfuService.updateImpositionsTfu(id, impositionsTfu), "Unite de logement mise à jour avec succès."),
new ApiResponse<>(true, impositionsTfuPaylaodWeb, "Unite de logement créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -82,11 +83,27 @@ public class ImpositionsTfuController {
}
@PutMapping("/valider/{id}")
public ResponseEntity<?> validerImpositionsTfu(@RequestBody ImpositionsTfu impositionsTfu) {
@PutMapping("/cloturer-enquete")
public ResponseEntity<?> cloturer(@CurrentUser UserPrincipal userPrincipal, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb ) {
try {
if(userPrincipal==null){
return new ResponseEntity<>(
new ApiResponse<>(true, null, "Accès non autorisé"),
HttpStatus.NOT_ACCEPTABLE
);
}
User user= userPrincipal.getUser();
if(user.getStructure().getId()!=impositionsTfuPaylaodWeb.getStructureId()){
return new ResponseEntity<>(
new ApiResponse<>(true,null, "Vous n'êtes pas autorisé à cloturer les enquetes du : "+user.getStructure().getNom()),
HttpStatus.OK
);
}
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfuService.validerImpositionsTfu(impositionsTfu), "Unite de logement mise à jour avec succès."),
new ApiResponse<>(true, impositionsTfuService.cloturerImpositionsTfu(impositionsTfuPaylaodWeb), "enquete cloturées avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -105,11 +122,62 @@ public class ImpositionsTfuController {
}
}
@PutMapping("/annuler/{id}")
public ResponseEntity<?> annulerImpositionsTfu(@PathVariable Long id, @RequestBody ImpositionsTfu impositionsTfu) {
// @PutMapping("/update/{id}")
// public ResponseEntity<?> updateImpositionsTfu(@PathVariable Long id, @RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
// try {
// return new ResponseEntity<>(
// new ApiResponse<>(true, impositionsTfuService.updateImpositionsTfu(id, impositionsTfuPaylaodWeb), "Unite de logement 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);
// }
// }
@Operation(
summary = "Autoriser la génération des avis d'un centre",
description = "Permet d'autoriser la génération des avis d'un centre pour un exervice données"
)
@PutMapping("/autoriser-generation-avis")
public ResponseEntity<?> autoriserImpositionsTfu(@RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfuService.annulerImpositionsTfu(impositionsTfu), "Unite de logement mise à jour avec succès."),
new ApiResponse<>(true, impositionsTfuService.autoriserGenerationImpositionsTfu(impositionsTfuPaylaodWeb), "Unite de logement 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);
}
}
@PutMapping("/rejeter")
public ResponseEntity<?> annulerImpositionsTfu(@RequestBody ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfuService.rejeterImpositionsTfu(impositionsTfuPaylaodWeb), "Unite de logement mise à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -152,11 +220,19 @@ public class ImpositionsTfuController {
}
}
@GetMapping("/all")
public ResponseEntity<?> getAllImpositionsTfuList() {
@GetMapping("/all/by-user")
public ResponseEntity<?> getAllImpositionsTfuList(@CurrentUser UserPrincipal userPrincipal) {
try {
if(userPrincipal==null){
return new ResponseEntity<>(
new ApiResponse<>(true, null, "Vous n'êtes pas autorisé à acceder à cette ressource"),
HttpStatus.OK
);
}
User user= userPrincipal.getUser();
return new ResponseEntity<>(
new ApiResponse<>(true, impositionsTfuService.getImpositionsTfuList(), "Liste des Enquetes des unites Logements chargée avec succès."),
new ApiResponse<>(true, impositionsTfuService.getImpositionsTfuByUserIdIds(user.getId()), "Liste des Enquetes des unites Logements chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -224,4 +224,27 @@ public class UniteLogementController {
return new ResponseEntity<>(new ApiResponse(false, null, "An error has been occur and the content is {" + e.getMessage() + "}."), HttpStatus.OK);
}
}
@GetMapping("/by-parcelle-id/{id}")
public ResponseEntity<?> getUniteLogementByParcelleId(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, enqueteUniteLogementService.getUniteLogementListByParcelle(id), "Unite de de logement 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

@@ -2,8 +2,9 @@ package io.gmss.fiscad.controllers.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuBati;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuService;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuBatiService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuBatiPayloadWeb;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
@@ -24,20 +25,20 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Barem Rfu")
public class BaremRfuController {
private final BaremRfuService baremRfuService;
private final BaremRfuBatiService baremRfuBatiService;
private static final Logger logger = LoggerFactory.getLogger(BaremRfuController.class);
public BaremRfuController(BaremRfuService baremRfuService) {
this.baremRfuService = baremRfuService;
public BaremRfuController(BaremRfuBatiService baremRfuBatiService) {
this.baremRfuBatiService = baremRfuBatiService;
}
@PostMapping("/create")
public ResponseEntity<?> createBaremRfu(@RequestBody @Valid @Validated BaremRfuBati baremRfuBati) {
public ResponseEntity<?> createBaremRfu(@RequestBody @Valid @Validated BaremRfuBatiPayloadWeb baremRfuBatiPayloadWeb) {
try {
baremRfuBati = baremRfuService.createBaremRfu(baremRfuBati);
baremRfuBatiPayloadWeb = baremRfuBatiService.createBaremRfu(baremRfuBatiPayloadWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuBati, "BaremRfuBati créé avec succès."),
new ApiResponse<>(true, baremRfuBatiPayloadWeb, "BaremRfuBati créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -57,10 +58,10 @@ public class BaremRfuController {
}
@PutMapping("/update/{id}")
public ResponseEntity<?> updateBaremRfu(@PathVariable Long id, @RequestBody BaremRfuBati baremRfuBati) {
public ResponseEntity<?> updateBaremRfu(@PathVariable Long id, @RequestBody BaremRfuBatiPayloadWeb baremRfuBatiPayloadWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuService.updateBaremRfu(id, baremRfuBati), "BaremRfuBati mis à jour avec succès."),
new ApiResponse<>(true, baremRfuBatiService.updateBaremRfu(id, baremRfuBatiPayloadWeb), "BaremRfuBati mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -82,7 +83,7 @@ public class BaremRfuController {
@DeleteMapping("/delete/{id}")
public ResponseEntity<?> deleteBaremRfur(@PathVariable Long id) {
try {
baremRfuService.deleteBaremRfu(id);
baremRfuBatiService.deleteBaremRfu(id);
return new ResponseEntity<>(
new ApiResponse<>(true, "BaremRfuBati supprimée avec succès."),
HttpStatus.OK
@@ -107,7 +108,7 @@ public class BaremRfuController {
public ResponseEntity<?> getAllBaremRfuList() {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuService.getBaremRfuList(), "Liste des baremRfus chargée avec succès."),
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuList(), "Liste des baremRfus chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -132,7 +133,7 @@ public class BaremRfuController {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuService.getBaremRfuList(pageable), "Liste des baremRfus chargée avec succès."),
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuList(pageable), "Liste des baremRfus chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -155,7 +156,7 @@ public class BaremRfuController {
public ResponseEntity<?> getBaremRfuById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuService.getBaremRfuById(id), "BaremRfuBati trouvée avec succès."),
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuById(id), "BaremRfuBati trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -174,13 +175,68 @@ public class BaremRfuController {
}
}
@GetMapping("/categorie-batiment/{idCategorieBatiment}")
@GetMapping("/by-categorie-batiment-id/{idCategorieBatiment}")
public ResponseEntity<?> getBaremRfuByType( //@Parameter(description = "ID de la catégorie de bâtiment", required = true)
@PathVariable Long idCategorieBatiment) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuService.getBaremRfuByType(idCategorieBatiment), "Liste des baremRfu par categorie de batiments chargée avec succès."),
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuByCategorieBatiment(idCategorieBatiment), "Liste des baremRfu par categorie de batiments 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-arrondissement-id/by-categorie-batiment-id/{idArrondissement}/{idCategorieBatiment}")
public ResponseEntity<?> getBaremRfuByArrondisementAndCategorie( //@Parameter(description = "ID de la catégorie de bâtiment", required = true)
@PathVariable Long idArrondissement,
@PathVariable Long idCategorieBatiment
) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuByArrondissementAndCategorieBatiment(idArrondissement,idCategorieBatiment), "Liste des baremRfu par categorie de batiments 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-quartier-id/by-categorie-batiment-id/{idQuartier}/{idCategorieBatiment}")
public ResponseEntity<?> getBaremRfuByQuartierAndCategorie( //@Parameter(description = "ID de la catégorie de bâtiment", required = true)
@PathVariable Long idQuartier,
@PathVariable Long idCategorieBatiment
) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuBatiService.getBaremRfuByQuartierAndCategorieBatiment(idQuartier,idCategorieBatiment), "Liste des baremRfu par categorie de batiments chargée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -4,6 +4,7 @@ import io.gmss.fiscad.entities.rfu.parametre.BaremRfuNonBati;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuNonBatiService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuNonBatiPayloadWeb;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
@@ -34,11 +35,11 @@ public class BaremRfuNonBatiController {
@PostMapping("/create")
public ResponseEntity<?> createBaremRfuNonBati(@RequestBody @Valid @Validated BaremRfuNonBati baremRfuNonBati) {
public ResponseEntity<?> createBaremRfuNonBati(@RequestBody BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) {
try {
baremRfuNonBati = baremRfuNonBatiService.createBaremRfuNonBati(baremRfuNonBati);
baremRfuNonBatiPayloadWeb = baremRfuNonBatiService.createBaremRfuNonBati(baremRfuNonBatiPayloadWeb);
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuNonBati, "BaremRfuNonBati créé avec succès."),
new ApiResponse<>(true, baremRfuNonBatiPayloadWeb, "BaremRfuNonBati créé avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -58,10 +59,10 @@ public class BaremRfuNonBatiController {
}
@PutMapping("/update/{id}")
public ResponseEntity<?> updateBaremRfuNonBati(@PathVariable Long id, @RequestBody BaremRfuNonBati baremRfuNonBati) {
public ResponseEntity<?> updateBaremRfuNonBati(@PathVariable Long id, @RequestBody BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuNonBatiService.updateBaremRfuNonBati(id, baremRfuNonBati), "BaremRfuNonBati mis à jour avec succès."),
new ApiResponse<>(true, baremRfuNonBatiService.updateBaremRfuNonBati(id, baremRfuNonBatiPayloadWeb), "BaremRfuNonBati mis à jour avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {
@@ -156,7 +157,31 @@ public class BaremRfuNonBatiController {
public ResponseEntity<?> getBaremRfuNonBatiById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuNonBatiService.getBaremRfuNonBatiById(id), "BaremRfuNonBati trouvée avec succès."),
new ApiResponse<>(true, baremRfuNonBatiService.getBaremRfuNonBatiById(id).orElse(null), "BaremRfuNonBati 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-commune-id/by-zone-id/{communeId}/{zoneId}")
public ResponseEntity<?> getBaremRfuNonBatiByCommineAndZoneId(@PathVariable Long communeId, Long zoneId) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, baremRfuNonBatiService.getBaremRfuNonBatiByCommuneAndZoneId(communeId,zoneId).orElse(null), "BaremRfuNonBati trouvée avec succès."),
HttpStatus.OK
);
} catch (HttpClientErrorException.MethodNotAllowed e) {

View File

@@ -0,0 +1,180 @@
package io.gmss.fiscad.controllers.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import io.gmss.fiscad.exceptions.*;
import io.gmss.fiscad.interfaces.rfu.parametre.UsageService;
import io.gmss.fiscad.paylaods.ApiResponse;
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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.HttpClientErrorException;
@RestController
@RequestMapping(value = "api/usage", produces = MediaType.APPLICATION_JSON_VALUE)
@SecurityRequirement(name = "bearer")
@Tag(name = "Usage")
public class UsageController {
private final UsageService usageService;
private static final Logger logger = LoggerFactory.getLogger(UsageController.class);
public UsageController(UsageService usageService) {
this.usageService = usageService;
}
@PostMapping("/create")
public ResponseEntity<?> createUsage(@RequestBody @Valid @Validated Usage usage) {
try {
usage = usageService.createUsage(usage);
return new ResponseEntity<>(
new ApiResponse<>(true, usage, "Usage 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}")
public ResponseEntity<?> updateUsage(@PathVariable Long id, @RequestBody Usage usage) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, usageService.updateUsage(id, usage), "Usage mis à 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}")
public ResponseEntity<?> deleteUsager(@PathVariable Long id) {
try {
usageService.deleteUsage(id);
return new ResponseEntity<>(
new ApiResponse<>(true, "Usage 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")
public ResponseEntity<?> getAllUsageList() {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, usageService.getUsageList(), "Liste des usages 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")
public ResponseEntity<?> getAllUsagePaged(@RequestParam int pageNo, @RequestParam int pageSize) {
try {
Pageable pageable = PageRequest.of(pageNo, pageSize);
return new ResponseEntity<>(
new ApiResponse<>(true, usageService.getUsageList(pageable), "Liste des usages 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}")
public ResponseEntity<?> getUsageById(@PathVariable Long id) {
try {
return new ResponseEntity<>(
new ApiResponse<>(true, usageService.getUsageById(id), "Usage 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

@@ -29,6 +29,8 @@ public class Quartier extends BaseEntity implements Serializable {
@ManyToOne
private Arrondissement arrondissement;
private String longitude;
private String latitude;
// @JsonIgnore
// @OneToOne(mappedBy = "quartier")
// private Bloc bloc;

View File

@@ -188,6 +188,7 @@ public class Enquete extends BaseEntity implements Serializable {
private Long montantAnnuelleLocation;
private Long valeurParcelleEstime;
private Long valeurParcelleReel;
private Long valeurParcelleCalcule;
private String ncProprietaire;
@JsonFormat(pattern = "dd-MM-yyyy")
@@ -197,6 +198,11 @@ public class Enquete extends BaseEntity implements Serializable {
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExcemption;
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
//
// @JsonIgnore
// @OneToMany(mappedBy = "enquete")

View File

@@ -1,11 +1,15 @@
package io.gmss.fiscad.entities.infocad.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.decoupage.Quartier;
import io.gmss.fiscad.entities.infocad.parametre.NatureDomaine;
import io.gmss.fiscad.entities.infocad.parametre.TypeDomaine;
import io.gmss.fiscad.entities.rfu.metier.Batiment;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.ColumnDefault;
@@ -68,6 +72,17 @@ public class Parcelle extends BaseEntity implements Serializable {
@ManyToOne
private Rue rue ;
private String numeroRue ;
private Boolean batie;
private Integer nombrePiscine;
@ManyToOne
private Usage usage;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebutExemption;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExemption;
// private String ncProprietaire ;
// @JsonIgnore
// @OneToMany(mappedBy = "parcelle")

View File

@@ -10,6 +10,7 @@ import io.gmss.fiscad.entities.decoupage.Arrondissement;
import io.gmss.fiscad.entities.decoupage.Commune;
import io.gmss.fiscad.entities.decoupage.Departement;
import io.gmss.fiscad.entities.decoupage.Quartier;
import io.gmss.fiscad.enums.SourceDonnee;
import io.gmss.fiscad.enums.StatutParcelle;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
@@ -24,6 +25,7 @@ import org.n52.jackson.datatype.jts.GeometryDeserializer;
import org.n52.jackson.datatype.jts.GeometrySerializer;
import java.io.Serializable;
import java.time.LocalDate;
@EqualsAndHashCode(callSuper = true)
@Entity
@@ -39,27 +41,63 @@ public class ParcelleGeom extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String NomDepartement;
private String NomCommune;
private String NomArrondissement;
private String NomVillageQuartier;
private String codeBloc;
private String q;
private String ilot;
private String zone;
private String p;
@Column(unique = true,nullable = true)
private String nup;
@Column(unique = true,nullable = true)
private String nupProvisoire;
private String longitude;
private String latitude;
private String codeDepartement;
private String nomDepartement;
private String codeCommune;
private String nomCommune;
private String codeArrondissement;
private String nomArrondissement;
private String codeQuartierVillage;
private String nomVillageQuartier;
private String codeBloc;
private String numeroRue;
private String numeroEntreePorte;
private String codeInstad;
private String numeroEtatLieux;
private String numeroTitreFoncier;
private LocalDate dateTitreFoncier;
private Boolean batie ;
private String npi;
private String ifu;
private String nom;
private String prenom;
private String raisonSociale;
private String nomEtPrenoms;
private String telephone;
private String adresse;
private String nomRepresentant;
private String prenomRepresentant;
private String raisonSocialeRepresentant;
private String nomEtPrenomsRepresentant;
private String telephoneRepresentant;
private String adresseRepresentant;
private String q;
private String zone;
private String ilot;
private String p;
private String qLotissement;
private String ilotLotissement;
private String pLotissement;
private String pointsPolygone;
private Integer superficie;
private String nomEtPrenoms;
private String dateCollecte;
private String sourceDonnees;
@Enumerated(EnumType.STRING)
private SourceDonnee sourceDonnees;
private String observations;
@Enumerated(EnumType.STRING)
private StatutParcelle statutParcelle;
private Long uploadId;
@@ -77,35 +115,22 @@ public class ParcelleGeom extends BaseEntity implements Serializable {
private Arrondissement arrondissement;
@ManyToOne //(fetch = FetchType.LAZY)
//@JsonBackReference
@JsonBackReference
private Quartier quartier ;
@ColumnDefault("0")
private int geomSrid;
private Integer geomSrid;
@JsonSerialize(using = GeometrySerializer.class)
@JsonDeserialize(contentUsing = GeometryDeserializer.class)
@Column(name = "geometry",columnDefinition = "geometry(Polygon,32631)")
private Polygon geometry;
@Column(columnDefinition = "TEXT")
private String geometryString;
private String codeInsae;
private String numeroEtatLieux;
private String numeroTitreFoncier;
private String telephone;
//private String codeParcelle;
//private String codeEquipe;
//private String elLot;
//private String elLettreParcelle;
//private String rfuQuartierOuZone;
//private String rfuIlot;
//private String rfuLettreParcelle;
//private String nomLotissement;
////////////
// @JsonIgnore
// @OneToOne
// private Parcelle parcelle;
@JsonIgnore
@ManyToOne
@JsonBackReference
private Parcelle parcelle;
// @JsonSerialize(using = GeometrySerializer.class)
// @JsonDeserialize(contentUsing = GeometryDeserializer.class)
// @Column(name = "geom",columnDefinition = "geometry(Polygon,4326)")

View File

@@ -96,8 +96,7 @@ public class Upload extends BaseEntity implements Serializable {
String url = this.serverContext() + fileName;
System.out.println("url = " + url);
// return url != null ? url.toLowerCase().startsWith("https") ? url : url.toLowerCase().replaceFirst("http", "https") : null;
return url ;//!= null ? url.toLowerCase().startsWith("https") ? url : url.toLowerCase().replaceFirst("http", "https") : null;
return url != null ? url.toLowerCase().startsWith("https") ? url : url.toLowerCase().replaceFirst("http", "https") : null;
}
private String serverContext() {

View File

@@ -7,11 +7,14 @@ import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.entities.infocad.metier.Tpe;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.Internal;
import org.hibernate.annotations.Where;
import java.io.Serializable;
@@ -36,15 +39,40 @@ public class Batiment extends BaseEntity implements Serializable {
private Long idDerniereEnquete;
private Float superficieLouee;
private Float superficieAuSol;
private Integer nombreEtage;
private Integer nombrePiscine;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long montantLocatifAnnuelEstime;
private Long valeurBatimentEstime;
private Long valeurBatimentReel;
private Long valeurBatimentCalcule;
private Long montantMensuelLocation;
private Integer nbreUniteLogement;
private Integer idToitRfu;
@JsonIgnore
@ManyToOne
private Parcelle parcelle;
@ManyToOne
private Usage usage;
@ManyToOne
private CategorieBatiment categorieBatiment ;
@JsonIgnore
@ManyToOne
private Tpe terminal;
// private Long enqueteId;
private Long mobileDataId;
private Long parcelleExternalKey;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebutExemption;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExemption;
}

View File

@@ -47,3 +47,5 @@ public class CaracteristiqueUniteLogement extends BaseEntity implements Serializ
private Long enqueteId;
private Long mobileDataId;
}

View File

@@ -8,6 +8,9 @@ import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.entities.infocad.metier.Tpe;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
import io.gmss.fiscad.enums.NatureImpot;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -71,11 +74,17 @@ public class DonneesImpositionTfu extends BaseEntity implements Serializable {
private int superficieParc;
private Long superficieAuSolBat;
private Long superficieAuSolUlog;
private String batieOuiNon;
private String exhonereOuiNon;
private String batimentExhonereOuiNon;
private String uniteLogementExhonereOuiNon;
//private String batieOuiNon;
//private String exhonereOuiNon;
//private String batimentExhonereOuiNon;
//private String uniteLogementExhonereOuiNon;
private Boolean batie;
private Boolean exonere;
private Boolean batimentExonere;
private Boolean uniteLogementExonere;
private Long valeurLocativeAdm;
private Long valeurLocativeAdm70Pour100;
private Long valeurLocativeAdmMetreCarre;
private Long montantLoyerAnnuel;
private Long tfuMetreCarre;
private Long tfuMinimum;
@@ -88,14 +97,30 @@ public class DonneesImpositionTfu extends BaseEntity implements Serializable {
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateEnquete;
private Long enqueteId;
private Long structureId;
//private Long structureId;
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "structure_id")
private Structure structure ;
private Long secteurId;
private Long zoneRfuId;
//private Long zoneRfuId;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "zone_rfu_id")
private ZoneRfu zoneRfu ;
@ColumnDefault("0")
private float tauxParcelleNonBati;
private Long valeurAdministrativeParcelleNonBati;
private Long valeurAdminParcelleNb;
private Float tauxTfu;
private Float montantTaxe;
private Long valeurAdminParcelleNbMetreCarre;
@JsonIgnore
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "impositions_tfu_id", nullable = false)
private ImpositionsTfu impositionsTfu;
private ImpositionsTfu impositionsTfu ;
@Enumerated(EnumType.STRING)
private NatureImpot natureImpot;
private Long valeurBatiment;
private Long valeurParcelle;
}

View File

@@ -12,7 +12,9 @@ import io.gmss.fiscad.entities.infocad.metier.Tpe;
import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.entities.infocad.parametre.Personne;
import io.gmss.fiscad.entities.rfu.parametre.Caracteristique;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import io.gmss.fiscad.entities.user.User;
import io.gmss.fiscad.enums.StatutEnquete;
import io.gmss.fiscad.enums.StatutEnregistrement;
@@ -52,6 +54,8 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
private Boolean soneb;
private String numCompteurSoneb;
private Integer nbreLotUnite;
private Integer nbreUniteLogement;
private Integer nbrePiece;
private Integer nbreUniteLocation;
private Float superficieLouee;
private Float superficieAuSol;
@@ -59,8 +63,12 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
private Integer nbreHabitant;
private Long montantMensuelLocation;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelEstime;
private Long montantLocatifAnnuelCalcule;
private Long valeurBatimentEstime;
private Long valeurBatimentReel;
private Long valeurBatimentCalcule;
private Integer nombrePiscine;
private Integer nbreMoisLocation;
private String autreCaracteristiquePhysique;
private String observation;
@@ -96,6 +104,11 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
private Long batimentExternalKey;
private Long nbreEtage;
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
// @JsonIgnore
// @ManyToOne(fetch = FetchType.LAZY)
// @JsonBackReference
@@ -121,4 +134,9 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
@Enumerated(EnumType.STRING)
@JsonIgnore
private StatutEnquete statutEnquete;
@ManyToOne
private CategorieBatiment categorieBatiment ;
@ManyToOne
private Usage usage ;
}

View File

@@ -11,7 +11,9 @@ import io.gmss.fiscad.entities.infocad.metier.Enquete;
import io.gmss.fiscad.entities.infocad.metier.Tpe;
import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.entities.infocad.parametre.Personne;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import io.gmss.fiscad.entities.user.User;
import io.gmss.fiscad.enums.StatutEnquete;
import io.gmss.fiscad.enums.StatutEnregistrement;
@@ -47,11 +49,15 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
private Integer nbreHabitant;
private Integer nbreMenage;
private Boolean enLocation;
private Float montantMensuelLoyer;
private Long montantMensuelLocation;
private Integer nbreMoisLocation;
private Float montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long montantLocatifAnnuelEstime;
private Long valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Long valeurUniteLogementCalcule;
private Integer nombrePiscine;
private Float superficieLouee;
private Float superficieAuSol;
private Boolean sbee;
@@ -64,16 +70,22 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExemption;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateEnquete;
private String observation;
private Long uniteLogementExternalKey;
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
@ManyToOne
private Exercice exercice;
// @JsonIgnore
// @ManyToOne(fetch = FetchType.LAZY)
// @JsonBackReference
@@ -108,5 +120,8 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
@JsonIgnore
@Enumerated(EnumType.STRING)
private StatutEnquete statutEnquete;
@ManyToOne
private CategorieBatiment categorieBatiment ;
@ManyToOne
private Usage usage ;
}

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.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;
@@ -33,24 +34,39 @@ public class ImpositionsTfu extends BaseEntity implements Serializable {
private Long id;
@ManyToOne
private Exercice exercice;
@ManyToOne
private Commune commune;
@ManyToOne
private Structure structure ;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateGeneration;
private String ReferencePieceAdmin;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateCloture;
private String referencePieceAdmin;
private String datePieceAdmin;
@Enumerated(EnumType.STRING)
private StatusAvis statusAvis;
private Long nombreAvis;
private Integer nombreAvis;
private Integer nombreAvisFnb;
private Integer nombreAvisBatiment;
private Integer nombreAvisUniteLog;
@Column(columnDefinition = "TEXT")
private String motif;
@JsonIgnore
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "impositions_tfu_id")
private List<DonneesImpositionTfu> donneesImpositionTfus;
public Long getNombreAvis(){
return donneesImpositionTfus==null?0l:donneesImpositionTfus.size();
}
}

View File

@@ -39,7 +39,6 @@ public class SituationFiscaleParcelle extends BaseEntity implements Serializable
private Long montantDu ;
private Long montantPaye ;
private Long resteAPayer ;
private StatutParcelle etatFiscalParcelle ;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateSync;

View File

@@ -6,6 +6,8 @@ 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.Tpe;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -39,13 +41,33 @@ public class UniteLogement extends BaseEntity implements Serializable {
private List<EnqueteUniteLogement> enqueteUniteLogements;
@ManyToOne
private Batiment batiment;
@ManyToOne
private Usage usage;
private Long batimentExternalKey;
private Long idDerniereEnquete;
private Float SuperficieLouee;
private Float SuperficieAuSol;
private Long montantMensuelLocation;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Long valeurUniteLogementCalcule;
private Integer nombrePiscine;
@JsonIgnore
@ManyToOne
private Tpe terminal;
private Long enqueteId;
private Long mobileDataId;
@ManyToOne
private CategorieBatiment categorieBatiment ;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebutExemption;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExemption;
private Integer idToitRfu;
private Integer nombreEtage;
}

View File

@@ -2,6 +2,7 @@ package io.gmss.fiscad.entities.rfu.parametre;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.decoupage.Arrondissement;
import io.gmss.fiscad.entities.decoupage.Quartier;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -28,4 +29,6 @@ public class BaremRfuBati extends BaseEntity implements Serializable {
private CategorieBatiment categorieBatiment;
@ManyToOne
private Arrondissement arrondissement;
@ManyToOne
private Quartier quartier ;
}

View File

@@ -23,7 +23,9 @@ public class BaremRfuNonBati extends BaseEntity implements Serializable {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private Long valeurAdministrative;
private float taux;
private Long valeurAdministrativeMetreCarre;
private Boolean auMetreCarre;
private Float taux;
@ManyToOne
private Commune commune;
@ManyToOne

View File

@@ -23,4 +23,5 @@ public class CategorieBatiment extends BaseEntity implements Serializable {
@Column(unique = true)
private String code;
private String nom;
private String standing;
}

View File

@@ -0,0 +1,29 @@
package io.gmss.fiscad.entities.rfu.parametre;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.enums.CategorieUsage;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;
import java.io.Serializable;
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Where(clause = " deleted = false")
public class Usage extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String code;
private String nom;
@Enumerated(EnumType.STRING)
private CategorieUsage categorieUsage;
}

View File

@@ -0,0 +1,8 @@
package io.gmss.fiscad.enums;
public enum CategorieUsage {
HABITATION,
PROFESSIONNELLE,
MIXTE
}

View File

@@ -0,0 +1,6 @@
package io.gmss.fiscad.enums;
public enum NatureImpot {
TFU,
IRF
}

View File

@@ -12,5 +12,8 @@ public enum ParametersType {
CORPS_RESET_PASSWORD,
OBJET_CREATE_ACCOUNT,
CORPS_CREATE_ACCOUNT,
TOKEN_IFU_EN_LIGNE ;
TOKEN_IFU_EN_LIGNE,
TAUX_TFU_HABITATION,
TAUX_TFU_PROFESSIONNELLE,
TAUX_DEFAUT_SUPERFICIE_AU_SOL;
}

View File

@@ -0,0 +1,7 @@
package io.gmss.fiscad.enums;
public enum SourceDonnee {
RFU,
ANDF,
SIGIBE
}

View File

@@ -1,8 +1,11 @@
package io.gmss.fiscad.enums;
public enum StatusAvis {
CREE,
GENERE,
ANNULE,
VALIDE,
EN_COURS,
CLOTURE,
GENERATION_AUTORISE,
REJETE,
TFU_FNB_GENERE,
GENERE
}

View File

@@ -2,6 +2,7 @@ package io.gmss.fiscad.enums;
public enum StatutEnquete {
EN_COURS,
// DECLARATION,
FINALISE,
REJETE,
VALIDE,

View File

@@ -2,9 +2,6 @@ package io.gmss.fiscad.enums;
public enum StatutParcelle {
NON_ENQUETER,
ENQUETER_NON_BATIE_AJOUR,
ENQUETER_BATIE_AJOUR,
ENQUETER_NON_BATIE_NON_AJOUR,
ENQUETER_BATIE_NON_AJOUR
AJOUR,
NON_AJOUR;
}

View File

@@ -163,8 +163,15 @@ public class SecteurServiceImpl implements SecteurService {
secteurs.addAll(secteurRepository.findDistinctBySection_Id(avoirFonction.getFonction().getSection().getId()));
}else if(avoirFonction.getFonction().getStructure()!=null){
secteurs.addAll(secteurRepository.findDistinctBySection_Structure_Id(avoirFonction.getFonction().getStructure().getId()));
}else if(avoirFonction.getFonction().getDepartement()!=null){
secteurs.addAll(secteurRepository.findSectionsByDepartement(avoirFonction.getFonction().getDepartement().getId()));
}
});
return secteurs;
}
@Override
public List<Secteur> getListSecteurByDepartementId(Long departementId) {
return secteurRepository.findSectionsByDepartement(departementId);
}
}

View File

@@ -43,6 +43,7 @@ import io.gmss.fiscad.service.EntityFromPayLoadService;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.Query;
import jakarta.transaction.Transactional;
import lombok.RequiredArgsConstructor;
import org.modelmapper.ModelMapper;
import org.springframework.data.domain.Page;
@@ -348,7 +349,7 @@ public class EnqueteServiceImpl implements EnqueteService {
Enquete enquete = optionalEnquete.get();
enquete.setDateValidation(LocalDate.now());
enquete.setStatutEnquete(StatutEnquete.VALIDE);
enquete.setSynchronise(false);
enquete.setSynchronise(true);
return enqueteRepository.save(enquete);
}
@@ -541,4 +542,26 @@ public class EnqueteServiceImpl implements EnqueteService {
}
@Override
@Transactional
public int cloturerEnqueteParcelleBatimentUniteLogementByUserIdAndExerciceId(Long userId,Long exerciceId) {
Optional<User> optionalUser= userRepository.findById(userId);
int nbreEnquete=0;
if(optionalUser.isPresent() && optionalUser.get().getStructure()!=null){
Long structureId=optionalUser.get().getStructure().getId();
nbreEnquete=cloturerEnqueteParcelleBatimentUniteLogementByStructureIdAndExerciceId(structureId,exerciceId);
}
return nbreEnquete;
}
@Override
@Transactional
public int cloturerEnqueteParcelleBatimentUniteLogementByStructureIdAndExerciceId(Long structureId,Long exerciceId) {
Integer nombreParcelleImpacte=enqueteRepository.clotureEnqueteParcelle(structureId,exerciceId);
Integer nombreBatiment=enqueteBatimentRepository.clotureEnqueteBatiment(structureId,exerciceId);
Integer nombreUniteLogement=enqueteUniteLogementRepository.clotureEnqueteUniteLogement(structureId,exerciceId);
return nombreParcelleImpacte;
}
}

View File

@@ -8,6 +8,7 @@ import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.infocad.metier.ParcelleGeomService;
import io.gmss.fiscad.paylaods.request.crudweb.ParcelleGeomPaylaodWeb;
import io.gmss.fiscad.paylaods.response.EnqueteCheckResponse;
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
import io.gmss.fiscad.persistence.repositories.infocad.metier.ParcelleGeomRepository;
@@ -79,6 +80,7 @@ public class ParcelleGeomServiceImpl implements ParcelleGeomService {
return n;
}
private Upload saveGeoJsonUpload(MultipartFile file,String reference,String desc) {
Upload upload = new Upload();
String fileName = fileStorageService.storeFile(file);
@@ -176,6 +178,16 @@ public class ParcelleGeomServiceImpl implements ParcelleGeomService {
return parcelleGeomRepository.findAllByQuartier_Code(codeQuartier);
}
@Override
public List<ParcelleGeomPaylaodWeb> getParcelleGeomListByQuatierId(Long quartierId) {
return parcelleGeomRepository.findAllByQuartierId(quartierId);
}
@Override
public Page<ParcelleGeomPaylaodWeb> getParcelleGeomListByQuatierIdPaged(Long quartierId, Pageable pageable) {
return parcelleGeomRepository.findAllByQuartierIdPageable(quartierId,pageable);
}
@Override
public List<ParcelleGeom> getParcelleGeomListUnArrondissement(String codeArrondissement) {
return parcelleGeomRepository.findAllByQuartier_Arrondissement_Code(codeArrondissement);
@@ -262,4 +274,9 @@ public class ParcelleGeomServiceImpl implements ParcelleGeomService {
}
@Override
public int createParcelleGeomFromGeoJsonApi() throws BadRequestException {
return 0;
}
}

View File

@@ -22,6 +22,7 @@ import io.gmss.fiscad.persistence.repositories.infocad.parametre.SituationGeogra
import io.gmss.fiscad.persistence.specification.ParcelleSpecification;
import io.gmss.fiscad.service.GeometryService;
import jakarta.persistence.Query;
import jakarta.transaction.Transactional;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.*;
import org.springframework.stereotype.Service;
@@ -193,6 +194,13 @@ public class ParcelleServiceImpl implements ParcelleService {
}
@Override
@Transactional
public Integer majParcelleBatieNonbatie() {
return parcelleRepository.updateParcelleBatieTrue()+parcelleRepository.updateParcelleBatieFalse();
}
private List<Long> getSecteurIdListForUser(Long userId) {
List<Secteur> secteurs = secteurService.getListSecteurUserId(userId);
List<Long> secteurIds = secteurs.stream()

View File

@@ -1,20 +1,25 @@
package io.gmss.fiscad.implementations.infocad.parametre;
import io.gmss.fiscad.entities.decoupage.Commune;
import io.gmss.fiscad.entities.decoupage.Secteur;
import io.gmss.fiscad.entities.decoupage.Section;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.user.AvoirFonction;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.infocad.parametre.StructureService;
import io.gmss.fiscad.paylaods.request.crudweb.StructurePaylaodWeb;
import io.gmss.fiscad.paylaods.response.StructureResponse;
import io.gmss.fiscad.persistence.repositories.infocad.parametre.StructureRepository;
import io.gmss.fiscad.persistence.repositories.user.AvoirFonctionRepository;
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.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@AllArgsConstructor
@@ -23,6 +28,7 @@ public class StructureServiceImpl implements StructureService {
private final StructureRepository structureRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
private final AvoirFonctionRepository avoirFonctionRepository;
@Override
public StructurePaylaodWeb createStructure(StructurePaylaodWeb structurePaylaodWeb) throws BadRequestException {
@@ -89,5 +95,29 @@ public class StructureServiceImpl implements StructureService {
return structureRepository.findStructureToDtoById(id);
}
@Override
public List<Structure> getListStructureUserId(Long userId) {
List<AvoirFonction> avoirFonctions= avoirFonctionRepository.findAvoirFonctionByUser_Id(userId);
List<Structure> structures = new ArrayList<>();
avoirFonctions.stream()
.filter(af -> af.getDateFin() == null || af.getDateFin().isAfter(LocalDate.now()))
.forEach(avoirFonction -> {
if(avoirFonction.getFonction().getStructure()!=null){
structures.addAll(List.of(avoirFonction.getFonction().getStructure()));
}else if (avoirFonction.getFonction().getDepartement()!=null){
structures.addAll(structureRepository.findDistinctByCommune_Departement_Id(avoirFonction.getFonction().getDepartement().getId()));
}
});
return structures;
}
// public List<Long> getStructureIdListForUser(Long userId) {
// List<Structure> structures = secteurService.getListSecteurUserId(userId);
// List<Long> secteurIds = secteurs.stream()
// .map(Secteur::getId)
// .toList();
// return secteurIds;
// }
}

View File

@@ -73,7 +73,6 @@ public class CaracteristiqueBatimentServiceImpl implements CaracteristiqueBatime
return caracteristiqueBatimentRepository.findAllCaracteristiqueBatimentToDto();
}
@Override
public Optional<CaracteristiqueBatimentPayloadWeb> getCaracteristiqueBatimentToDto(Long id) {
if (caracteristiqueBatimentRepository.existsById(id)) {

View File

@@ -4,9 +4,12 @@ import io.gmss.fiscad.entities.decoupage.Arrondissement;
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.rfu.metier.DonneesImpositionTfuService;
import io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.paylaods.response.DonneesImpositionTfuResponse;
import io.gmss.fiscad.persistence.repositories.decoupage.ArrondissementRepository;
import io.gmss.fiscad.persistence.repositories.infocad.metier.EnqueteRepository;
@@ -15,6 +18,7 @@ import io.gmss.fiscad.persistence.repositories.rfu.metier.DonneesImpositionTfuRe
import io.gmss.fiscad.persistence.repositories.rfu.metier.ImpositionsTfuRepository;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.BaremRfuNonBatiRepository;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.ExerciceRepository;
import io.gmss.fiscad.service.EntityFromPayLoadService;
import jakarta.transaction.Transactional;
import lombok.AllArgsConstructor;
import org.springframework.dao.DataIntegrityViolationException;
@@ -36,6 +40,7 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
private final BaremRfuNonBatiRepository baremRfuNonBatiRepository;
private final ExerciceRepository exerciceRepository;
private final ArrondissementRepository arrondissementRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
@@ -91,91 +96,43 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
@Override
@Transactional
public Long genererDonneesFiscales(ImpositionsTfu impositionsTfu) {
List<DonneesImpositionTfuResponse> donneesImpositionTfuResponses= donneesImpositionTfuRepository.findAllDonneesImpositionTfu(impositionsTfu.getCommune().getId(),impositionsTfu.getExercice().getAnnee());
Long n=0l;
for (DonneesImpositionTfuResponse donneesImpositionTfuResponse: donneesImpositionTfuResponses){
DonneesImpositionTfu donneesImpositionTfu=new DonneesImpositionTfu();
donneesImpositionTfu.setImpositionsTfu(impositionsTfu);
donneesImpositionTfu.setZoneRfuId(donneesImpositionTfuResponse.getZoneRfuId());
donneesImpositionTfu.setCodeQuartierVillage(donneesImpositionTfuResponse.getCodeQuartierVillage());
donneesImpositionTfu.setNomQuartierVillage(donneesImpositionTfuResponse.getNomQuartierVillage());
donneesImpositionTfu.setCodeArrondissement(donneesImpositionTfuResponse.getCodeArrondissement());
donneesImpositionTfu.setNomArrondissement(donneesImpositionTfuResponse.getNomArrondissement());
donneesImpositionTfu.setCodeCommune(donneesImpositionTfuResponse.getCodeCommune());
donneesImpositionTfu.setNomCommune(donneesImpositionTfuResponse.getNomCommune());
donneesImpositionTfu.setCodeDepartement(donneesImpositionTfuResponse.getCodeDepartement());
donneesImpositionTfu.setNomDepartement(donneesImpositionTfuResponse.getNomDepartement());
donneesImpositionTfu.setQ(donneesImpositionTfuResponse.getQ());
donneesImpositionTfu.setIlot(donneesImpositionTfuResponse.getIlot());
donneesImpositionTfu.setParcelle(donneesImpositionTfuResponse.getParcelle());
donneesImpositionTfu.setLatitude(donneesImpositionTfuResponse.getLatitude());
donneesImpositionTfu.setLongitude(donneesImpositionTfuResponse.getLongitude());
donneesImpositionTfu.setNup(donneesImpositionTfuResponse.getNup());
donneesImpositionTfu.setNupProvisoire(donneesImpositionTfuResponse.getNupProvisoire());
donneesImpositionTfu.setSuperficieParc(donneesImpositionTfuResponse.getSuperficieParc());
donneesImpositionTfu.setAdresseProp(donneesImpositionTfuResponse.getAdresseProp());
donneesImpositionTfu.setAnnee(donneesImpositionTfuResponse.getAnnee());
donneesImpositionTfu.setAdresseSc(donneesImpositionTfuResponse.getAdresseSc());
donneesImpositionTfu.setBatieOuiNon(donneesImpositionTfuResponse.getBatieOuiNon());
donneesImpositionTfu.setTfuMinimum(donneesImpositionTfuResponse.getTfuMinimum());
donneesImpositionTfu.setCategorieBat(donneesImpositionTfuResponse.getCategorieBat());
donneesImpositionTfu.setDateEnquete(donneesImpositionTfuResponse.getDateEnquete());
donneesImpositionTfu.setEmailProp(donneesImpositionTfuResponse.getEmailProp());
donneesImpositionTfu.setEmailSc(donneesImpositionTfuResponse.getEmailSc());
donneesImpositionTfu.setMontantLoyerAnnuel(donneesImpositionTfuResponse.getMontantLoyerAnnuel());
donneesImpositionTfu.setEnqueteId(donneesImpositionTfuResponse.getEnqueteId());
donneesImpositionTfu.setExhonereOuiNon(donneesImpositionTfuResponse.getExhonereOuiNon());
donneesImpositionTfu.setIfu(donneesImpositionTfuResponse.getIfu());
donneesImpositionTfu.setNombreBat(donneesImpositionTfuResponse.getNombreBat());
donneesImpositionTfu.setNombrePiscine(donneesImpositionTfuResponse.getNombrePiscine());
donneesImpositionTfu.setNombreUlog(donneesImpositionTfuResponse.getNombreUlog());
donneesImpositionTfu.setNomProp(donneesImpositionTfuResponse.getNomProp());
donneesImpositionTfu.setNomSc(donneesImpositionTfuResponse.getNomSc());
donneesImpositionTfu.setNpi(donneesImpositionTfuResponse.getNpi());
donneesImpositionTfu.setNumBatiment(donneesImpositionTfuResponse.getNumBatiment()==null?"":donneesImpositionTfuResponse.getNumBatiment());
donneesImpositionTfu.setNumUniteLogement(donneesImpositionTfuResponse.getNumUniteLogement()==null?"":donneesImpositionTfuResponse.getNumUniteLogement());
donneesImpositionTfu.setPrenomProp(donneesImpositionTfuResponse.getPrenomProp());
donneesImpositionTfu.setPrenomSc(donneesImpositionTfuResponse.getPrenomSc());
donneesImpositionTfu.setRaisonSociale(donneesImpositionTfuResponse.getRaisonSociale());
donneesImpositionTfu.setSecteurId(donneesImpositionTfuResponse.getSecteurId());
donneesImpositionTfu.setStandingBat(donneesImpositionTfuResponse.getStandingBat());
donneesImpositionTfu.setStructureId(donneesImpositionTfuResponse.getStructureId());
donneesImpositionTfu.setSuperficieAuSolBat(donneesImpositionTfuResponse.getSuperficieAuSolBat());
donneesImpositionTfu.setSuperficieAuSolUlog(donneesImpositionTfuResponse.getSuperficieAuSolUlog());
donneesImpositionTfu.setTelProp(donneesImpositionTfuResponse.getTelProp());
donneesImpositionTfu.setTelSc(donneesImpositionTfuResponse.getTelSc());
donneesImpositionTfu.setTfuMetreCarre(donneesImpositionTfuResponse.getTfuMetreCarre());
donneesImpositionTfu.setTitreFoncier(donneesImpositionTfuResponse.getTitreFoncier());
donneesImpositionTfu.setValeurLocativeAdm(donneesImpositionTfuResponse.getValeurLocativeAdm());
donneesImpositionTfu.setBatimentExhonereOuiNon(donneesImpositionTfuResponse.getBatimentExhonereOuiNon());
donneesImpositionTfu.setUniteLogementExhonereOuiNon(donneesImpositionTfuResponse.getUniteLogementExhonereOuiNon());
try {
Optional<BaremRfuNonBati> baremRfuNonBatiOptional=baremRfuNonBatiRepository.findAllByCommune_IdAndZoneRfu_Id(impositionsTfu.getCommune().getId(),donneesImpositionTfu.getZoneRfuId());
if(baremRfuNonBatiOptional.isPresent()){
donneesImpositionTfu.setValeurAdministrativeParcelleNonBati(baremRfuNonBatiOptional.get().getValeurAdministrative());
donneesImpositionTfu.setTauxParcelleNonBati(baremRfuNonBatiOptional.get().getTaux());
}
public ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleNonBatie(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, Long userId) {
Integer nb= donneesImpositionTfuRepository.genererDonneesTfuNonBatie(impositionsTfuPaylaodWeb.getId(),userId);
ImpositionsTfu impositionsTfu = entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.TFU_FNB_GENERE);
impositionsTfu.setNombreAvisFnb(nb);
donneesImpositionTfuRepository.save(donneesImpositionTfu);
n++;
}catch (DataIntegrityViolationException e) {
if (e.getCause() instanceof org.hibernate.exception.ConstraintViolationException constraintEx &&
constraintEx.getSQLException().getSQLState().equals("23505")) {
System.out.println("Doublon détecté (clé unique) !");
} else {
throw e;
}
}
}
impositionsTfuRepository.save(impositionsTfu);
return n;
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
public List<DonneesImpositionTfu> getDonneesFiscalesByImposition(Long impositionsId) {
return donneesImpositionTfuRepository.findAllByImpositionsTfu_Id(impositionsId);
@Transactional
public ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleBatie(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb, Long userId) {
Integer nbb= donneesImpositionTfuRepository.genererDonneesTfuBatie(impositionsTfuPaylaodWeb.getId(),userId);
Integer nbulo= donneesImpositionTfuRepository.genererDonneesTfuBatieUniteLogement(impositionsTfuPaylaodWeb.getId(),userId);
ImpositionsTfu impositionsTfu = entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.GENERE);
impositionsTfu.setNombreAvis(nbb+nbulo+ (impositionsTfu.getNombreAvisFnb()==null?0:impositionsTfu.getNombreAvisFnb()));
impositionsTfu.setNombreAvisBatiment(nbb);
impositionsTfu.setNombreAvisUniteLog(nbulo);
impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
public List<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImposition(Long impositionsId) {
return donneesImpositionTfuRepository.findAllByImpositionTfuId(impositionsId);
}
@Override
@@ -187,4 +144,24 @@ public class DonneesImpositionTfuServiceImpl implements DonneesImpositionTfuServ
return null;
}
}
@Override
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdPageable(Long impositionsTfuId, Pageable pageable) {
return donneesImpositionTfuRepository.findAllByImpositionTfuIdPageable(impositionsTfuId,pageable);
}
@Override
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdNonBatiePageable(Long impositionsTfuId, Pageable pageable) {
return donneesImpositionTfuRepository.findAllByImpositionTfuIdNonBatiePageable(impositionsTfuId,pageable);
}
@Override
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieBatimentPageable(Long impositionsTfuId, Pageable pageable) {
return donneesImpositionTfuRepository.findAllByImpositionTfuIdBatieBatimentPageable(impositionsTfuId,pageable);
}
@Override
public Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieUniteLogPageable(Long impositionsTfuId, Pageable pageable) {
return donneesImpositionTfuRepository.findAllByImpositionTfuIdBatieUniteLogPageable(impositionsTfuId,pageable);
}
}

View File

@@ -1,81 +1,154 @@
package io.gmss.fiscad.implementations.rfu.metier;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.enums.StatusAvis;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
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.request.crudweb.ImpositionsTfuPaylaodWeb;
import io.gmss.fiscad.persistence.repositories.rfu.metier.ImpositionsTfuRepository;
import io.gmss.fiscad.service.EntityFromPayLoadService;
import jakarta.transaction.Transactional;
import jakarta.ws.rs.NotAcceptableException;
import lombok.AllArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@AllArgsConstructor
@Service
public class ImpositionsTfuServiceImpl implements ImpositionsTfuService {
private final ImpositionsTfuRepository impositionsTfuRepository;
private final StructureService structureService;
private final EntityFromPayLoadService entityFromPayLoadService;
private final EnqueteService enqueteService;
public ImpositionsTfuServiceImpl(ImpositionsTfuRepository impositionsTfuRepository) {
this.impositionsTfuRepository = impositionsTfuRepository;
}
/**
* Permet de créer pour un centre la synthèse de l'imposition de l'année en prélude de la
* génération des avis d'imposition
* @param impositionsTfuPaylaodWeb
* @return
* @throws BadRequestException
*/
@Override
public ImpositionsTfu createImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException {
if (impositionsTfu.getId() != null) {
@Transactional
public ImpositionsTfuPaylaodWeb createImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException {
if (impositionsTfuPaylaodWeb.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle unité de logement ayant un id non null.");
}
List<ImpositionsTfu> impositionsTfus=impositionsTfuRepository.getImpositionsTfuByCommuneAndExercice(impositionsTfu.getCommune().getCode(),impositionsTfu.getExercice().getAnnee());
List<ImpositionsTfu> impositionsTfus=impositionsTfuRepository.getImpositionsTfuByStructureAndExercice(impositionsTfuPaylaodWeb.getStructureId(), impositionsTfuPaylaodWeb.getExerciceId());
if (!impositionsTfus.isEmpty()) {
throw new BadRequestException("Une Imposition non annulée existe déjà");
}
impositionsTfu.setStatusAvis(StatusAvis.CREE);
impositionsTfu.setDateGeneration(LocalDate.now());
return impositionsTfuRepository.save(impositionsTfu);
List<StatusAvis> statusAvis= new ArrayList<>();
statusAvis.add(StatusAvis.EN_COURS);
statusAvis.add(StatusAvis.CLOTURE);
statusAvis.add(StatusAvis.GENERATION_AUTORISE);
Optional<ImpositionsTfu> optionalImpositionsTfu= impositionsTfuRepository.findDistinctByStructure_IdAndExercice_IdAndStatusAvisIn(impositionsTfuPaylaodWeb.getStructureId(),impositionsTfuPaylaodWeb.getExerciceId(),statusAvis);
if(optionalImpositionsTfu.isPresent()){
throw new BadRequestException("Une Imposition est déjà dans le workflow");
}
ImpositionsTfu impositionsTfu=entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
impositionsTfu.setStatusAvis(StatusAvis.EN_COURS);
impositionsTfu =impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
public ImpositionsTfu annulerImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException {
if (impositionsTfu.getId() == null) {
public ImpositionsTfuPaylaodWeb rejeterImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException {
if (impositionsTfuPaylaodWeb.getId() == null) {
throw new BadRequestException("Impossible d'annuler une imposition ayant un id null.");
}
if (!impositionsTfuRepository.existsById(impositionsTfu.getId())) {
if (!impositionsTfuRepository.existsById(impositionsTfuPaylaodWeb.getId())) {
throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans notre base de données.");
}
impositionsTfu.setStatusAvis(StatusAvis.ANNULE);
return impositionsTfuRepository.save(impositionsTfu);
ImpositionsTfu impositionsTfu= entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
if(!impositionsTfu.getStatusAvis().equals(StatusAvis.CLOTURE)){
throw new NotAcceptableException("L'état actuel :"+impositionsTfu.getStatusAvis()+"Ne permet pas de passer au l'état rejete");
}
impositionsTfu.setStatusAvis(StatusAvis.REJETE);
impositionsTfu =impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
@Transactional
public ImpositionsTfuPaylaodWeb cloturerImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException {
if (impositionsTfuPaylaodWeb.getId() == null) {
throw new BadRequestException("Impossible de cloturer une imposition ayant un id null.");
}
if (!impositionsTfuRepository.existsById(impositionsTfuPaylaodWeb.getId())) {
throw new NotFoundException("Impossible de trouver l'imposition spécifiée dans notre base de données.");
}
ImpositionsTfu impositionsTfu= entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
if(!impositionsTfu.getStatusAvis().equals(StatusAvis.EN_COURS) && !impositionsTfu.getStatusAvis().equals(StatusAvis.REJETE)){
throw new NotAcceptableException("L'état actuel :"+impositionsTfu.getStatusAvis()+"Ne permet pas de passer au l'état rejete");
}
impositionsTfu.setDateCloture(LocalDate.now());
enqueteService.cloturerEnqueteParcelleBatimentUniteLogementByStructureIdAndExerciceId(impositionsTfu.getStructure().getId(),impositionsTfu.getExercice().getId());
impositionsTfu.setStatusAvis(StatusAvis.CLOTURE);
impositionsTfu =impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
public ImpositionsTfu validerImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException {
if (impositionsTfu.getId() == null) {
public ImpositionsTfuPaylaodWeb autoriserGenerationImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException {
if (impositionsTfuPaylaodWeb.getId() == null) {
throw new BadRequestException("Impossible de valider une imposition ayant un id null.");
}
if (!impositionsTfuRepository.existsById(impositionsTfu.getId())) {
throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans notre base de données.");
if (!impositionsTfuRepository.existsById(impositionsTfuPaylaodWeb.getId())) {
throw new NotFoundException("Impossible de trouver l'imposition spécifiée dans notre base de données.");
}
impositionsTfu.setStatusAvis(StatusAvis.VALIDE);
return impositionsTfuRepository.save(impositionsTfu);
ImpositionsTfu impositionsTfu= entityFromPayLoadService.getImpositionsTfuFromPayLoadWeb(impositionsTfuPaylaodWeb);
if(!impositionsTfu.getStatusAvis().equals(StatusAvis.CLOTURE)){
throw new NotFoundException("L'état actuel : "+impositionsTfu.getStatusAvis()+ " ne permet pas de passer à l'état Autorisé");
}
impositionsTfu.setDateGeneration(LocalDate.now());
impositionsTfu.setStatusAvis(StatusAvis.GENERATION_AUTORISE);
impositionsTfu =impositionsTfuRepository.save(impositionsTfu);
return impositionsTfuRepository.findByIdToDto(impositionsTfu.getId()).orElse(null);
}
@Override
public ImpositionsTfu updateImpositionsTfu(Long id, ImpositionsTfu impositionsTfu) throws NotFoundException {
if (impositionsTfu.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle unité de logement ayant un id null.");
}
if (!impositionsTfuRepository.existsById(impositionsTfu.getId())) {
throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans notre base de données.");
}
return impositionsTfuRepository.save(impositionsTfu);
public ImpositionsTfuPaylaodWeb updateImpositionsTfu(Long id, ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws NotFoundException {
// if (impositionsTfu.getId() == null) {
// throw new BadRequestException("Impossible de mettre à jour une nouvelle unité de logement ayant un id null.");
// }
// if (!impositionsTfuRepository.existsById(impositionsTfu.getId())) {
// throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans notre base de données.");
// }
return null; // impositionsTfuRepository.save(impositionsTfu);
}
@Override
public void deleteImpositionsTfu(Long id) throws NotFoundException {
Optional<ImpositionsTfu> impositionsTfuOptional = impositionsTfuRepository.findById(id);
if (impositionsTfuOptional.isPresent()) {
if(!impositionsTfuOptional.get().getStatusAvis().equals(StatusAvis.EN_COURS)){
throw new NotFoundException("L'état actuel : "+impositionsTfuOptional.get().getStatusAvis()+ " ne permet pas de supprimer");
}
impositionsTfuRepository.deleteById(impositionsTfuOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans notre base de données.");
@@ -94,11 +167,22 @@ public class ImpositionsTfuServiceImpl implements ImpositionsTfuService {
@Override
public Optional<ImpositionsTfu> getImpositionsTfuById(Long id) {
public Optional<ImpositionsTfuPaylaodWeb> getImpositionsTfuById(Long id) {
if (impositionsTfuRepository.existsById(id)) {
return impositionsTfuRepository.findById(id);
return impositionsTfuRepository.findByIdToDto(id);
} else {
throw new NotFoundException("Impossible de trouver la nouvelle unité de logement spécifiée dans la base de données.");
}
}
@Override
public List<ImpositionsTfuPaylaodWeb> getImpositionsTfuByUserIdIds(Long userId) {
System.out.println(userId);
List<Structure> structures = structureService.getListStructureUserId(userId);
List<Long> structureIds = structures.stream()
.map(Structure::getId)
.toList();
System.out.println(structureIds.get(0));
return impositionsTfuRepository.findByStructureIdsToDto(structureIds);
}
}

View File

@@ -86,4 +86,9 @@ public class UniteLogementServiceImpl implements UniteLogementService {
public List<UniteLogementPaylaodWeb> getUniteLogementListByBatiment(Long batimentId) {
return uniteLogementRepository.findUnitesLogementAvecOccupantCourantByBatimentToDto(batimentId);
}
@Override
public List<UniteLogementPaylaodWeb> getUniteLogementListByParcelle(Long parcelleId) {
return uniteLogementRepository.findAllUnitesLogementAvecOccupantCourantByParcelleToDto(parcelleId);
}
}

View File

@@ -0,0 +1,92 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuBatiService;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuBatiPayloadWeb;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.BaremRfuRepository;
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 BaremRfuBatiServiceImpl implements BaremRfuBatiService {
private final BaremRfuRepository baremRfuRepository;
private final EntityFromPayLoadService entityFromPayLoadService;
@Override
public BaremRfuBatiPayloadWeb createBaremRfu(BaremRfuBatiPayloadWeb baremRfuBatiPayloadWeb) throws BadRequestException {
if (baremRfuBatiPayloadWeb.getId() != null) {
throw new BadRequestException("Impossible de créer un nouvel bareme rfu ayant un id non null.");
}
BaremRfuBati baremRfuBati = entityFromPayLoadService.getBaremRfuBatiFromPayLoadWeb(baremRfuBatiPayloadWeb);
baremRfuBati = baremRfuRepository.save(baremRfuBati);
return baremRfuRepository.findByBaremRfuBatieId(baremRfuBati.getId()).orElse(null);
}
@Override
public BaremRfuBatiPayloadWeb updateBaremRfu(Long id, BaremRfuBatiPayloadWeb baremRfuBatiPayloadWeb) throws NotFoundException {
if (baremRfuBatiPayloadWeb.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvel bareme rfu ayant un id null.");
}
if (!baremRfuRepository.existsById(baremRfuBatiPayloadWeb.getId())) {
throw new NotFoundException("Impossible de trouver le bareme spécifiée dans notre base de données.");
}
BaremRfuBati baremRfuBati = entityFromPayLoadService.getBaremRfuBatiFromPayLoadWeb(baremRfuBatiPayloadWeb);
baremRfuBati = baremRfuRepository.save(baremRfuBati);
return baremRfuRepository.findByBaremRfuBatieId(baremRfuBati.getId()).orElse(null);
}
@Override
public void deleteBaremRfu(Long id) throws NotFoundException {
Optional<BaremRfuBati> baremRfuOptional = baremRfuRepository.findById(id);
if (baremRfuOptional.isPresent()) {
baremRfuRepository.deleteById(baremRfuOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver le Bareme spécifié dans notre base de données.");
}
}
@Override
public Page<BaremRfuBatiPayloadWeb> getBaremRfuList(Pageable pageable) {
return baremRfuRepository.findAllPayloadPaged(pageable);
}
@Override
public List<BaremRfuBatiPayloadWeb> getBaremRfuList() {
return baremRfuRepository.findAllPayload();
}
@Override
public List<BaremRfuBatiPayloadWeb> getBaremRfuByCategorieBatiment(Long idCategorieBatiment) {
return baremRfuRepository.findByCategorieBatiment(idCategorieBatiment);
}
@Override
public List<BaremRfuBatiPayloadWeb> getBaremRfuByArrondissement(Long idArrondissement) {
return baremRfuRepository.findByArrondissementId(idArrondissement);
}
@Override
public List<BaremRfuBatiPayloadWeb> getBaremRfuByArrondissementAndCategorieBatiment(Long IdArrondissement, Long IdCategorieBatiment) {
return baremRfuRepository.findByArrondissementAndCategorieBatiment(IdArrondissement,IdCategorieBatiment);
}
@Override
public List<BaremRfuBatiPayloadWeb> getBaremRfuByQuartierAndCategorieBatiment(Long idQuartier, Long IdCategorieBatiment) {
return baremRfuRepository.findByQuartierAndCategorieBatiment(idQuartier,IdCategorieBatiment);
}
@Override
public BaremRfuBatiPayloadWeb getBaremRfuById(Long id) {
return baremRfuRepository.findByBaremRfuBatieId(id).orElse(null);
}
}

View File

@@ -4,38 +4,42 @@ import io.gmss.fiscad.entities.rfu.parametre.BaremRfuNonBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuNonBatiService;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuNonBatiPayloadWeb;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.BaremRfuNonBatiRepository;
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 BaremRfuNonBatiServiceImpl implements BaremRfuNonBatiService {
private final BaremRfuNonBatiRepository baremRfuNonBatiRepository;
public BaremRfuNonBatiServiceImpl(BaremRfuNonBatiRepository baremRfuNonBatiRepository) {
this.baremRfuNonBatiRepository = baremRfuNonBatiRepository;
}
private final EntityFromPayLoadService entityFromPayLoadService;
@Override
public BaremRfuNonBati createBaremRfuNonBati(BaremRfuNonBati baremRfuNonBati) throws BadRequestException {
if (baremRfuNonBati.getId() != null) {
public BaremRfuNonBatiPayloadWeb createBaremRfuNonBati(BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) throws BadRequestException {
if (baremRfuNonBatiPayloadWeb.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
}
return baremRfuNonBatiRepository.save(baremRfuNonBati);
BaremRfuNonBati baremRfuNonBati= entityFromPayLoadService.getBaremRfuNonBatiFromPayLoadWeb(baremRfuNonBatiPayloadWeb);
baremRfuNonBati=baremRfuNonBatiRepository.save(baremRfuNonBati);
return baremRfuNonBatiRepository.findByIdToDto(baremRfuNonBati.getId()).orElse(null);
}
@Override
public BaremRfuNonBati updateBaremRfuNonBati(Long id, BaremRfuNonBati baremRfuNonBati) throws NotFoundException {
if (baremRfuNonBati.getId() == null) {
public BaremRfuNonBatiPayloadWeb updateBaremRfuNonBati(Long id, BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) throws NotFoundException {
if (baremRfuNonBatiPayloadWeb.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle baremRfuNonBati ayant un id null.");
}
if (!baremRfuNonBatiRepository.existsById(baremRfuNonBati.getId())) {
if (!baremRfuNonBatiRepository.existsById(baremRfuNonBatiPayloadWeb.getId())) {
throw new NotFoundException("Impossible de trouver la baremRfuNonBati spécifiée dans notre base de données.");
}
return baremRfuNonBatiRepository.save(baremRfuNonBati);
BaremRfuNonBati baremRfuNonBati= entityFromPayLoadService.getBaremRfuNonBatiFromPayLoadWeb(baremRfuNonBatiPayloadWeb);
baremRfuNonBati=baremRfuNonBatiRepository.save(baremRfuNonBati);
return baremRfuNonBatiRepository.findByIdToDto(baremRfuNonBati.getId()).orElse(null);
}
@Override
@@ -48,20 +52,27 @@ public class BaremRfuNonBatiServiceImpl implements BaremRfuNonBatiService {
}
}
@Override
public Page<BaremRfuNonBati> getBaremRfuNonBatiList(Pageable pageable) {
return baremRfuNonBatiRepository.findAll(pageable);
public Page<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiList(Pageable pageable) {
return baremRfuNonBatiRepository.findAllPayloadToDtoPaged(pageable);
}
@Override
public List<BaremRfuNonBati> getBaremRfuNonBatiList() {
return baremRfuNonBatiRepository.findAll();
public List<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiList() {
return baremRfuNonBatiRepository.findAllPayloadToDto();
}
@Override
public Optional<BaremRfuNonBati> getBaremRfuNonBatiById(Long id) {
return baremRfuNonBatiRepository.findById(id);
public Optional<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiById(Long id) {
return baremRfuNonBatiRepository.findByIdToDto(id);
}
@Override
public Optional<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiByCommuneAndZoneId(Long communeId,Long zoneId) {
return baremRfuNonBatiRepository.findByCommuneAndZoneToDto(communeId,zoneId);
}
}

View File

@@ -1,70 +0,0 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.BaremRfuService;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.BaremRfuRepository;
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;
@Service
public class BaremRfuServiceImpl implements BaremRfuService {
private final BaremRfuRepository baremRfuRepository;
public BaremRfuServiceImpl(BaremRfuRepository baremRfuRepository) {
this.baremRfuRepository = baremRfuRepository;
}
@Override
public BaremRfuBati createBaremRfu(BaremRfuBati baremRfuBati) throws BadRequestException {
if (baremRfuBati.getId() != null) {
throw new BadRequestException("Impossible de créer un nouvel bareme rfu ayant un id non null.");
}
return baremRfuRepository.save(baremRfuBati);
}
@Override
public BaremRfuBati updateBaremRfu(Long id, BaremRfuBati baremRfuBati) throws NotFoundException {
if (baremRfuBati.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvel bareme rfu ayant un id null.");
}
if (!baremRfuRepository.existsById(baremRfuBati.getId())) {
throw new NotFoundException("Impossible de trouver le bareme spécifiée dans notre base de données.");
}
return baremRfuRepository.save(baremRfuBati);
}
@Override
public void deleteBaremRfu(Long id) throws NotFoundException {
Optional<BaremRfuBati> baremRfuOptional = baremRfuRepository.findById(id);
if (baremRfuOptional.isPresent()) {
baremRfuRepository.deleteById(baremRfuOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver le Bareme spécifié dans notre base de données.");
}
}
@Override
public Page<BaremRfuBati> getBaremRfuList(Pageable pageable) {
return baremRfuRepository.findAll(pageable);
}
@Override
public List<BaremRfuBati> getBaremRfuList() {
return baremRfuRepository.findAll();
}
@Override
public List<BaremRfuBati> getBaremRfuByType(Long idCategorieBatiment) {
return baremRfuRepository.findAllByCategorieBatiment_Id(idCategorieBatiment);
}
@Override
public Optional<BaremRfuBati> getBaremRfuById(Long id) {
return baremRfuRepository.findById(id);
}
}

View File

@@ -0,0 +1,67 @@
package io.gmss.fiscad.implementations.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.interfaces.rfu.parametre.UsageService;
import io.gmss.fiscad.persistence.repositories.rfu.parametre.UsageRepository;
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;
@Service
public class UsageServiceImpl implements UsageService {
private final UsageRepository usageRepository;
public UsageServiceImpl(UsageRepository usageRepository) {
this.usageRepository = usageRepository;
}
@Override
public Usage createUsage(Usage usage) throws BadRequestException {
if (usage.getId() != null) {
throw new BadRequestException("Impossible de créer une nouvelle campgne ayant un id non null.");
}
return usageRepository.save(usage);
}
@Override
public Usage updateUsage(Long id, Usage usage) throws NotFoundException {
if (usage.getId() == null) {
throw new BadRequestException("Impossible de mettre à jour une nouvelle usage ayant un id null.");
}
if (!usageRepository.existsById(usage.getId())) {
throw new NotFoundException("Impossible de trouver la usage spécifiée dans notre base de données.");
}
return usageRepository.save(usage);
}
@Override
public void deleteUsage(Long id) throws NotFoundException {
Optional<Usage> usageOptional = usageRepository.findById(id);
if (usageOptional.isPresent()) {
usageRepository.deleteById(usageOptional.get().getId());
} else {
throw new NotFoundException("Impossible de trouver la usage spécifiée dans notre base de données.");
}
}
@Override
public Page<Usage> getUsageList(Pageable pageable) {
return usageRepository.findAll(pageable);
}
@Override
public List<Usage> getUsageList() {
return usageRepository.findAll();
}
@Override
public Optional<Usage> getUsageById(Long id) {
return usageRepository.findById(id);
}
}

View File

@@ -32,4 +32,5 @@ public interface SecteurService {
Optional<SecteurPaylaodWeb> getSecteurById(Long id);
List<Secteur> getListSecteurUserId(Long userId) ;
List<Secteur> getListSecteurByDepartementId(Long departementId) ;
}

View File

@@ -58,5 +58,6 @@ public interface EnqueteService {
public List<EnqueteNonSyncResponse> getEnqueteValideNonSynch(Long terminalId);
int cloturerEnqueteParcelleBatimentUniteLogementByStructureIdAndExerciceId(Long strucutreId,Long exerciceId);
int cloturerEnqueteParcelleBatimentUniteLogementByUserIdAndExerciceId(Long userId,Long exerciceId);
}

View File

@@ -6,6 +6,7 @@ import io.gmss.fiscad.entities.infocad.metier.ParcelleGeom;
import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.ParcelleGeomPaylaodWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;
@@ -15,12 +16,15 @@ import java.util.Optional;
public interface ParcelleGeomService {
int createParcelleFromGeoJsonFile(MultipartFile file,String reference,String description) throws BadRequestException;
int createParcelleGeomFromGeoJsonApi() throws BadRequestException;
ParcelleGeom createOnParcelleFromGeoJson(JsonNode jsonNode, Upload upload) throws BadRequestException;
ParcelleGeom updateParcelleGeom(MultipartFile file) throws NotFoundException;
void deleteParcelle(Long id) throws NotFoundException;
Page<ParcelleGeom> getParcelleGeomList(Pageable pageable);
List<ParcelleGeom> getParcelleGeomList();
List<ParcelleGeom> getParcelleGeomListUnQuatier(String codeQuartier);
List<ParcelleGeomPaylaodWeb> getParcelleGeomListByQuatierId(Long quartierId);
Page<ParcelleGeomPaylaodWeb> getParcelleGeomListByQuatierIdPaged(Long quartierId,Pageable pageable);
public List<ParcelleGeom> getParcelleGeomListUnArrondissement(String codeArrondissement);
Optional<ParcelleGeom> getParcelleGeomById(Long id);

View File

@@ -35,4 +35,5 @@ public interface ParcelleService {
Page<ParcellePayLoadWeb> getParcelleListByRuePageableToDto(Long userId,Long rueId,Pageable pageable);
Page<ParcellePayLoadWeb> getParcelleByMultiFiltre(Long userId, FiltreParcelle filtreParcelle, Pageable pageable);
Integer majParcelleBatieNonbatie();
}

View File

@@ -1,6 +1,8 @@
package io.gmss.fiscad.interfaces.infocad.parametre;
import io.gmss.fiscad.entities.decoupage.Secteur;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.user.AvoirFonction;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.StructurePaylaodWeb;
@@ -8,6 +10,8 @@ import io.gmss.fiscad.paylaods.response.StructureResponse;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@@ -31,4 +35,6 @@ public interface StructureService {
//List<StructureResponse> getStructuresByArrondissement(Long arrondissementID);
public List<Structure> getListStructureUserId(Long userId) ;
}

View File

@@ -4,6 +4,8 @@ import io.gmss.fiscad.entities.rfu.metier.DonneesImpositionTfu;
import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.DonneesImpositionPaylaodWeb;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -11,8 +13,6 @@ import java.util.List;
import java.util.Optional;
public interface DonneesImpositionTfuService {
DonneesImpositionTfu createDonneesImpositionTfu(DonneesImpositionTfu donneesImpositionTfu) throws BadRequestException;
DonneesImpositionTfu updateDonneesImpositionTfu(Long id, DonneesImpositionTfu donneesImpositionTfu) throws NotFoundException;
@@ -25,7 +25,17 @@ public interface DonneesImpositionTfuService {
Optional<DonneesImpositionTfu> getDonneesImpositionTfuById(Long id);
Long genererDonneesFiscales(ImpositionsTfu impositionsTfu);
List<DonneesImpositionTfu> getDonneesFiscalesByImposition(Long impositionsId);
ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleBatie(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb,Long userId);
ImpositionsTfuPaylaodWeb genererDonneesFiscalesParcelleNonBatie(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb,Long userId);
List<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImposition(Long impositionsId);
List<DonneesImpositionTfu> getDonneesFiscalesByImpositionArrondissement(Long impositionsId,Long arrondissementId);
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdPageable(Long impositionsTfuId, Pageable pageable);
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdNonBatiePageable(Long impositionsTfuId, Pageable pageable);
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieBatimentPageable(Long impositionsTfuId, Pageable pageable);
Page<DonneesImpositionPaylaodWeb> getDonneesFiscalesByImpositionTfuIdBatieUniteLogPageable(Long impositionsTfuId, Pageable pageable);
}

View File

@@ -3,6 +3,7 @@ package io.gmss.fiscad.interfaces.rfu.metier;
import io.gmss.fiscad.entities.rfu.metier.ImpositionsTfu;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.ImpositionsTfuPaylaodWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -11,11 +12,12 @@ import java.util.Optional;
public interface ImpositionsTfuService {
ImpositionsTfu createImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException;
ImpositionsTfu annulerImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException;
ImpositionsTfu validerImpositionsTfu(ImpositionsTfu impositionsTfu) throws BadRequestException;
ImpositionsTfuPaylaodWeb createImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException;
ImpositionsTfuPaylaodWeb rejeterImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException;
ImpositionsTfuPaylaodWeb cloturerImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException;
ImpositionsTfuPaylaodWeb autoriserGenerationImpositionsTfu(ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws BadRequestException;
ImpositionsTfu updateImpositionsTfu(Long id, ImpositionsTfu impositionsTfu) throws NotFoundException;
ImpositionsTfuPaylaodWeb updateImpositionsTfu(Long id, ImpositionsTfuPaylaodWeb impositionsTfuPaylaodWeb) throws NotFoundException;
void deleteImpositionsTfu(Long id) throws NotFoundException;
@@ -23,5 +25,6 @@ public interface ImpositionsTfuService {
List<ImpositionsTfu> getImpositionsTfuList();
Optional<ImpositionsTfu> getImpositionsTfuById(Long id);
Optional<ImpositionsTfuPaylaodWeb> getImpositionsTfuById(Long id);
List<ImpositionsTfuPaylaodWeb> getImpositionsTfuByUserIdIds(Long userId);
}

View File

@@ -28,4 +28,6 @@ public interface UniteLogementService {
Page<UniteLogementPaylaodWeb> getUniteLogementListByBatimentPageable(Long batimentId, Pageable pageable);
List<UniteLogementPaylaodWeb> getUniteLogementListByBatiment(Long batimentId);
List<UniteLogementPaylaodWeb> getUniteLogementListByParcelle(Long parcelleId);
}

View File

@@ -0,0 +1,32 @@
package io.gmss.fiscad.interfaces.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuBatiPayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Optional;
public interface BaremRfuBatiService {
BaremRfuBatiPayloadWeb createBaremRfu(BaremRfuBatiPayloadWeb baremRfuBati) throws BadRequestException;
BaremRfuBatiPayloadWeb updateBaremRfu(Long id, BaremRfuBatiPayloadWeb baremRfuBati) throws NotFoundException;
void deleteBaremRfu(Long id) throws NotFoundException;
Page<BaremRfuBatiPayloadWeb> getBaremRfuList(Pageable pageable);
List<BaremRfuBatiPayloadWeb> getBaremRfuList();
List<BaremRfuBatiPayloadWeb> getBaremRfuByCategorieBatiment(Long IdCategorieBatiment);
List<BaremRfuBatiPayloadWeb> getBaremRfuByArrondissement(Long IdArrondissement);
List<BaremRfuBatiPayloadWeb> getBaremRfuByArrondissementAndCategorieBatiment(Long IdArrondissement,Long IdCategorieBatiment);
List<BaremRfuBatiPayloadWeb> getBaremRfuByQuartierAndCategorieBatiment(Long idQuartier,Long IdCategorieBatiment);
BaremRfuBatiPayloadWeb getBaremRfuById(Long id);
}

View File

@@ -3,6 +3,7 @@ package io.gmss.fiscad.interfaces.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuNonBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import io.gmss.fiscad.paylaods.request.crudweb.BaremRfuNonBatiPayloadWeb;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -11,17 +12,18 @@ import java.util.Optional;
public interface BaremRfuNonBatiService {
BaremRfuNonBati createBaremRfuNonBati(BaremRfuNonBati baremRfuNonBati) throws BadRequestException;
BaremRfuNonBatiPayloadWeb createBaremRfuNonBati(BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) throws BadRequestException;
BaremRfuNonBati updateBaremRfuNonBati(Long id, BaremRfuNonBati baremRfuNonBati) throws NotFoundException;
BaremRfuNonBatiPayloadWeb updateBaremRfuNonBati(Long id, BaremRfuNonBatiPayloadWeb baremRfuNonBatiPayloadWeb) throws NotFoundException;
void deleteBaremRfuNonBati(Long id) throws NotFoundException;
Page<BaremRfuNonBati> getBaremRfuNonBatiList(Pageable pageable);
Page<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiList(Pageable pageable);
List<BaremRfuNonBati> getBaremRfuNonBatiList();
List<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiList();
Optional<BaremRfuNonBati> getBaremRfuNonBatiById(Long id);
Optional<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiById(Long id);
Optional<BaremRfuNonBatiPayloadWeb> getBaremRfuNonBatiByCommuneAndZoneId(Long communeId,Long zoneId);
}

View File

@@ -1,28 +0,0 @@
package io.gmss.fiscad.interfaces.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.BaremRfuBati;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Optional;
public interface BaremRfuService {
BaremRfuBati createBaremRfu(BaremRfuBati baremRfuBati) throws BadRequestException;
BaremRfuBati updateBaremRfu(Long id, BaremRfuBati baremRfuBati) throws NotFoundException;
void deleteBaremRfu(Long id) throws NotFoundException;
Page<BaremRfuBati> getBaremRfuList(Pageable pageable);
List<BaremRfuBati> getBaremRfuList();
List<BaremRfuBati> getBaremRfuByType(Long IdCategorieBatiment);
Optional<BaremRfuBati> getBaremRfuById(Long id);
}

View File

@@ -0,0 +1,27 @@
package io.gmss.fiscad.interfaces.rfu.parametre;
import io.gmss.fiscad.entities.rfu.parametre.Usage;
import io.gmss.fiscad.exceptions.BadRequestException;
import io.gmss.fiscad.exceptions.NotFoundException;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Optional;
public interface UsageService {
Usage createUsage(Usage usage) throws BadRequestException;
Usage updateUsage(Long id, Usage usage) throws NotFoundException;
void deleteUsage(Long id) throws NotFoundException;
Page<Usage> getUsageList(Pageable pageable);
List<Usage> getUsageList();
Optional<Usage> getUsageById(Long id);
}

View File

@@ -1,7 +1,9 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class ArrondissementPaylaodWeb {
private Long id;

View File

@@ -7,9 +7,10 @@ import io.gmss.fiscad.enums.Titre;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class AvoirFonctionPaylaodWeb {
private Long id;

View File

@@ -0,0 +1,56 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import io.gmss.fiscad.entities.decoupage.Arrondissement;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import jakarta.persistence.ManyToOne;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class BaremRfuBatiPayloadWeb {
private Long id;
private Long valeurLocative;
private Double tfuMetreCarre;
private Long tfuMinimum;
private Long categorieBatimentId;
private String categorieBatimentNom;
private String categorieBatimentStanding;
private Long arrondissementId;
private String arrondissementCode;
private String arrondissementNom;
private Long quartierId;
private String quartierCode;
private String quartierNom;
private Long communeId;
private String communeCode;
private String communeNom;
public BaremRfuBatiPayloadWeb(Long id, Long valeurLocative, Double tfuMetreCarre, Long tfuMinimum, Long categorieBatimentId, String categorieBatimentNom, String categorieBatimentStanding, Long arrondissementId, String arrondissementCode, String arrondissementNom,
Long quartierId,
String quartierCode,
String quartierNom,
Long communeId,
String communeCode,
String communeNom
) {
this.id = id;
this.valeurLocative = valeurLocative;
this.tfuMetreCarre = tfuMetreCarre;
this.tfuMinimum = tfuMinimum;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentNom = categorieBatimentNom;
this.categorieBatimentStanding = categorieBatimentStanding;
this.arrondissementId = arrondissementId;
this.arrondissementCode = arrondissementCode;
this.arrondissementNom = arrondissementNom;
this.quartierId = quartierId;
this.quartierCode = quartierCode;
this.quartierNom = quartierNom;
this.communeId = communeId;
this.communeCode = communeCode;
this.communeNom = communeNom;
}
}

View File

@@ -0,0 +1,47 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import io.gmss.fiscad.entities.decoupage.Commune;
import io.gmss.fiscad.entities.rfu.parametre.ZoneRfu;
import jakarta.persistence.ManyToOne;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class BaremRfuNonBatiPayloadWeb {
private Long id;
private Long valeurAdministrative;
private float taux;
private Long communeId;
private String communeCode;
private String communeNom;
private Long zoneRfuId;
private String zoneRfuCode;
private String zoneRfuNom;
private Long valeurAdministrativeMetreCarre;
private Boolean auMetreCarre;
public BaremRfuNonBatiPayloadWeb(Long id,
Long valeurAdministrative,
Float taux,
Long communeId,
String communeCode,
String communeNom,
Long zoneRfuId,
String zoneRfuCode,
String zoneRfuNom,
Long valeurAdministrativeMetreCarre,
Boolean auMetreCarre) {
this.id = id;
this.valeurAdministrative = valeurAdministrative;
this.taux = taux;
this.communeId = communeId;
this.communeCode = communeCode;
this.communeNom = communeNom;
this.zoneRfuId = zoneRfuId;
this.zoneRfuCode = zoneRfuCode;
this.zoneRfuNom = zoneRfuNom;
this.valeurAdministrativeMetreCarre = valeurAdministrativeMetreCarre;
this.auMetreCarre = auMetreCarre;
}
}

View File

@@ -20,11 +20,55 @@ public class BatimentPaylaodWeb {
private String personneNom;
private String personnePrenom;
private String personneRaisonSociale;
private Float superficieSol;
private Float superficieAuSol;
private Float superficieLouee;
private Long enqueteBatiementCourantId;
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Integer nombrePiscine;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long montantLocatifAnnuelEstime;
private Long valeurBatimentEstime;
private Long valeurBatimentReel;
private Long valeurBatimentCalcule;
private Long montantMensuelLocation;
private Long usageId;
private String usageNom;
private Integer nbreUniteLogement;
public BatimentPaylaodWeb(Long id, String nub, String code, LocalDate dateConstruction, Long parcelleId, String parcelleNup, String parcelleQ, String parcelleI, String parcelleP, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Float superficieSol, Float superficieLouee,Long enqueteBatiementCourantId) {
public BatimentPaylaodWeb(Long id,
String nub,
String code,
LocalDate dateConstruction,
Long parcelleId,
String parcelleNup,
String parcelleQ,
String parcelleI,
String parcelleP,
Long personneId,
String personneNom,
String personnePrenom,
String personneRaisonSociale,
Float superficieAuSol,
Float superficieLouee,
Long enqueteBatiementCourantId,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Integer nombrePiscine,
Long montantLocatifAnnuelDeclare,
Long montantLocatifAnnuelCalcule,
Long valeurBatimentEstime,
Long valeurBatimentReel,
Long montantMensuelLocation,
Long usageId,
String usageNom,
Long montantLocatifAnnuelEstime,
Long valeurBatimentCalcule,
Integer nbreUniteLogement
) {
this.id = id;
this.nub = nub;
this.code = code;
@@ -38,8 +82,23 @@ public class BatimentPaylaodWeb {
this.personneNom = personneNom;
this.personnePrenom = personnePrenom;
this.personneRaisonSociale = personneRaisonSociale;
this.superficieSol = superficieSol ;
this.superficieAuSol = superficieAuSol ;
this.superficieLouee = superficieLouee ;
this.enqueteBatiementCourantId = enqueteBatiementCourantId ;
this.categorieBatimentId = categorieBatimentId ;
this.categorieBatimentCode = categorieBatimentCode ;
this.categorieBatimentStanding = categorieBatimentStanding ;
this.nombrePiscine = nombrePiscine ;
this.montantLocatifAnnuelDeclare = montantLocatifAnnuelDeclare ;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule ;
this.valeurBatimentEstime = valeurBatimentEstime ;
this.valeurBatimentReel = valeurBatimentReel ;
this.montantMensuelLocation = montantMensuelLocation ;
this.usageId = usageId ;
this.usageNom = usageNom ;
this.montantLocatifAnnuelEstime = montantLocatifAnnuelEstime ;
this.valeurBatimentCalcule = valeurBatimentCalcule ;
this.nbreUniteLogement = nbreUniteLogement ;
}
}

View File

@@ -1,9 +1,10 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class CaracteristiqueBatimentPayloadWeb {
private Long id;
@@ -15,8 +16,12 @@ public class CaracteristiqueBatimentPayloadWeb {
private String caracteristiqueLibelle;
private String valeur;
private String observation;
private Long typeCaracteristiqueId;
private String typeCaracteristiqueLibelle;
public CaracteristiqueBatimentPayloadWeb(Long id, Long enqueteBatimentId, LocalDate enqueteBatimentDateEnquete, Integer enqueteBatimentAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation) {
public CaracteristiqueBatimentPayloadWeb(Long id, Long enqueteBatimentId, LocalDate enqueteBatimentDateEnquete, Integer enqueteBatimentAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation,
Long typeCaracteristiqueId,
String typeCaracteristiqueLibelle) {
this.id = id;
this.enqueteBatimentId = enqueteBatimentId;
this.enqueteBatimentDateEnquete = enqueteBatimentDateEnquete;
@@ -26,5 +31,8 @@ public class CaracteristiqueBatimentPayloadWeb {
this.caracteristiqueLibelle = caracteristiqueLibelle;
this.valeur = valeur;
this.observation = observation;
this.typeCaracteristiqueId = typeCaracteristiqueId;
this.typeCaracteristiqueLibelle = typeCaracteristiqueLibelle;
}
}

View File

@@ -1,9 +1,10 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class CaracteristiqueParcellePayloadWeb {
private Long id;
@@ -15,8 +16,12 @@ public class CaracteristiqueParcellePayloadWeb {
private String caracteristiqueLibelle;
private String valeur;
private String observation;
private Long typeCaracteristiqueId;
private String typeCaracteristiqueLibelle;
public CaracteristiqueParcellePayloadWeb(Long id, Long enqueteId, LocalDate enqueteDateEnquete, Integer enqueteAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation) {
public CaracteristiqueParcellePayloadWeb(Long id, Long enqueteId, LocalDate enqueteDateEnquete, Integer enqueteAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation,
Long typeCaracteristiqueId,
String typeCaracteristiqueLibelle) {
this.id = id;
this.enqueteId = enqueteId;
this.enqueteDateEnquete = enqueteDateEnquete;
@@ -26,5 +31,7 @@ public class CaracteristiqueParcellePayloadWeb {
this.caracteristiqueLibelle = caracteristiqueLibelle;
this.valeur = valeur;
this.observation = observation;
this.typeCaracteristiqueId = typeCaracteristiqueId;
this.typeCaracteristiqueLibelle = typeCaracteristiqueLibelle;
}
}

View File

@@ -1,9 +1,10 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class CaracteristiqueUniteLogementPayloadWeb {
private Long id;
@@ -15,8 +16,12 @@ public class CaracteristiqueUniteLogementPayloadWeb {
private String caracteristiqueLibelle;
private String valeur;
private String observation;
private Long typeCaracteristiqueId;
private String typeCaracteristiqueLibelle;
public CaracteristiqueUniteLogementPayloadWeb(Long id, Long enqueteUniteLogementId, LocalDate enqueteUniteLogementDateEnquete, Integer enqueteUniteLogementAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation) {
public CaracteristiqueUniteLogementPayloadWeb(Long id, Long enqueteUniteLogementId, LocalDate enqueteUniteLogementDateEnquete, Integer enqueteUniteLogementAnnee, Long caracteristiqueId, String caracteristiqueCode, String caracteristiqueLibelle, String valeur, String observation,
Long typeCaracteristiqueId,
String typeCaracteristiqueLibelle) {
this.id = id;
this.enqueteUniteLogementId = enqueteUniteLogementId;
this.enqueteUniteLogementDateEnquete = enqueteUniteLogementDateEnquete;
@@ -26,5 +31,7 @@ public class CaracteristiqueUniteLogementPayloadWeb {
this.caracteristiqueLibelle = caracteristiqueLibelle;
this.valeur = valeur;
this.observation = observation;
this.typeCaracteristiqueId = typeCaracteristiqueId;
this.typeCaracteristiqueLibelle = typeCaracteristiqueLibelle;
}
}

View File

@@ -1,7 +1,9 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class CommunePaylaodWeb {
private Long id;

View File

@@ -1,9 +1,10 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class DepartementPaylaodWeb {
private Long id;

View File

@@ -0,0 +1,201 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.gmss.fiscad.enums.NatureImpot;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class DonneesImpositionPaylaodWeb {
private Long id;
private Long annee;
private String codeDepartement;
private String nomDepartement;
private String codeCommune;
private String nomCommune;
private String codeArrondissement;
private String nomArrondissement;
private String codeQuartierVillage;
private String nomQuartierVillage;
private String q;
private String ilot;
private String parcelle;
private String nup;
private String titreFoncier;
private String numBatiment;
private String numUniteLogement;
private String ifu;
private String npi;
private String telProp;
private String emailProp;
private String nomProp;
private String prenomProp;
private String raisonSociale;
private String adresseProp;
private String telRep;
private String emailRep;
private String nomRep;
private String prenomRep;
private String adresseRep;
private String longitude;
private String latitude;
private Integer superficieParc;
private Long superficieAuSolBat;
private Long superficieAuSolUlog;
private Boolean batie;
private Boolean exonere;
private Boolean batimentExonere;
private Boolean uniteLogementExonere;
private Long valeurLocativeAdm;
private Long valeurBatiment;
private Long valeurParcelle;
private Long montantLoyerAnnuel;
private Long tfuMetreCarre;
private Long tfuMinimum;
private String standingBat;
private String categorieBat;
private Long nombrePiscine;
private Long nombreUlog;
private Long nombreBat;
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDate dateEnquete;
private Long serviceId;
private String serviceCode;
private Long zoneRfuId;
private String zoneRfuNom;
private Float tauxTfu;
private Long valeurAdminParcelleNb;
@Enumerated(EnumType.STRING)
private NatureImpot natureImpot;
private Long valeurLocativeAdmMetreCarre;
private Long valeurAdminParcelleNbMetreCarre;
private Float montantTaxe;
public DonneesImpositionPaylaodWeb(Long id,
Long annee,
String codeDepartement,
String nomDepartement,
String codeCommune,
String nomCommune,
String codeArrondissement,
String nomArrondissement,
String codeQuartierVillage,
String nomQuartierVillage,
String q, String ilot,
String parcelle,
String nup,
String titreFoncier,
String numBatiment,
String numUniteLogement,
String ifu,
String npi,
String telProp,
String emailProp,
String nomProp,
String prenomProp,
String raisonSociale,
String adresseProp,
String telRep,
String emailRep,
String nomRep,
String prenomRep,
String adresseRep,
String longitude,
String latitude,
Integer superficieParc,
Long superficieAuSolBat,
Long superficieAuSolUlog,
Boolean batie,
Boolean exonere,
Boolean batimentExonere,
Boolean uniteLogementExonere,
Long valeurLocativeAdm,
Long montantLoyerAnnuel,
Long tfuMetreCarre,
Long tfuMinimum,
String standingBat,
String categorieBat,
Long nombrePiscine,
Long nombreUlog,
Long nombreBat,
LocalDate dateEnquete,
Long serviceId,
Long zoneRfuId,
Long valeurAdministrativeParcelleNonBati,
NatureImpot natureImpot,
String serviceCode,
String zoneRfuNom,
Long valeurBatiment,
Long valeurParcelle,
Long valeurLocativeAdmMetreCarre,
Long valeurAdministrativeParcelleNonBatiAuMetreCarre,
Float montantTaxe
) {
this.id = id;
this.annee = annee;
this.codeDepartement = codeDepartement;
this.nomDepartement = nomDepartement;
this.codeCommune = codeCommune;
this.nomCommune = nomCommune;
this.codeArrondissement = codeArrondissement;
this.nomArrondissement = nomArrondissement;
this.codeQuartierVillage = codeQuartierVillage;
this.nomQuartierVillage = nomQuartierVillage;
this.q = q;
this.ilot = ilot;
this.parcelle = parcelle;
this.nup = nup;
this.titreFoncier = titreFoncier;
this.numBatiment = numBatiment;
this.numUniteLogement = numUniteLogement;
this.ifu = ifu;
this.npi = npi;
this.telProp = telProp;
this.emailProp = emailProp;
this.nomProp = nomProp;
this.prenomProp = prenomProp;
this.raisonSociale = raisonSociale;
this.adresseProp = adresseProp;
this.telRep = telRep;
this.emailRep = emailRep;
this.nomRep = nomRep;
this.prenomRep = prenomRep;
this.adresseRep = adresseRep;
this.longitude = longitude;
this.latitude = latitude;
this.superficieParc = superficieParc;
this.superficieAuSolBat = superficieAuSolBat;
this.superficieAuSolUlog = superficieAuSolUlog;
this.batie = batie;
this.exonere = exonere;
this.batimentExonere = batimentExonere;
this.uniteLogementExonere = uniteLogementExonere;
this.valeurLocativeAdm = valeurLocativeAdm;
this.montantLoyerAnnuel = montantLoyerAnnuel;
this.tfuMetreCarre = tfuMetreCarre;
this.tfuMinimum = tfuMinimum;
this.standingBat = standingBat;
this.categorieBat = categorieBat;
this.nombrePiscine = nombrePiscine;
this.nombreUlog = nombreUlog;
this.nombreBat = nombreBat;
this.dateEnquete = dateEnquete;
this.serviceId = serviceId;
this.zoneRfuId = zoneRfuId;
this.valeurAdminParcelleNb = valeurAdministrativeParcelleNonBati;
this.natureImpot = natureImpot;
this.serviceCode = serviceCode;
this.zoneRfuNom = zoneRfuNom;
this.valeurBatiment = valeurBatiment;
this.valeurParcelle = valeurParcelle;
this.valeurLocativeAdmMetreCarre = valeurLocativeAdmMetreCarre;
this.valeurAdminParcelleNbMetreCarre = valeurAdministrativeParcelleNonBatiAuMetreCarre;
this.montantTaxe = montantTaxe;
}
}

View File

@@ -1,10 +1,11 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.List;
@NoArgsConstructor
@Data
public class EnqueteActivitePayLoadWeb {
private Long id;

View File

@@ -7,10 +7,11 @@ import io.gmss.fiscad.enums.StatutEnquete;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.List;
@NoArgsConstructor
@Data
public class EnqueteBatimentPayloadWeb {
private Long id;
@@ -51,15 +52,38 @@ public class EnqueteBatimentPayloadWeb {
private String enqueteurNom;
private String enqueteurPrenom;
@Enumerated(EnumType.STRING)
@JsonIgnore
// @JsonIgnore
private StatutEnquete statutEnquete;
private Long exerciceId;
private Integer exerciceAnnee;
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Integer nombrePiscine;
private Long montantLocatifAnnuelCalcule;
private Long usageId;
private String usageNom;
public EnqueteBatimentPayloadWeb(Long id, String observation, String autreMenuisierie, String autreMur, boolean sbee, String numCompteurSbee, boolean soneb, String numCompteurSoneb, int nbreLotUnite, int nbreUniteLocation, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, int nbreMenage, int nbreHabitant, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long nbreEtage, Long valeurBatimentEstime, Long valeurBatimentReel, int nbreMoisLocation, String autreCaracteristiquePhysique, LocalDate dateDebutExcemption, LocalDate dateFinExcemption, Long batimentId, String batimentNub, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom,
StatutEnquete statutEnquete,
Long exerciceId,
Integer exerciceAnnee) {
Integer exerciceAnnee,
String representantNom,
String representantPrenom,
String representantTel,
String representantNpi,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Integer nombrePiscine,
Long montantLocatifAnnuelCalcule,
Long usageId,
String usageNom
) {
this.id = id;
this.observation = observation;
this.autreMenuisierie = autreMenuisierie;
@@ -96,5 +120,16 @@ public class EnqueteBatimentPayloadWeb {
this.statutEnquete = statutEnquete;
this.exerciceId = exerciceId;
this.exerciceAnnee = exerciceAnnee;
this.representantNom = representantNom;
this.representantPrenom = representantPrenom;
this.representantTel = representantTel;
this.representantNpi = representantNpi;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentCode = categorieBatimentCode;
this.categorieBatimentStanding = categorieBatimentStanding;
this.nombrePiscine = nombrePiscine;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
this.usageId = usageId ;
this.usageNom = usageNom ;
}
}

View File

@@ -4,10 +4,11 @@ import io.gmss.fiscad.enums.StatutEnquete;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.List;
@NoArgsConstructor
@Data
public class EnquetePayLoadWeb {
private Long id;
@@ -55,13 +56,21 @@ public class EnquetePayLoadWeb {
private String parcelleQ;
private String parcelleI;
private String parcelleP;
private Long exerviceId;
private Integer exerviceAnnee;
private Long exerciceId;
private Integer exerciceAnnee;
private Long modeAcquisitionId;
private String modeAcquisitionLibelle;
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
public EnquetePayLoadWeb(Long id, LocalDate dateEnquete, LocalDate dateFinalisation, Boolean litige, StatutEnquete statutEnquete, String descriptionMotifRejet, String observation, String numeroTitreFoncier, LocalDate dateTitreFoncier, String numEntreeParcelle, String numRue, String nomRue, Float precision, Integer nbreCoProprietaire, Integer nbreIndivisiaire, String autreAdresse, Float superficie, Integer nbreBatiment, Integer nbrePiscine, LocalDate dateDebutExemption, LocalDate dateFinExemption, String autreNumeroTitreFoncier, Long montantMensuelleLocation, Long montantAnnuelleLocation, Long valeurParcelleEstime, Long valeurParcelleReel, Long zoneRfuId, String zoneRfuNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom,Long parcelleId, String parcelleNup, String parcelleQ, String parcelleI, String parcelleP, Long exerviceId, Integer exerviceAnnee,
Long modeAcquisitionId,String modeAcquisitionLibelle) {
public EnquetePayLoadWeb(Long id, LocalDate dateEnquete, LocalDate dateFinalisation, Boolean litige, StatutEnquete statutEnquete, String descriptionMotifRejet, String observation, String numeroTitreFoncier, LocalDate dateTitreFoncier, String numEntreeParcelle, String numRue, String nomRue, Float precision, Integer nbreCoProprietaire, Integer nbreIndivisiaire, String autreAdresse, Float superficie, Integer nbreBatiment, Integer nbrePiscine, LocalDate dateDebutExemption, LocalDate dateFinExemption, String autreNumeroTitreFoncier, Long montantMensuelleLocation, Long montantAnnuelleLocation, Long valeurParcelleEstime, Long valeurParcelleReel, Long zoneRfuId, String zoneRfuNom, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom,Long parcelleId, String parcelleNup, String parcelleQ, String parcelleI, String parcelleP, Long exerciceId, Integer exerciceAnnee,
Long modeAcquisitionId,String modeAcquisitionLibelle,
String representantNom,
String representantPrenom,
String representantTel,
String representantNpi) {
this.id = id;
this.dateEnquete = dateEnquete;
this.dateFinalisation = dateFinalisation;
@@ -102,9 +111,13 @@ public class EnquetePayLoadWeb {
this.parcelleQ = parcelleQ;
this.parcelleI = parcelleI;
this.parcelleP = parcelleP;
this.exerviceId = exerviceId;
this.exerviceAnnee = exerviceAnnee;
this.exerciceId = exerciceId;
this.exerciceAnnee = exerciceAnnee;
this.modeAcquisitionId = modeAcquisitionId;
this.modeAcquisitionLibelle = modeAcquisitionLibelle;
this.representantNom = representantNom;
this.representantTel = representantTel;
this.representantPrenom = representantPrenom;
this.representantNpi = representantNpi;
}
}

View File

@@ -4,10 +4,11 @@ import io.gmss.fiscad.enums.StatutEnquete;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.List;
@NoArgsConstructor
@Data
public class EnqueteUniteLogementPayloadWeb {
private Long id;
@@ -17,8 +18,8 @@ public class EnqueteUniteLogementPayloadWeb {
private Integer nbreMenage;
private Boolean enLocation;
private Integer nbreMoisLocation;
private Float montantMensuelLoyer;
private Float montantLocatifAnnuelDeclare;
private Long montantMensuelLocation;
private Long montantLocatifAnnuelDeclare;
private Long valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Float superficieLouee;
@@ -44,9 +45,31 @@ public class EnqueteUniteLogementPayloadWeb {
private Integer exerciceAnnee;
@Enumerated(EnumType.STRING)
private StatutEnquete statutEnquete;
public EnqueteUniteLogementPayloadWeb(Long id, String observation, Integer nbrePiece, Integer nbreHabitant, Integer nbreMenage, Boolean enLocation, Integer nbreMoisLocation, Float montantMensuelLoyer, Float montantLocatifAnnuelDeclare, Long valeurUniteLogementEstime, Long valeurUniteLogementReel, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, Boolean sbee, Boolean soneb, String numCompteurSbee, String numCompteurSoneb, LocalDate dateDebutExemption, LocalDate dateFinExemption, Long uniteLogementId, String uniteLogementNumeroEtage, String uniteLogementNul, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom, Long exerciceId, Integer exerciceAnnee,
StatutEnquete statutEnquete) {
private String representantNom;
private String representantPrenom;
private String representantTel;
private String representantNpi;
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Long montantLocatifAnnuelCalcule;
private Integer nombrePiscine;
private Long usageId;
private String usageNom;
public EnqueteUniteLogementPayloadWeb(Long id, String observation, Integer nbrePiece, Integer nbreHabitant, Integer nbreMenage, Boolean enLocation, Integer nbreMoisLocation, Long montantMensuelLocation, Long montantLocatifAnnuelDeclare, Long valeurUniteLogementEstime, Long valeurUniteLogementReel, Float superficieLouee, Float superficieAuSol, LocalDate dateEnquete, Boolean sbee, Boolean soneb, String numCompteurSbee, String numCompteurSoneb, LocalDate dateDebutExemption, LocalDate dateFinExemption, Long uniteLogementId, String uniteLogementNumeroEtage, String uniteLogementNul, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale, Long enqueteurId, String enqueteurNom, String enqueteurPrenom, Long exerciceId, Integer exerciceAnnee,
StatutEnquete statutEnquete,
String representantNom,
String representantPrenom,
String representantTel,
String representantNpi,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Integer nombrePiscine,
Long montantLocatifAnnuelCalcule,
Long usageId,
String usageNom
) {
this.id = id;
this.observation = observation;
this.nbrePiece = nbrePiece;
@@ -54,7 +77,7 @@ public class EnqueteUniteLogementPayloadWeb {
this.nbreMenage = nbreMenage;
this.enLocation = enLocation;
this.nbreMoisLocation = nbreMoisLocation;
this.montantMensuelLoyer = montantMensuelLoyer;
this.montantMensuelLocation = montantMensuelLocation;
this.montantLocatifAnnuelDeclare = montantLocatifAnnuelDeclare;
this.valeurUniteLogementEstime = valeurUniteLogementEstime;
this.valeurUniteLogementReel = valeurUniteLogementReel;
@@ -80,5 +103,16 @@ public class EnqueteUniteLogementPayloadWeb {
this.exerciceId = exerciceId;
this.exerciceAnnee = exerciceAnnee;
this.statutEnquete = statutEnquete;
this.representantNom = representantNom;
this.representantPrenom = representantPrenom;
this.representantTel = representantTel;
this.representantNpi = representantNpi;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentCode = categorieBatimentCode;
this.categorieBatimentStanding = categorieBatimentStanding;
this.nombrePiscine = nombrePiscine;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
this.usageId = usageId ;
this.usageNom = usageNom ;
}
}

View File

@@ -9,10 +9,11 @@ import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class FonctionPaylaodWeb {
private Long id;

View File

@@ -0,0 +1,64 @@
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.decoupage.Commune;
import io.gmss.fiscad.entities.infocad.parametre.Structure;
import io.gmss.fiscad.entities.rfu.parametre.Exercice;
import io.gmss.fiscad.enums.NatureImpot;
import io.gmss.fiscad.enums.StatusAvis;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class ImpositionsTfuPaylaodWeb {
private Long id;
private LocalDate dateGeneration;
private LocalDate dateCloture;
private String referencePieceAdmin;
private String datePieceAdmin;
@Enumerated(EnumType.STRING)
private StatusAvis statusAvis;
private Integer nombreAvis;
private Integer nombreAvisFnb;
private Integer nombreAvisBatiment;
private Integer nombreAvisUniteLog;
@Column(columnDefinition = "TEXT")
private String motif;
private Long exerciceId;
private Integer exerciceAnnee;
private Long communeId;
private String communeCode;
private String communeNom;
private Long structureId ;
private String structureNom ;
public ImpositionsTfuPaylaodWeb(Long id, LocalDate dateGeneration, LocalDate dateCloture, String referencePieceAdmin, String datePieceAdmin, StatusAvis statusAvis, Integer nombreAvis, String motif, Long exerciceId, Integer exerciceAnnee, Long communeId, String communeCode, String communeNom, Long structureId, String structureNom,
Integer nombreAvisFnb,
Integer nombreAvisBatiment,
Integer nombreAvisUniteLog
) {
this.id = id;
this.dateGeneration = dateGeneration;
this.dateCloture = dateCloture;
this.referencePieceAdmin = referencePieceAdmin;
this.datePieceAdmin = datePieceAdmin;
this.statusAvis = statusAvis;
this.nombreAvis = nombreAvis;
this.motif = motif;
this.exerciceId = exerciceId;
this.exerciceAnnee = exerciceAnnee;
this.communeId = communeId;
this.communeCode = communeCode;
this.communeNom = communeNom;
this.structureId = structureId;
this.structureNom = structureNom;
this.nombreAvisFnb = nombreAvisFnb;
this.nombreAvisBatiment = nombreAvisBatiment;
this.nombreAvisUniteLog = nombreAvisUniteLog;
}
}

View File

@@ -0,0 +1,160 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.gmss.fiscad.entities.decoupage.Arrondissement;
import io.gmss.fiscad.entities.decoupage.Commune;
import io.gmss.fiscad.entities.decoupage.Departement;
import io.gmss.fiscad.entities.decoupage.Quartier;
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
import io.gmss.fiscad.enums.SourceDonnee;
import io.gmss.fiscad.enums.StatutParcelle;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault;
import org.locationtech.jts.geom.Polygon;
import org.n52.jackson.datatype.jts.GeometryDeserializer;
import org.n52.jackson.datatype.jts.GeometrySerializer;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class ParcelleGeomPaylaodWeb {
private Long id;
private String nup;
private String nupProvisoire;
private String longitude;
private String latitude;
private String numeroRue;
private String numeroEntreePorte;
private String codeInstad;
private String numeroEtatLieux;
private String numeroTitreFoncier;
private LocalDate dateTitreFoncier;
private Boolean batie ;
private String npi;
private String ifu;
private String nom;
private String prenom;
private String raisonSociale;
private String nomEtPrenoms;
private String telephone;
private String adresse;
private String nomRepresentant;
private String prenomRepresentant;
private String raisonSocialeRepresentant;
private String nomEtPrenomsRepresentant;
private String telephoneRepresentant;
private String adresseRepresentant;
private String q;
private String zone;
private String ilot;
private String p;
private String qLotissement;
private String ilotLotissement;
private String pLotissement;
private String pointsPolygone;
private Integer superficie;
private String dateCollecte;
@Enumerated(EnumType.STRING)
private SourceDonnee sourceDonnees;
private String observations;
@Enumerated(EnumType.STRING)
private StatutParcelle statutParcelle;
private Long departementId;
private String departementCode;
private String departementNom;
private Long communeId;
private String communeCode;
private String communeNom;
private Long arrondissementId;
private String arrondissementCode;
private String arrondissementNom;
private Long quartierId ;
private String quartierCode ;
private String quartierNom ;
private Integer geomSrid;
@JsonSerialize(using = GeometrySerializer.class)
@JsonDeserialize(contentUsing = GeometryDeserializer.class)
//@Column(name = "geometry",columnDefinition = "geometry(Polygon,32631)")
private Polygon geometry;
//@Column(columnDefinition = "TEXT")
private String geometryString;
private Long parcelleId;
public ParcelleGeomPaylaodWeb(Long id, String nup, String nupProvisoire, String longitude, String latitude, String numeroRue, String numeroEntreePorte, String codeInstad, String numeroEtatLieux, String numeroTitreFoncier, LocalDate dateTitreFoncier, Boolean batie, String npi, String ifu, String nom, String prenom, String raisonSociale, String nomEtPrenoms, String telephone, String adresse, String nomRepresentant, String prenomRepresentant, String raisonSocialeRepresentant, String nomEtPrenomsRepresentant, String telephoneRepresentant, String adresseRepresentant, String q, String zone, String ilot, String p, String qLotissement, String ilotLotissement, String pLotissement, String pointsPolygone, Integer superficie, String dateCollecte, SourceDonnee sourceDonnees, String observations, StatutParcelle statutParcelle, Long departementId, String departementCode, String departementNom, Long communeId, String communeCode, String communeNom, Long arrondissementId, String arrondissementCode, String arrondissementNom, Long quartierId, String quartierCode, String quartierNom, Integer geomSrid, Polygon geometry, String geometryString, Long parcelleId) {
this.id = id;
this.nup = nup;
this.nupProvisoire = nupProvisoire;
this.longitude = longitude;
this.latitude = latitude;
this.numeroRue = numeroRue;
this.numeroEntreePorte = numeroEntreePorte;
this.codeInstad = codeInstad;
this.numeroEtatLieux = numeroEtatLieux;
this.numeroTitreFoncier = numeroTitreFoncier;
this.dateTitreFoncier = dateTitreFoncier;
this.batie = batie;
this.npi = npi;
this.ifu = ifu;
this.nom = nom;
this.prenom = prenom;
this.raisonSociale = raisonSociale;
this.nomEtPrenoms = nomEtPrenoms;
this.telephone = telephone;
this.adresse = adresse;
this.nomRepresentant = nomRepresentant;
this.prenomRepresentant = prenomRepresentant;
this.raisonSocialeRepresentant = raisonSocialeRepresentant;
this.nomEtPrenomsRepresentant = nomEtPrenomsRepresentant;
this.telephoneRepresentant = telephoneRepresentant;
this.adresseRepresentant = adresseRepresentant;
this.q = q;
this.zone = zone;
this.ilot = ilot;
this.p = p;
this.qLotissement = qLotissement;
this.ilotLotissement = ilotLotissement;
this.pLotissement = pLotissement;
this.pointsPolygone = pointsPolygone;
this.superficie = superficie;
this.dateCollecte = dateCollecte;
this.sourceDonnees = sourceDonnees;
this.observations = observations;
this.statutParcelle = statutParcelle;
this.departementId = departementId;
this.departementCode = departementCode;
this.departementNom = departementNom;
this.communeId = communeId;
this.communeCode = communeCode;
this.communeNom = communeNom;
this.arrondissementId = arrondissementId;
this.arrondissementCode = arrondissementCode;
this.arrondissementNom = arrondissementNom;
this.quartierId = quartierId;
this.quartierCode = quartierCode;
this.quartierNom = quartierNom;
this.geomSrid = geomSrid;
this.geometry = geometry;
this.geometryString = geometryString;
this.parcelleId = parcelleId;
}
}

View File

@@ -1,10 +1,11 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.List;
@NoArgsConstructor
@Data
public class PiecePayLoadWeb {
private Long id;

View File

@@ -8,10 +8,11 @@ import io.gmss.fiscad.enums.Titre;
import io.gmss.fiscad.enums.UserProfile;
import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
import java.util.Set;
@NoArgsConstructor
@Data
public class ProfilePaylaodWeb {
private Long id;

View File

@@ -1,7 +1,9 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class QuartierPaylaodWeb {
private Long id;

View File

@@ -12,9 +12,10 @@ 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 SecteurDecoupagePaylaodWeb {
private Long id;

View File

@@ -4,7 +4,9 @@ import io.gmss.fiscad.enums.UserProfile;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class SecteurPaylaodWeb {
private Long id;

View File

@@ -4,7 +4,9 @@ import io.gmss.fiscad.enums.UserProfile;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class SectionPaylaodWeb {
private Long id;

View File

@@ -4,7 +4,9 @@ import io.gmss.fiscad.entities.decoupage.Commune;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class StructurePaylaodWeb {
private Long id;

View File

@@ -1,9 +1,10 @@
package io.gmss.fiscad.paylaods.request.crudweb;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@NoArgsConstructor
@Data
public class UniteLogementPaylaodWeb {
private Long id;
@@ -11,7 +12,7 @@ public class UniteLogementPaylaodWeb {
private String numeroEtage;
private String code;
private Long batimentId;
private Float superficieSol;
private Float superficieAuSol;
private Float superficieLouee;
private String batimentNub;
private String observation;
@@ -21,14 +22,41 @@ public class UniteLogementPaylaodWeb {
private String personnePrenom;
private String personneRaisonSociale;
private Long enqueteUniteLogementCourantId;
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Long montantMensuelLocation;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long montantLocatifAnnuelEstime;
private Long valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Long valeurUniteLogementCalcule;
private Integer nombrePiscine;
private Long usageId;
private String usageNom;
public UniteLogementPaylaodWeb(Long id, String nul, String numeroEtage, String code, Long batimentId, Float superficieSol, Float superficieLouee, String batimentNub, String observation, LocalDate dateConstruction, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale,Long enqueteUniteLogementCourantId) {
public UniteLogementPaylaodWeb(Long id, String nul, String numeroEtage, String code, Long batimentId, Float superficieAuSol, Float superficieLouee, String batimentNub, String observation, LocalDate dateConstruction, Long personneId, String personneNom, String personnePrenom, String personneRaisonSociale,Long enqueteUniteLogementCourantId,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Long montantMensuelLocation,
Long montantLocatifAnnuelDeclare,
Long montantLocatifAnnuelCalcule,
Long valeurUniteLogementEstime,
Long valeurUniteLogementReel,
Integer nombrePiscine,
Long usageId,
String usageNom,
Long montantLocatifAnnuelEstime,
Long valeurUniteLogementCalcule
) {
this.id = id;
this.nul = nul;
this.numeroEtage = numeroEtage;
this.code = code;
this.batimentId = batimentId;
this.superficieSol = superficieSol;
this.superficieAuSol = superficieAuSol;
this.superficieLouee = superficieLouee;
this.batimentNub = batimentNub;
this.observation = observation;
@@ -38,5 +66,18 @@ public class UniteLogementPaylaodWeb {
this.personnePrenom = personnePrenom;
this.personneRaisonSociale = personneRaisonSociale;
this.enqueteUniteLogementCourantId = enqueteUniteLogementCourantId;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentCode = categorieBatimentCode;
this.categorieBatimentStanding = categorieBatimentStanding;
this.montantMensuelLocation = montantMensuelLocation;
this.montantLocatifAnnuelDeclare = montantLocatifAnnuelDeclare;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
this.valeurUniteLogementEstime = valeurUniteLogementEstime;
this.valeurUniteLogementReel = valeurUniteLogementReel;
this.nombrePiscine = nombrePiscine;
this.usageId = usageId ;
this.usageNom = usageNom ;
this.montantLocatifAnnuelEstime = montantLocatifAnnuelEstime ;
this.valeurUniteLogementCalcule = valeurUniteLogementCalcule ;
}
}

View File

@@ -3,7 +3,7 @@ package io.gmss.fiscad.paylaods.request.crudweb;
import jakarta.persistence.Transient;
import lombok.Data;
import lombok.NoArgsConstructor;
@NoArgsConstructor
@Data
public class UploadPayLoadWeb {
private Long id;
@@ -30,8 +30,6 @@ public class UploadPayLoadWeb {
private long size;
private String mimeType;
public UploadPayLoadWeb() {
}
public UploadPayLoadWeb(Long id, Long pieceId, String name, String filePath, Long enqueteBatimentId, Long personneId, Long enqueteUniteLogementId, Long declarationNcId, String reference, String description, String rename,
String fileName,String originalFileName) {

View File

@@ -17,9 +17,9 @@ public class EnqueteUniteLogementPayload {
private int nbreHabitant;
private int nbreMenage;
private boolean enLocation;
private float montantMensuelLoyer;
private Long montantMensuelLocation;
private int nbreMoisEnLocation;
private float montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelDeclare;
private float surfaceLouee;
private boolean sbee;
private boolean soneb;

View File

@@ -80,7 +80,7 @@ public class ParcelleRepositoryCustomImpl implements ParcelleRepositoryCustom {
pers.prenom as prenom,
pers.raison_sociale as raisonSociale,
de.id as enqueteId
de.id as enqueteCouranteId
FROM parcelle p
LEFT JOIN quartier q ON q.id = p.quartier_id

View File

@@ -186,5 +186,19 @@ public interface SecteurRepository extends JpaRepository<Secteur, Long> {
Optional<SecteurPaylaodWeb> findSecteurToDtoById(@Param("idSecteur") Long idSecteur);
@Query("""
SELECT new io.gmss.fiscad.entities.decoupage.Secteur(
sec.id,
sec.code,
sec.nom,
secti
)
FROM Secteur sec
LEFT JOIN sec.section secti
LEFT JOIN secti.structure st
LEFT JOIN st.commune com
LEFT JOIN com.departement dep
WHERE dep.id = :idDepartement
""")
List<Secteur> findSectionsByDepartement(@Param("idDepartement") Long idDepartement);
}

View File

@@ -13,6 +13,7 @@ import io.gmss.fiscad.paylaods.response.synchronisation.EnqueteNonSyncResponse;
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.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
@@ -22,6 +23,26 @@ import java.util.Optional;
public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
Optional<Enquete> findFirstByCodeParcelle(String codeParcelle);
Optional<Enquete> findByMobileDataId(Long id);
@Modifying
@Query("""
UPDATE Enquete e
SET e.statutEnquete = 'CLOTURE'
WHERE EXISTS (
SELECT 1
FROM Parcelle p
JOIN p.quartier q
JOIN SecteurDecoupage cd on cd.quartier.id=q.id
JOIN cd.secteur s
JOIN s.section sect
JOIN sect.structure stru
WHERE e.parcelle.id=p.id
AND stru.id= :structureId
)
AND e.exercice.id = :exerciceId
""")
Integer clotureEnqueteParcelle(@Param("structureId") Long structureId,@Param("exerciceId") Long exerciceId);
@Query(value = "select distinct " +
" e.id," +
" e.parcelle_id as parcelleId," +
@@ -278,7 +299,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
@@ -335,7 +360,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
@@ -350,66 +379,70 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
@Query(
value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb(
e.id,
e.dateEnquete,
e.dateFinalisation,
e.litige,
e.statutEnquete,
e.descriptionMotifRejet,
e.observationParticuliere,
pa.numeroTitreFoncier,
pa.dateTitreFoncier,
e.numEntreeParcelle,
e.numRue,
e.nomRue,
e.precision,
e.nbreCoProprietaire,
e.nbreIndivisiaire,
e.autreAdresse,
e.superficie,
e.nbreBatiment,
e.nbrePiscine,
e.dateDebutExemption,
e.dateFinExemption,
pa.autreNumeroTitreFoncier,
e.montantMensuelleLocation,
e.montantAnnuelleLocation,
e.valeurParcelleEstime,
e.valeurParcelleReel,
zr.id,
zr.nom,
p.id,
p.nom,
p.prenom,
p.raisonSociale,
u.id,
u.nom,
u.prenom,
pa.id,
pa.nup,
pa.q,
pa.i,
pa.p,
ex.id,
ex.annee,
ma.id,
ma.libelle
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
LEFT JOIN e.personne p
LEFT JOIN e.user u
LEFT JOIN e.parcelle pa
LEFT JOIN e.exercice ex
LEFT JOIN e.modeAcquisition ma
""",
countQuery = """
SELECT COUNT(e)
FROM Enquete e
"""
)
Page<EnquetePayLoadWeb> findAllEnquetesToDtoPageable(Pageable pageable);
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb(
e.id,
e.dateEnquete,
e.dateFinalisation,
e.litige,
e.statutEnquete,
e.descriptionMotifRejet,
e.observationParticuliere,
pa.numeroTitreFoncier,
pa.dateTitreFoncier,
e.numEntreeParcelle,
e.numRue,
e.nomRue,
e.precision,
e.nbreCoProprietaire,
e.nbreIndivisiaire,
e.autreAdresse,
e.superficie,
e.nbreBatiment,
e.nbrePiscine,
e.dateDebutExemption,
e.dateFinExemption,
pa.autreNumeroTitreFoncier,
e.montantMensuelleLocation,
e.montantAnnuelleLocation,
e.valeurParcelleEstime,
e.valeurParcelleReel,
zr.id,
zr.nom,
p.id,
p.nom,
p.prenom,
p.raisonSociale,
u.id,
u.nom,
u.prenom,
pa.id,
pa.nup,
pa.q,
pa.i,
pa.p,
ex.id,
ex.annee,
ma.id,
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
LEFT JOIN e.personne p
LEFT JOIN e.user u
LEFT JOIN e.parcelle pa
LEFT JOIN e.exercice ex
LEFT JOIN e.modeAcquisition ma
""",
countQuery = """
SELECT COUNT(e)
FROM Enquete e
"""
)
Page<EnquetePayLoadWeb> findAllEnquetesToDtoPageable(Pageable pageable);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.EnquetePayLoadWeb(
@@ -456,7 +489,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
@@ -518,7 +555,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
@@ -586,7 +627,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr
@@ -647,7 +692,11 @@ public interface EnqueteRepository extends JpaRepository<Enquete, Long> {
ex.id,
ex.annee,
ma.id,
ma.libelle
ma.libelle,
e.representantNom,
e.representantPrenom,
e.representantTel,
e.representantNpi
)
FROM Enquete e
LEFT JOIN e.zoneRfu zr

View File

@@ -1,10 +1,14 @@
package io.gmss.fiscad.persistence.repositories.infocad.metier;
import io.gmss.fiscad.entities.infocad.metier.ParcelleGeom;
import io.gmss.fiscad.paylaods.request.crudweb.ParcelleGeomPaylaodWeb;
import jakarta.transaction.Transactional;
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.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import java.util.List;
import java.util.Optional;
@@ -12,7 +16,9 @@ import java.util.Optional;
public interface ParcelleGeomRepository extends JpaRepository<ParcelleGeom, Long> {
List<ParcelleGeom> findAllByQuartier_Code(String code);
List<ParcelleGeom> findAllByQuartier_Id(Long quartierId);
List<ParcelleGeom> findAllByQuartier_Arrondissement_Code(String code);
List<ParcelleGeom> findAllByQuartier_Arrondissement_Id(Long arrondissementId);
Optional<ParcelleGeom> findFirstByNupProvisoire(String numProvisoir);
@Modifying
@@ -73,6 +79,198 @@ public interface ParcelleGeomRepository extends JpaRepository<ParcelleGeom, Long
void majCentroidParcelle();
@Modifying
@Transactional
@Query(value = """
update parcelle_geom pg
set parcelle_id = p.id,statut_parcelle='NON_AJOUR'
from parcelle p
where upper(p.q)=upper(pg.q)
and upper(p.i)=upper(pg.ilot)
and upper(p.p)=upper(pg.p)
and parcelle_is is null;
""",nativeQuery = true)
void majParcelleId();
@Modifying
@Transactional
@Query(value = """
UPDATE parcelle_geom p
SET batie = true
WHERE EXISTS (
SELECT 1
FROM Batiment b
WHERE b.parcelle_id = p.parcelle_id
)
and p.parcelle_id is not null;
""",nativeQuery = true)
void majParcelleBatie();
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParcelleGeomPaylaodWeb(
pg.id,
pg.nup,
pg.nupProvisoire,
pg.longitude,
pg.latitude,
pg.numeroRue,
pg.numeroEntreePorte,
pg.codeInstad,
pg.numeroEtatLieux,
pg.numeroTitreFoncier,
pg.dateTitreFoncier,
pg.batie,
pg.npi,
pg.ifu,
pers.nom,
pers.prenom,
pers.raisonSociale,
pg.nomEtPrenoms,
pg.telephone,
pg.adresse,
pg.nomRepresentant,
pg.prenomRepresentant,
pg.raisonSocialeRepresentant,
pg.nomEtPrenomsRepresentant,
pg.telephoneRepresentant,
pg.adresseRepresentant,
pg.q,
pg.zone,
pg.ilot,
pg.p,
pg.qLotissement,
pg.ilotLotissement,
pg.pLotissement,
pg.pointsPolygone,
pg.superficie,
pg.dateCollecte,
pg.sourceDonnees,
pg.observations,
pg.statutParcelle,
d.id,
d.code,
d.nom,
c.id,
c.code,
c.nom,
a.id,
a.code,
a.nom,
q.id,
q.code,
q.nom,
pg.geomSrid,
pg.geometry,
pg.geometryString,
parc.id
)
FROM ParcelleGeom pg
LEFT JOIN pg.parcelle parc
LEFT JOIN Enquete e
ON e.parcelle = parc
AND e.dateEnquete = (
SELECT MAX(e2.dateEnquete)
FROM Enquete e2
WHERE e2.parcelle = parc
)
LEFT JOIN e.personne pers
LEFT JOIN pg.departement d
LEFT JOIN pg.commune c
LEFT JOIN pg.arrondissement a
LEFT JOIN pg.quartier q
WHERE q.id = :quartierId
""")
List<ParcelleGeomPaylaodWeb> findAllByQuartierId(@Param("quartierId") Long quartierId);
@Query(
value = """
SELECT new io.gmss.fiscad.paylaods.request.crudweb.ParcelleGeomPaylaodWeb(
pg.id,
pg.nup,
pg.nupProvisoire,
pg.longitude,
pg.latitude,
pg.numeroRue,
pg.numeroEntreePorte,
pg.codeInstad,
pg.numeroEtatLieux,
pg.numeroTitreFoncier,
pg.dateTitreFoncier,
pg.batie,
pg.npi,
pg.ifu,
pers.nom,
pers.prenom,
pers.raisonSociale,
pg.nomEtPrenoms,
pg.telephone,
pg.adresse,
pg.nomRepresentant,
pg.prenomRepresentant,
pg.raisonSocialeRepresentant,
pg.nomEtPrenomsRepresentant,
pg.telephoneRepresentant,
pg.adresseRepresentant,
pg.q,
pg.zone,
pg.ilot,
pg.p,
pg.qLotissement,
pg.ilotLotissement,
pg.pLotissement,
pg.pointsPolygone,
pg.superficie,
pg.dateCollecte,
pg.sourceDonnees,
pg.observations,
pg.statutParcelle,
d.id,
d.code,
d.nom,
c.id,
c.code,
c.nom,
a.id,
a.code,
a.nom,
q.id,
q.code,
q.nom,
pg.geomSrid,
pg.geometry,
pg.geometryString,
parc.id
)
FROM ParcelleGeom pg
LEFT JOIN pg.parcelle parc
LEFT JOIN Enquete e
ON e.parcelle = parc
AND e.dateEnquete = (
SELECT MAX(e2.dateEnquete)
FROM Enquete e2
WHERE e2.parcelle = parc
)
LEFT JOIN e.personne pers
LEFT JOIN pg.departement d
LEFT JOIN pg.commune c
LEFT JOIN pg.arrondissement a
LEFT JOIN pg.quartier q
WHERE q.id = :quartierId
""",
countQuery = """
SELECT COUNT(pg)
FROM ParcelleGeom pg
WHERE pg.quartier.id = :quartierId
"""
)
Page<ParcelleGeomPaylaodWeb> findAllByQuartierIdPageable(
@Param("quartierId") Long quartierId,
Pageable pageable
);
}

View File

@@ -11,6 +11,7 @@ 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.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
@@ -20,6 +21,32 @@ import java.util.Optional;
public interface ParcelleRepository extends JpaRepository<Parcelle, Long>, JpaSpecificationExecutor<Parcelle>, ParcelleRepositoryCustom {
Optional<Parcelle> findFirstByExternalKeyAndTerminal_Id(Long externalKey, Long TerminalId);
Optional<Parcelle> findByMobileDataId(Long id);
@Modifying
@Query("""
UPDATE Parcelle p
SET p.batie = TRUE
WHERE EXISTS (
SELECT 1
FROM Batiment b
WHERE b.parcelle.id = p.id
)
""")
Integer updateParcelleBatieTrue();
@Modifying
@Query("""
UPDATE Parcelle p
SET p.batie = FALSE
WHERE NOT EXISTS (
SELECT 1
FROM Batiment b
WHERE b.parcelle.id = p.id
)
""")
Integer updateParcelleBatieFalse();
@Query(value = "Select " +
" p.id as idBackend, " +
" p.external_key as externalKey, " +

View File

@@ -174,4 +174,6 @@ public interface StructureRepository extends JpaRepository<Structure, Long> {
""")
Page<StructurePaylaodWeb> findAllStructureByCommuneToDtoPageable(@Param("communeId") Long communeId, Pageable pageable);
List<Structure> findDistinctByCommune_Departement_Id(Long departementId);
}

View File

@@ -33,6 +33,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
Long countByParcelle_Quartier_CodeLike(String codeQuartier);
@Query("""
SELECT new io.gmss.fiscad.paylaods.request.crudweb.BatimentPaylaodWeb(
b.id,
@@ -50,10 +51,25 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
per.raisonSociale,
eb.superficieAuSol,
eb.superficieLouee,
eb.id
eb.id,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelDeclare,
eb.montantLocatifAnnuelCalcule,
eb.valeurBatimentEstime,
eb.valeurBatimentReel,
eb.montantMensuelLocation,
us.id,
us.nom,
eb.montantLocatifAnnuelEstime,
eb.valeurBatimentCalcule,
eb.nbreUniteLogement
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -62,6 +78,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
WHERE eb2.batiment = b
)
LEFT JOIN eb.personne per
LEFT JOIN eb.usage us
WHERE b.id = :batimentId
""")
Optional<BatimentPaylaodWeb> findBatimentAvecOccupantCourantToDto(@Param("batimentId") Long batimentId);
@@ -83,10 +100,25 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
per.raisonSociale,
eb.superficieAuSol,
eb.superficieLouee,
eb.id
eb.id,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelDeclare,
eb.montantLocatifAnnuelCalcule,
eb.valeurBatimentEstime,
eb.valeurBatimentReel,
eb.montantMensuelLocation,
us.id,
us.nom,
eb.montantLocatifAnnuelEstime,
eb.valeurBatimentCalcule,
eb.nbreUniteLogement
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -95,6 +127,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
WHERE eb2.batiment = b
)
LEFT JOIN eb.personne per
LEFT JOIN eb.usage us
""")
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantToDto();
@@ -117,10 +150,25 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
per.raisonSociale,
eb.superficieAuSol,
eb.superficieLouee,
eb.id
eb.id,
cb.id,
cb.code,
cb.standing ,
eb.nombrePiscine,
eb.montantLocatifAnnuelDeclare,
eb.montantLocatifAnnuelCalcule,
eb.valeurBatimentEstime,
eb.valeurBatimentReel,
eb.montantMensuelLocation ,
us.id,
us.nom,
eb.montantLocatifAnnuelEstime,
eb.valeurBatimentCalcule,
eb.nbreUniteLogement
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -129,6 +177,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
WHERE eb2.batiment = b
)
LEFT JOIN eb.personne per
LEFT JOIN eb.usage us
""",
countQuery = """
SELECT COUNT(b)
@@ -156,10 +205,25 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
per.raisonSociale,
eb.superficieAuSol,
eb.superficieLouee,
eb.id
eb.id,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelDeclare,
eb.montantLocatifAnnuelCalcule,
eb.valeurBatimentEstime,
eb.valeurBatimentReel,
eb.montantMensuelLocation ,
us.id,
us.nom,
eb.montantLocatifAnnuelEstime,
eb.valeurBatimentCalcule,
eb.nbreUniteLogement
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -168,6 +232,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
WHERE eb2.batiment = b
)
LEFT JOIN eb.personne per
LEFT JOIN eb.usage us
WHERE p.id = :parcelleId
""")
List<BatimentPaylaodWeb> findAllBatimentsAvecOccupantCourantByParcelleToDto(
@@ -194,10 +259,25 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
per.raisonSociale,
eb.superficieAuSol,
eb.superficieLouee,
eb.id
eb.id,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelDeclare,
eb.montantLocatifAnnuelCalcule,
eb.valeurBatimentEstime,
eb.valeurBatimentReel,
eb.montantMensuelLocation,
us.id,
us.nom ,
eb.montantLocatifAnnuelEstime,
eb.valeurBatimentCalcule,
eb.nbreUniteLogement
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -206,6 +286,7 @@ public interface BatimentRepository extends JpaRepository<Batiment, Long> {
WHERE eb2.batiment = b
)
LEFT JOIN eb.personne per
LEFT JOIN eb.usage us
WHERE p.id = :parcelleId
""",
countQuery = """

View File

@@ -55,12 +55,14 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cb.valeur,
cb.observation
cb.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueBatiment cb
JOIN cb.caracteristique ca
JOIN cb.enqueteBatiment eb
JOIN eb.exercice ex
LEFT JOIN cb.caracteristique ca
LEFT JOIN cb.enqueteBatiment eb
LEFT JOIN eb.exercice ex
WHERE cb.id = :caracteristiqueBatimentId
""")
Optional<CaracteristiqueBatimentPayloadWeb> findCaracteristiqueBatimentToDto(@Param("caracteristiqueBatimentId") Long caracteristiqueBatimentId);
@@ -95,7 +97,9 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cb.valeur,
cb.observation
cb.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueBatiment cb
JOIN cb.caracteristique ca
@@ -114,13 +118,14 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cb.valeur,
cb.observation
cb.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueBatiment cb
JOIN cb.caracteristique ca
JOIN cb.enqueteBatiment eb
JOIN eb.exercice ex
WHERE eb.id = :enqueteBatimentId
""",
countQuery = """
SELECT COUNT(distinct cb)
@@ -143,7 +148,9 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cb.valeur,
cb.observation
cb.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueBatiment cb
JOIN cb.caracteristique ca
@@ -163,7 +170,9 @@ public interface CaracteristiqueBatimentRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cb.valeur,
cb.observation
cb.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueBatiment cb
JOIN cb.caracteristique ca

View File

@@ -49,7 +49,9 @@ public interface CaracteristiqueParcelleRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cp.valeur,
cp.observation
cp.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueParcelle cp
JOIN cp.caracteristique ca
@@ -69,7 +71,9 @@ public interface CaracteristiqueParcelleRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cp.valeur,
cp.observation
cp.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueParcelle cp
JOIN cp.caracteristique ca
@@ -89,7 +93,9 @@ public interface CaracteristiqueParcelleRepository extends JpaRepository<Caracte
ca.code,
ca.libelle,
cp.valeur,
cp.observation
cp.observation,
ca.typeCaracteristique.id,
ca.typeCaracteristique.libelle
)
FROM CaracteristiqueParcelle cp
JOIN cp.caracteristique ca

Some files were not shown because too many files have changed in this diff Show More