gestion revu de code en utilisant uniquement les DTO #99

Merged
judaur2005 merged 1 commits from features/crud_entites into develop 2026-02-13 17:54:51 +00:00
17 changed files with 44 additions and 16 deletions
Showing only changes of commit 8031289509 - Show all commits

View File

@@ -7,6 +7,7 @@ import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.SecteurPaylaodWeb;
import io.gmss.fiscad.paylaods.request.synchronisation.SecteurPayload;
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 org.slf4j.Logger;
@@ -24,7 +25,7 @@ import org.springframework.web.client.HttpClientErrorException;
@RestController
@RequestMapping(value = "api/secteur", produces = MediaType.APPLICATION_JSON_VALUE)
//@SecurityRequirement(name = "bearer")
@SecurityRequirement(name = "bearer")
@Tag(name = "Secteur")
//@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
public class SecteurController {

View File

@@ -5,6 +5,7 @@ import io.gmss.fiscad.interfaces.decoupage.SectionService;
import io.gmss.fiscad.paylaods.ApiResponse;
import io.gmss.fiscad.paylaods.request.crudweb.SectionPaylaodWeb;
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 org.slf4j.Logger;
@@ -21,7 +22,7 @@ import org.springframework.web.client.HttpClientErrorException;
@RestController
@RequestMapping(value = "api/section", produces = MediaType.APPLICATION_JSON_VALUE)
//@SecurityRequirement(name = "bearer")
@SecurityRequirement(name = "bearer")
@Tag(name = "Section")
//@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_SUPERVISEUR')")
public class SectionController {

View File

@@ -28,7 +28,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Bloc")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class BlocController {
private final BlocService blocService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Mode d'acquisition")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class ModeAcquisitionController {
private final ModeAcquisitionService modeAcquisitionService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Nature domaine")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class NatureDomaineController {
private final NatureDomaineService natureDomaineService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Position représentation")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class PositionRepresentationController {
private final PositionRepresentationService positionRepresentationService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Profession")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class ProfessionController {
private final ProfessionService professionService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Situation géographique")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class SituationGeographiqueController {
private final SituationGeographiqueService situationGeographiqueService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Situation matrimoniale")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class SituationMatrimonialeController {
private final SituationMatrimonialeService situationMatrimonialeService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Source de droit")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class SourceDroitController {
private final SourceDroitService sourceDroitService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Type de contestation")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TypeContestationController {
private final TypeContestationService typeContestationService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Type de domaine")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TypeDomaineController {
private final TypeDomaineService typeDomaineService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Type de personne")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TypePersonneController {
private final TypePersonneService typePersonneService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Type de pièce")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TypePieceController {
private final TypePieceService typePieceService;

View File

@@ -26,7 +26,7 @@ import org.springframework.web.client.HttpClientErrorException;
@SecurityRequirement(name = "bearer")
@Tag(name = "Type de représentation")
@CrossOrigin(origins = "*")
@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
//@PreAuthorize("hasRole('ADMIN') or hasRole('SUPERVISEUR') or hasRole('ENQUETEUR')")
public class TypeRepresentationController {
private final TypeRepresentationService typeRepresentationService;

View File

@@ -12,7 +12,6 @@ import java.util.Date;
@AllArgsConstructor
@NoArgsConstructor
public class Critere {
private String search;
private StatutEnquete status;
private Date startDate;

View File

@@ -0,0 +1,27 @@
package io.gmss.fiscad.paylaods;
import io.gmss.fiscad.enums.StatutEnquete;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FiltreParcelle {
private String nup;
private String nupProvisoir;
@Enumerated(EnumType.STRING)
private StatutEnquete status;
private String q;
private String i;
private String p;
private String nc;
private Long structureId;
private String numeroTitreFoncier;
}