2 Commits

Author SHA1 Message Date
650470efff Merge pull request 'gestion revu de code en utilisant uniquement les DTO' (#123) from features/crud_entites into develop
Reviewed-on: #123
2026-02-20 18:54:07 +00:00
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
6 changed files with 16 additions and 15 deletions

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

@@ -68,6 +68,7 @@ public class Parcelle extends BaseEntity implements Serializable {
@ManyToOne
private Rue rue ;
private String numeroRue ;
private Boolean batie;
// private String ncProprietaire ;
// @JsonIgnore
// @OneToMany(mappedBy = "parcelle")

View File

@@ -20,11 +20,11 @@ public class BatimentPaylaodWeb {
private String personneNom;
private String personnePrenom;
private String personneRaisonSociale;
private Float superficieSol;
private Float superficieAuSol;
private Float superficieLouee;
private 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 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) {
this.id = id;
this.nub = nub;
this.code = code;
@@ -38,7 +38,7 @@ public class BatimentPaylaodWeb {
this.personneNom = personneNom;
this.personnePrenom = personnePrenom;
this.personneRaisonSociale = personneRaisonSociale;
this.superficieSol = superficieSol ;
this.superficieAuSol = superficieAuSol ;
this.superficieLouee = superficieLouee ;
this.enqueteBatiementCourantId = enqueteBatiementCourantId ;
}

View File

@@ -12,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;
@@ -23,13 +23,13 @@ public class UniteLogementPaylaodWeb {
private String personneRaisonSociale;
private Long enqueteUniteLogementCourantId;
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) {
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;

View File

@@ -269,7 +269,7 @@ public class EntityFromPayLoadService {
batiment.setId(batimentPaylaodWeb.getId());
batiment.setCode(batimentPaylaodWeb.getCode());
batiment.setNub(batimentPaylaodWeb.getNub());
batiment.setSuperficieAuSol(batimentPaylaodWeb.getSuperficieSol());
batiment.setSuperficieAuSol(batimentPaylaodWeb.getSuperficieAuSol());
batiment.setSuperficieLouee(batimentPaylaodWeb.getSuperficieLouee());
batiment.setDateConstruction(batimentPaylaodWeb.getDateConstruction());
@@ -372,7 +372,7 @@ public class EntityFromPayLoadService {
uniteLogement.setId(uniteLogementPaylaodWeb.getId());
uniteLogement.setCode(uniteLogementPaylaodWeb.getCode());
uniteLogement.setNul(uniteLogementPaylaodWeb.getNul());
uniteLogement.setSuperficieAuSol(uniteLogementPaylaodWeb.getSuperficieSol());
uniteLogement.setSuperficieAuSol(uniteLogementPaylaodWeb.getSuperficieAuSol());
uniteLogement.setSuperficieLouee(uniteLogementPaylaodWeb.getSuperficieLouee());
uniteLogement.setDateConstruction(uniteLogementPaylaodWeb.getDateConstruction());
uniteLogement.setNumeroEtage(uniteLogementPaylaodWeb.getNumeroEtage());