Merge pull request 'features/crud_entites' (#129) from features/crud_entites into develop

Reviewed-on: #129
This commit was merged in pull request #129.
This commit is contained in:
2026-02-22 13:53:35 +00:00
17 changed files with 392 additions and 51 deletions

View File

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

View File

@@ -7,11 +7,13 @@ 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 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,11 +38,23 @@ 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 valeurBatimentEstime;
private Long valeurBatimentReel;
private Long montantMensuelLocation;
@JsonIgnore
@ManyToOne
private Parcelle parcelle;
@ManyToOne
private CategorieBatiment categorieBatiment ;
@JsonIgnore
@ManyToOne
private Tpe terminal;

View File

@@ -12,6 +12,7 @@ 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.user.User;
import io.gmss.fiscad.enums.StatutEnquete;
@@ -59,8 +60,10 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
private Integer nbreHabitant;
private Long montantMensuelLocation;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long valeurBatimentEstime;
private Long valeurBatimentReel;
private Integer nombrePiscine;
private Integer nbreMoisLocation;
private String autreCaracteristiquePhysique;
private String observation;
@@ -126,4 +129,6 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
@Enumerated(EnumType.STRING)
@JsonIgnore
private StatutEnquete statutEnquete;
@ManyToOne
private CategorieBatiment categorieBatiment ;
}

View File

@@ -11,6 +11,7 @@ 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.user.User;
import io.gmss.fiscad.enums.StatutEnquete;
@@ -47,11 +48,13 @@ 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 valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Integer nombrePiscine;
private Float superficieLouee;
private Float superficieAuSol;
private Boolean sbee;
@@ -114,5 +117,6 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
@JsonIgnore
@Enumerated(EnumType.STRING)
private StatutEnquete statutEnquete;
@ManyToOne
private CategorieBatiment categorieBatiment ;
}

View File

@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.gmss.fiscad.deserializer.LocalDateDeserializer;
import io.gmss.fiscad.entities.BaseEntity;
import io.gmss.fiscad.entities.infocad.metier.Tpe;
import io.gmss.fiscad.entities.rfu.parametre.CategorieBatiment;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -43,9 +44,17 @@ public class UniteLogement extends BaseEntity implements Serializable {
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 Integer nombrePiscine;
@JsonIgnore
@ManyToOne
private Tpe terminal;
private Long enqueteId;
private Long mobileDataId;
@ManyToOne
private CategorieBatiment categorieBatiment ;
}

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

@@ -23,8 +23,40 @@ public class BatimentPaylaodWeb {
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 superficieAuSol, Float superficieLouee,Long enqueteBatiementCourantId) {
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Integer nombrePiscine;
private Long montantLocatifAnnuelDeclare;
private Long montantLocatifAnnuelCalcule;
private Long valeurBatimentEstime;
private Long valeurBatimentReel;
private Long montantMensuelLocation;
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) {
this.id = id;
this.nub = nub;
this.code = code;
@@ -41,5 +73,14 @@ public class BatimentPaylaodWeb {
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 ;
}
}

View File

@@ -60,6 +60,11 @@ public class EnqueteBatimentPayloadWeb {
private String representantPrenom;
private String representantTel;
private String representantNpi;
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Integer nombrePiscine;
private Long montantLocatifAnnuelCalcule;
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,
@@ -68,7 +73,13 @@ public class EnqueteBatimentPayloadWeb {
String representantNom,
String representantPrenom,
String representantTel,
String representantNpi) {
String representantNpi,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Integer nombrePiscine,
Long montantLocatifAnnuelCalcule
) {
this.id = id;
this.observation = observation;
this.autreMenuisierie = autreMenuisierie;
@@ -109,5 +120,11 @@ public class EnqueteBatimentPayloadWeb {
this.representantPrenom = representantPrenom;
this.representantTel = representantTel;
this.representantNpi = representantNpi;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentCode = categorieBatimentCode;
this.categorieBatimentStanding = categorieBatimentStanding;
this.nombrePiscine = nombrePiscine;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
}
}

View File

@@ -18,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;
@@ -49,13 +49,22 @@ public class EnqueteUniteLogementPayloadWeb {
private String representantPrenom;
private String representantTel;
private String representantNpi;
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,
private Long categorieBatimentId;
private String categorieBatimentCode;
private String categorieBatimentStanding;
private Long montantLocatifAnnuelCalcule;
private Integer nombrePiscine;
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
String representantNpi,
Long categorieBatimentId,
String categorieBatimentCode,
String categorieBatimentStanding,
Integer nombrePiscine,
Long montantLocatifAnnuelCalcule
) {
this.id = id;
this.observation = observation;
@@ -64,7 +73,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;
@@ -94,5 +103,10 @@ public class EnqueteUniteLogementPayloadWeb {
this.representantPrenom = representantPrenom;
this.representantTel = representantTel;
this.representantNpi = representantNpi;
this.categorieBatimentId = categorieBatimentId;
this.categorieBatimentCode = categorieBatimentCode;
this.categorieBatimentStanding = categorieBatimentStanding;
this.nombrePiscine = nombrePiscine;
this.montantLocatifAnnuelCalcule = montantLocatifAnnuelCalcule;
}
}

View File

@@ -22,8 +22,26 @@ 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 valeurUniteLogementEstime;
private Long valeurUniteLogementReel;
private Integer nombrePiscine;
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) {
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) {
this.id = id;
this.nul = nul;
this.numeroEtage = numeroEtage;
@@ -39,5 +57,14 @@ 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;
}
}

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

@@ -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,20 @@ 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
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -83,10 +94,20 @@ 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
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -117,10 +138,20 @@ 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
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -156,10 +187,20 @@ 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
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (
@@ -194,10 +235,20 @@ 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
)
FROM Batiment b
JOIN b.parcelle p
LEFT JOIN b.categorieBatiment cb
LEFT JOIN EnqueteBatiment eb
ON eb.batiment = b
AND eb.dateEnquete = (

View File

@@ -100,13 +100,19 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
eb.representantNom,
eb.representantPrenom,
eb.representantTel,
eb.representantNpi
eb.representantNpi,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelCalcule
)
FROM EnqueteBatiment eb
LEFT JOIN eb.batiment b
LEFT JOIN eb.personne p
LEFT JOIN eb.user u
LEFT JOIN eb.exercice ex
LEFT JOIN eb.categorieBatiment cb
Where eb.id = :enqueteBatimentId
""")
Optional<EnqueteBatimentPayloadWeb> findEnqueteBatimentByIdToDto(@Param("enqueteBatimentId") Long enqueteBatimentId);
@@ -155,13 +161,19 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
eb.representantNom,
eb.representantPrenom,
eb.representantTel,
eb.representantNpi
eb.representantNpi,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelCalcule
)
FROM EnqueteBatiment eb
LEFT JOIN eb.batiment b
LEFT JOIN eb.personne p
LEFT JOIN eb.user u
LEFT JOIN eb.exercice ex
LEFT JOIN eb.categorieBatiment cb
""")
List<EnqueteBatimentPayloadWeb> findAllEnqueteBatimentToDto();
@@ -210,13 +222,19 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
eb.representantNom,
eb.representantPrenom,
eb.representantTel,
eb.representantNpi
eb.representantNpi,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelCalcule
)
FROM EnqueteBatiment eb
LEFT JOIN eb.batiment b
LEFT JOIN eb.personne p
LEFT JOIN eb.user u
LEFT JOIN eb.exercice ex
LEFT JOIN eb.categorieBatiment cb
""",
countQuery = """
SELECT COUNT(eb)
@@ -271,13 +289,19 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
eb.representantNom,
eb.representantPrenom,
eb.representantTel,
eb.representantNpi
eb.representantNpi,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelCalcule
)
FROM EnqueteBatiment eb
LEFT JOIN eb.batiment b
LEFT JOIN eb.personne p
LEFT JOIN eb.user u
LEFT JOIN eb.exercice ex
LEFT JOIN eb.categorieBatiment cb
WHERE b.id = :batimentId
""")
List<EnqueteBatimentPayloadWeb> findAllByBatimentToDto(
@@ -329,13 +353,19 @@ public interface EnqueteBatimentRepository extends JpaRepository<EnqueteBatiment
eb.representantNom,
eb.representantPrenom,
eb.representantTel,
eb.representantNpi
eb.representantNpi,
cb.id,
cb.code,
cb.standing,
eb.nombrePiscine,
eb.montantLocatifAnnuelCalcule
)
FROM EnqueteBatiment eb
LEFT JOIN eb.batiment b
LEFT JOIN eb.personne p
LEFT JOIN eb.user u
LEFT JOIN eb.exercice ex
LEFT JOIN eb.categorieBatiment cb
WHERE b.id = :batimentId
""",
countQuery = """

View File

@@ -60,7 +60,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -93,14 +93,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
WHERE eul.id = :enqueteUniteLogementId
""")
Optional<EnqueteUniteLogementPayloadWeb> findEnqueteUniteLogementToDto(@Param("enqueteUniteLogementId") Long enqueteUniteLogementId);
@@ -114,7 +119,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -147,13 +152,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
""")
List<EnqueteUniteLogementPayloadWeb> findAllEnqueteUniteLogementToDto();
@@ -168,7 +179,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -201,13 +212,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
""",
countQuery = """
SELECT COUNT(eul)
@@ -228,7 +245,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -261,13 +278,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
WHERE ul.id = :uniteLogementId
""")
List<EnqueteUniteLogementPayloadWeb> findAllByUniteLogementToDto(
@@ -284,7 +307,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -317,13 +340,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
WHERE ul.id = :uniteLogementId
""",
countQuery = """
@@ -346,7 +375,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -379,13 +408,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
WHERE ex.id = :exerciceId
""")
List<EnqueteUniteLogementPayloadWeb> findAllByExerciceToDto(
@@ -402,7 +437,7 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.nbreMenage,
eul.enLocation,
eul.nbreMoisLocation,
eul.montantMensuelLoyer,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
@@ -435,13 +470,19 @@ public interface EnqueteUniteLogementRepository extends JpaRepository<EnqueteUni
eul.representantNom,
eul.representantPrenom,
eul.representantTel,
eul.representantNpi
eul.representantNpi,
cb.id,
cb.code,
cb.standing,
eul.nombrePiscine,
eul.montantLocatifAnnuelCalcule
)
FROM EnqueteUniteLogement eul
LEFT JOIN eul.uniteLogement ul
LEFT JOIN eul.personne p
LEFT JOIN eul.user u
LEFT JOIN eul.exercice ex
LEFT JOIN eul.categorieBatiment cb
WHERE ex.id = :exerciceId
""",
countQuery = """

View File

@@ -53,10 +53,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing ,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (
@@ -87,10 +97,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (
@@ -122,10 +142,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (
@@ -162,10 +192,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (
@@ -199,10 +239,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (
@@ -242,10 +292,20 @@ public interface UniteLogementRepository extends JpaRepository<UniteLogement, Lo
per.nom,
per.prenom,
per.raisonSociale,
eul.id
eul.id,
cb.id,
cb.code,
cb.standing,
eul.montantMensuelLocation,
eul.montantLocatifAnnuelDeclare,
eul.montantLocatifAnnuelCalcule,
eul.valeurUniteLogementEstime,
eul.valeurUniteLogementReel,
eul.nombrePiscine
)
FROM UniteLogement ul
JOIN ul.batiment b
LEFT JOIN ul.categorieBatiment cb
LEFT JOIN EnqueteUniteLogement eul
ON eul.uniteLogement = ul
AND eul.dateEnquete = (

View File

@@ -8,6 +8,7 @@ import io.gmss.fiscad.entities.infocad.metier.Upload;
import io.gmss.fiscad.entities.infocad.parametre.*;
import io.gmss.fiscad.entities.rfu.metier.*;
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.ZoneRfu;
import io.gmss.fiscad.entities.user.AvoirFonction;
@@ -260,6 +261,11 @@ public class EntityFromPayLoadService {
if(batimentPaylaodWeb.getId()!=null)
batiment = batimentRepository.findById(batimentPaylaodWeb.getId()).orElse(new Batiment());
if (batimentPaylaodWeb.getCategorieBatimentId() != null) {
CategorieBatiment categorieBatiment = new CategorieBatiment();
categorieBatiment.setId(batimentPaylaodWeb.getCategorieBatimentId());
batiment.setCategorieBatiment(categorieBatiment);
}
if(batimentPaylaodWeb.getParcelleId()!=null)
optionalParcelle=parcelleRepository.findById(batimentPaylaodWeb.getParcelleId());
@@ -365,9 +371,15 @@ public class EntityFromPayLoadService {
if(uniteLogementPaylaodWeb.getId()!=null)
uniteLogement = uniteLogementRepository.findById(uniteLogementPaylaodWeb.getId()).orElse(new UniteLogement());
if (uniteLogementPaylaodWeb.getCategorieBatimentId() != null) {
CategorieBatiment categorieBatiment = new CategorieBatiment();
categorieBatiment.setId(uniteLogementPaylaodWeb.getCategorieBatimentId());
uniteLogement.setCategorieBatiment(categorieBatiment);
}
if(uniteLogementPaylaodWeb.getBatimentId()!=null)
optionalBatiment=batimentRepository.findById(uniteLogementPaylaodWeb.getBatimentId());
uniteLogement.setBatiment(optionalBatiment.orElse(null));
uniteLogement.setId(uniteLogementPaylaodWeb.getId());
uniteLogement.setCode(uniteLogementPaylaodWeb.getCode());
@@ -614,6 +626,12 @@ public class EntityFromPayLoadService {
eul.setExercice(exercice);
}
if (enqueteUniteLogementPayloadWeb.getCategorieBatimentId() != null) {
CategorieBatiment categorieBatiment = new CategorieBatiment();
categorieBatiment.setId(enqueteUniteLogementPayloadWeb.getCategorieBatimentId());
eul.setCategorieBatiment(categorieBatiment);
}
eul.setId(enqueteUniteLogementPayloadWeb.getId());
eul.setObservation(enqueteUniteLogementPayloadWeb.getObservation());
@@ -622,7 +640,7 @@ public class EntityFromPayLoadService {
eul.setNbreMenage(enqueteUniteLogementPayloadWeb.getNbreMenage());
eul.setEnLocation(enqueteUniteLogementPayloadWeb.getEnLocation());
eul.setNbreMoisLocation(enqueteUniteLogementPayloadWeb.getNbreMoisLocation());
eul.setMontantMensuelLoyer(enqueteUniteLogementPayloadWeb.getMontantMensuelLoyer());
eul.setMontantMensuelLocation(enqueteUniteLogementPayloadWeb.getMontantMensuelLocation());
eul.setMontantLocatifAnnuelDeclare(enqueteUniteLogementPayloadWeb.getMontantLocatifAnnuelDeclare());
eul.setValeurUniteLogementEstime(enqueteUniteLogementPayloadWeb.getValeurUniteLogementEstime());
eul.setValeurUniteLogementReel(enqueteUniteLogementPayloadWeb.getValeurUniteLogementReel());
@@ -639,6 +657,7 @@ public class EntityFromPayLoadService {
eul.setRepresentantPrenom(enqueteUniteLogementPayloadWeb.getRepresentantPrenom());
eul.setRepresentantTel(enqueteUniteLogementPayloadWeb.getRepresentantTel());
eul.setRepresentantNpi(enqueteUniteLogementPayloadWeb.getRepresentantNpi());
eul.setNombrePiscine(enqueteUniteLogementPayloadWeb.getNombrePiscine());
eul.setStatutEnquete(StatutEnquete.EN_COURS);
return eul;
@@ -676,6 +695,12 @@ public class EntityFromPayLoadService {
enqueteBatiment.setExercice(exercice);
}
if (enqueteBatimentPayloadWeb.getCategorieBatimentId() != null) {
CategorieBatiment categorieBatiment = new CategorieBatiment();
categorieBatiment.setId(enqueteBatimentPayloadWeb.getCategorieBatimentId());
enqueteBatiment.setCategorieBatiment(categorieBatiment);
}
// ======================
// Champs simples
// ======================
@@ -715,6 +740,7 @@ public class EntityFromPayLoadService {
enqueteBatiment.setRepresentantPrenom(enqueteBatimentPayloadWeb.getRepresentantPrenom());
enqueteBatiment.setRepresentantTel(enqueteBatimentPayloadWeb.getRepresentantTel());
enqueteBatiment.setRepresentantNpi(enqueteBatimentPayloadWeb.getRepresentantNpi());
enqueteBatiment.setNombrePiscine(enqueteBatimentPayloadWeb.getNombrePiscine());
enqueteBatiment.setStatutEnquete(StatutEnquete.EN_COURS);
return enqueteBatiment;
}

View File

@@ -125,7 +125,7 @@ public class EnqueteUniteLogementAsyncWorker {
enqueteUniteLogement.setNbreHabitant(enqueteUniteLogementPayload.getNbreHabitant());
enqueteUniteLogement.setNbreMenage(enqueteUniteLogementPayload.getNbreMenage());
enqueteUniteLogement.setEnLocation(enqueteUniteLogementPayload.isEnLocation());
enqueteUniteLogement.setMontantMensuelLoyer(enqueteUniteLogementPayload.getMontantMensuelLoyer());
enqueteUniteLogement.setMontantMensuelLocation(enqueteUniteLogementPayload.getMontantMensuelLocation());
enqueteUniteLogement.setNbreMoisLocation(enqueteUniteLogementPayload.getNbreMoisEnLocation());
enqueteUniteLogement.setMontantLocatifAnnuelDeclare(enqueteUniteLogementPayload.getMontantLocatifAnnuelDeclare());
enqueteUniteLogement.setSuperficieLouee(enqueteUniteLogementPayload.getSurfaceLouee());