revu du controleur de la fiche enquete
This commit is contained in:
@@ -20,7 +20,6 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Where(clause = " deleted = false")
|
@Where(clause = " deleted = false")
|
||||||
public class Arrondissement extends BaseEntity implements Serializable {
|
public class Arrondissement extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
@@ -30,10 +29,10 @@ public class Arrondissement extends BaseEntity implements Serializable {
|
|||||||
private String latitude;
|
private String latitude;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Commune commune;
|
private Commune commune;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "arrondissement")
|
// @OneToMany(mappedBy = "arrondissement")
|
||||||
private List<Quartier> quartiers;
|
// private List<Quartier> quartiers;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "arrondissement")
|
// @OneToMany(mappedBy = "arrondissement")
|
||||||
private List<Bloc> blocs;
|
// private List<Bloc> blocs;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ public class Commune extends BaseEntity implements Serializable {
|
|||||||
private String latitude;
|
private String latitude;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Departement departement;
|
private Departement departement;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "commune")
|
// @OneToMany(mappedBy = "commune")
|
||||||
private List<Arrondissement> arrondissements;
|
// private List<Arrondissement> arrondissements;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "commune")
|
// @OneToMany(mappedBy = "commune")
|
||||||
private List<Personne> personnes;
|
// private List<Personne> personnes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class Departement extends BaseEntity implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String code;
|
private String code;
|
||||||
private String nom;
|
private String nom;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "departement")
|
// @OneToMany(mappedBy = "departement")
|
||||||
private List<Commune> communes;
|
// private List<Commune> communes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class Nationalite extends BaseEntity implements Serializable {
|
|||||||
private String code;
|
private String code;
|
||||||
private String indicatif;
|
private String indicatif;
|
||||||
private String nationality;
|
private String nationality;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "nationalite")
|
// @OneToMany(mappedBy = "nationalite")
|
||||||
private List<Personne> personnes;
|
// private List<Personne> personnes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,17 +19,16 @@ import java.io.Serializable;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Where(clause = " deleted = false")
|
@Where(clause = " deleted = false")
|
||||||
public class Quartier extends BaseEntity implements Serializable {
|
public class Quartier extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
private String code;
|
private String code;
|
||||||
private String nom;
|
private String nom;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Arrondissement arrondissement;
|
private Arrondissement arrondissement;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToOne(mappedBy = "quartier")
|
// @OneToOne(mappedBy = "quartier")
|
||||||
private Bloc bloc;
|
// private Bloc bloc;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@Where(clause = " deleted = false")
|
@Where(clause = " deleted = false")
|
||||||
public class Secteur extends BaseEntity implements Serializable {
|
public class Secteur extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
@@ -30,7 +29,10 @@ public class Secteur extends BaseEntity implements Serializable {
|
|||||||
private User chefSecteur;
|
private User chefSecteur;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Structure structure;
|
private Structure structure;
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
// @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||||
@JoinColumn(name = "secteur_id")
|
// @JoinColumn(name = "secteur_id")
|
||||||
private List<SecteurDecoupage> secteurDecoupages;
|
// private List<SecteurDecoupage> secteurDecoupages;
|
||||||
|
|
||||||
|
///Creer un payload pour la creation de secteur découpage
|
||||||
|
/// ressource pour envoyer les découpage d'un secteur
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,17 +35,15 @@ public class SecteurDecoupage extends BaseEntity implements Serializable {
|
|||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateFin;
|
private LocalDate dateFin;
|
||||||
|
|
||||||
@JsonIgnore
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Secteur secteur;
|
private Secteur secteur;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Arrondissement arrondissement;
|
private Arrondissement arrondissement;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Quartier quartier;
|
private Quartier quartier;
|
||||||
|
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "secteurDecoupage")
|
// @OneToMany(mappedBy = "secteurDecoupage")
|
||||||
private List<Bloc> blocs;
|
// private List<Bloc> blocs;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,6 @@ import java.util.List;
|
|||||||
"WHERE id = ?")
|
"WHERE id = ?")
|
||||||
@Where(clause = " deleted = false")
|
@Where(clause = " deleted = false")
|
||||||
public class ActeurConcerne extends BaseEntity implements Serializable {
|
public class ActeurConcerne extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
@@ -52,8 +51,10 @@ public class ActeurConcerne extends BaseEntity implements Serializable {
|
|||||||
private Enquete enquete;
|
private Enquete enquete;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private RoleActeur roleActeur;
|
private RoleActeur roleActeur;
|
||||||
@OneToMany(mappedBy = "acteurConcerne")
|
|
||||||
private List<Piece> pieces;
|
// @OneToMany(mappedBy = "acteurConcerne")
|
||||||
|
// private List<Piece> pieces;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class Enquete extends BaseEntity implements Serializable {
|
|||||||
private Parcelle parcelle;
|
private Parcelle parcelle;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Bloc bloc; //représente un secteur d'enquetes
|
private Bloc bloc;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Campagne campagne;
|
private Campagne campagne;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ public class MembreGroupe extends BaseEntity implements Serializable {
|
|||||||
private TypeRepresentation typeRepresentation;
|
private TypeRepresentation typeRepresentation;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private PositionRepresentation positionRepresentation;
|
private PositionRepresentation positionRepresentation;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "membreGroupe")
|
// @OneToMany(mappedBy = "membreGroupe")
|
||||||
private Set<Upload> uploads;
|
// private Set<Upload> uploads;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -42,9 +42,9 @@ public class Parcelle extends BaseEntity implements Serializable {
|
|||||||
private String longitude;
|
private String longitude;
|
||||||
private String latitude;
|
private String latitude;
|
||||||
private String situationGeographique;
|
private String situationGeographique;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "parcelle")
|
// @OneToMany(mappedBy = "parcelle")
|
||||||
private List<Enquete> enquetes;
|
// private List<Enquete> enquetes;
|
||||||
// @ManyToOne
|
// @ManyToOne
|
||||||
// private SituationGeographique situationGeographique;
|
// private SituationGeographique situationGeographique;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@@ -69,9 +69,9 @@ public class Parcelle extends BaseEntity implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
private Long idDerniereEnquete;
|
private Long idDerniereEnquete;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "parcelle")
|
// @OneToMany(mappedBy = "parcelle")
|
||||||
private List<Batiment> batiments;
|
// private List<Batiment> batiments;
|
||||||
|
|
||||||
// @ColumnDefault("0")
|
// @ColumnDefault("0")
|
||||||
// private int geomSrid;
|
// private int geomSrid;
|
||||||
@@ -85,6 +85,4 @@ public class Parcelle extends BaseEntity implements Serializable {
|
|||||||
// @JsonDeserialize(contentUsing = GeometryDeserializer.class)
|
// @JsonDeserialize(contentUsing = GeometryDeserializer.class)
|
||||||
// @Column(name = "geom_32631",columnDefinition = "geometry(MultiPolygon,32631)")
|
// @Column(name = "geom_32631",columnDefinition = "geometry(MultiPolygon,32631)")
|
||||||
// private Point geometry32631;
|
// private Point geometry32631;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class Piece extends BaseEntity implements Serializable {
|
|||||||
private SourceDroit sourceDroit;
|
private SourceDroit sourceDroit;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private ModeAcquisition modeAcquisition;
|
private ModeAcquisition modeAcquisition;
|
||||||
|
|
||||||
@OneToMany(mappedBy = "piece")
|
@OneToMany(mappedBy = "piece")
|
||||||
private List<Upload> uploads;
|
private List<Upload> uploads;
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,11 @@ public class Upload extends BaseEntity implements Serializable {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Piece piece;
|
private Piece piece;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private MembreGroupe membreGroupe;
|
private MembreGroupe membreGroupe;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
@@ -48,6 +50,7 @@ public class Upload extends BaseEntity implements Serializable {
|
|||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private EnqueteBatiment enqueteBatiment;
|
private EnqueteBatiment enqueteBatiment;
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private EnqueteUniteLogement enqueteUniteLogement;
|
private EnqueteUniteLogement enqueteUniteLogement;
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ public class ModeAcquisition extends BaseEntity implements Serializable {
|
|||||||
private String libelle;
|
private String libelle;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@OneToMany(mappedBy = "modeAcquisition")
|
@OneToMany(mappedBy = "modeAcquisition")
|
||||||
//private List<SourceDroitExerce> sourceDroitExerces;
|
|
||||||
private List<Piece> pieces;
|
private List<Piece> pieces;
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(name = "modeAcquisition_typePersonne",
|
@JoinTable(name = "modeAcquisition_typePersonne",
|
||||||
|
|||||||
@@ -34,9 +34,10 @@ public class NatureDomaine extends BaseEntity implements Serializable {
|
|||||||
//@JsonIgnore
|
//@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private TypeDomaine typeDomaine;
|
private TypeDomaine typeDomaine;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "natureDomaine")
|
// @OneToMany(mappedBy = "natureDomaine")
|
||||||
private List<Parcelle> parcelles;
|
// private List<Parcelle> parcelles;
|
||||||
|
|
||||||
@ManyToMany
|
@ManyToMany
|
||||||
@JoinTable(name = "natureDomaine_typePersonne",
|
@JoinTable(name = "natureDomaine_typePersonne",
|
||||||
joinColumns = @JoinColumn(name = "nature_domaine_id"),
|
joinColumns = @JoinColumn(name = "nature_domaine_id"),
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ public class Personne extends BaseEntity implements Serializable {
|
|||||||
private String adresse;
|
private String adresse;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private Categorie categorie;
|
private Categorie categorie;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "personne")
|
// @OneToMany(mappedBy = "personne")
|
||||||
private List<ActeurConcerne> acteurConcernes;
|
// private List<ActeurConcerne> acteurConcernes;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private SituationMatrimoniale situationMatrimoniale;
|
private SituationMatrimoniale situationMatrimoniale;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@@ -60,9 +60,8 @@ public class Personne extends BaseEntity implements Serializable {
|
|||||||
private Profession profession;
|
private Profession profession;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Commune commune;
|
private Commune commune;
|
||||||
@OneToMany(mappedBy = "personne")
|
// @OneToMany(mappedBy = "personne")
|
||||||
private List<Piece> pieces;
|
// private List<Piece> pieces;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ public class PositionRepresentation extends BaseEntity implements Serializable {
|
|||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
private String libelle;
|
private String libelle;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "positionRepresentation")
|
// @OneToMany(mappedBy = "positionRepresentation")
|
||||||
private List<ActeurConcerne> acteurConcernes;
|
// private List<ActeurConcerne> acteurConcernes;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "positionRepresentation")
|
// @OneToMany(mappedBy = "positionRepresentation")
|
||||||
private List<MembreGroupe> membreGroupes;
|
// private List<MembreGroupe> membreGroupes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class Profession extends BaseEntity implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String code;
|
private String code;
|
||||||
private String libelle;
|
private String libelle;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "profession")
|
// @OneToMany(mappedBy = "profession")
|
||||||
private List<Personne> personnes;
|
// private List<Personne> personnes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class SituationMatrimoniale extends BaseEntity implements Serializable {
|
|||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
private String libelle;
|
private String libelle;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "situationMatrimoniale")
|
// @OneToMany(mappedBy = "situationMatrimoniale")
|
||||||
private List<Personne> personnes;
|
// private List<Personne> personnes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ public class Structure extends BaseEntity implements Serializable {
|
|||||||
inverseJoinColumns = @JoinColumn(name = "arrondissement_id")
|
inverseJoinColumns = @JoinColumn(name = "arrondissement_id")
|
||||||
)
|
)
|
||||||
private Set<Arrondissement> arrondissements;
|
private Set<Arrondissement> arrondissements;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "structure")
|
// @OneToMany(mappedBy = "structure")
|
||||||
private List<User> agents;
|
// private List<User> agents;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "structure")
|
// @OneToMany(mappedBy = "structure")
|
||||||
private List<Bloc> blocs;
|
// private List<Bloc> blocs;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,14 +26,13 @@ import java.util.List;
|
|||||||
"WHERE id = ?")
|
"WHERE id = ?")
|
||||||
@Where(clause = " deleted = false")
|
@Where(clause = " deleted = false")
|
||||||
public class TypeContestation extends BaseEntity implements Serializable {
|
public class TypeContestation extends BaseEntity implements Serializable {
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
private String libelle;
|
private String libelle;
|
||||||
@ColumnDefault("true")
|
@ColumnDefault("true")
|
||||||
private boolean droitPropriete;
|
private boolean droitPropriete;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "typeContestation")
|
// @OneToMany(mappedBy = "typeContestation")
|
||||||
private List<ActeurConcerne> acteurConcernes;
|
// private List<ActeurConcerne> acteurConcernes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class TypePersonne extends BaseEntity implements Serializable {
|
|||||||
private Categorie categorie;
|
private Categorie categorie;
|
||||||
@Column(nullable = false, columnDefinition = "BOOLEAN DEFAULT false")
|
@Column(nullable = false, columnDefinition = "BOOLEAN DEFAULT false")
|
||||||
private boolean groupeOuvert;
|
private boolean groupeOuvert;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "typePersonne")
|
// @OneToMany(mappedBy = "typePersonne")
|
||||||
private List<Personne> personnes;
|
// private List<Personne> personnes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ public class TypeRepresentation extends BaseEntity implements Serializable {
|
|||||||
private String libelle;
|
private String libelle;
|
||||||
@Column(columnDefinition = "boolean default false")
|
@Column(columnDefinition = "boolean default false")
|
||||||
private boolean estUnique;
|
private boolean estUnique;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "typeRepresentation")
|
// @OneToMany(mappedBy = "typeRepresentation")
|
||||||
private List<ActeurConcerne> acteurConcernes;
|
// private List<ActeurConcerne> acteurConcernes;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "typeRepresentation")
|
// @OneToMany(mappedBy = "typeRepresentation")
|
||||||
private List<MembreGroupe> membreGroupes;
|
// private List<MembreGroupe> membreGroupes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,15 +34,16 @@ public class Batiment extends BaseEntity implements Serializable {
|
|||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateConstruction;
|
private LocalDate dateConstruction;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "batiment")
|
// @OneToMany(mappedBy = "batiment")
|
||||||
private List<EnqueteBatiment> enqueteBatiments;
|
// private List<EnqueteBatiment> enqueteBatiments;
|
||||||
private Long idDerniereEnquete;
|
private Long idDerniereEnquete;
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Parcelle parcelle;
|
private Parcelle parcelle;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "batiment")
|
// @OneToMany(mappedBy = "batiment")
|
||||||
private List<UniteLogement> uniteLogements;
|
// private List<UniteLogement> uniteLogements;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class CaracteristiqueParcelle extends BaseEntity implements Serializable
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Enquete enquete;
|
private Enquete enquete;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
|
|||||||
@@ -63,11 +63,12 @@ public class EnqueteBatiment extends BaseEntity implements Serializable {
|
|||||||
private Personne personne;
|
private Personne personne;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Batiment batiment;
|
private Batiment batiment;
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Enquete enquete;
|
private Enquete enquete;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "enqueteBatiment")
|
// @OneToMany(mappedBy = "enqueteBatiment")
|
||||||
List<CaracteristiqueBatiment> caracteristiqueBatiments;
|
// List<CaracteristiqueBatiment> caracteristiqueBatiments;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -57,15 +57,16 @@ public class EnqueteUniteLogement extends BaseEntity implements Serializable {
|
|||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateFinExcemption;
|
private LocalDate dateFinExcemption;
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Enquete enquete;
|
private Enquete enquete;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private UniteLogement uniteLogement;
|
private UniteLogement uniteLogement;
|
||||||
@OneToOne
|
@OneToOne
|
||||||
private Personne personne;
|
private Personne personne;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "enqueteUniteLogement")
|
// @OneToMany(mappedBy = "enqueteUniteLogement")
|
||||||
private List<CaracteristiqueUniteLogement> caracteristiqueUniteLogements;
|
// private List<CaracteristiqueUniteLogement> caracteristiqueUniteLogements;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ public class Campagne extends BaseEntity implements Serializable {
|
|||||||
private LocalDate dateFin;
|
private LocalDate dateFin;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private TypeCampagne typeCampagne;
|
private TypeCampagne typeCampagne;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "campagne")
|
// @OneToMany(mappedBy = "campagne")
|
||||||
private List<Equipe> equipes;
|
// private List<Equipe> equipes;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "campagne")
|
// @OneToMany(mappedBy = "campagne")
|
||||||
private List<Enquete> enquetes;
|
// private List<Enquete> enquetes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,15 +30,16 @@ public class Caracteristique extends BaseEntity implements Serializable {
|
|||||||
private String code;
|
private String code;
|
||||||
private String libelle;
|
private String libelle;
|
||||||
private boolean actif;
|
private boolean actif;
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
private TypeImmeuble typeImmeuble;
|
private TypeImmeuble typeImmeuble;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private TypeCaracteristique typeCaracteristique;
|
private TypeCaracteristique typeCaracteristique;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "caracteristique")
|
// @OneToMany(mappedBy = "caracteristique")
|
||||||
private List<CaracteristiqueBatiment> caracteristiqueBatiments;
|
// private List<CaracteristiqueBatiment> caracteristiqueBatiments;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "caracteristique")
|
// @OneToMany(mappedBy = "caracteristique")
|
||||||
private List<CaracteristiqueUniteLogement> caracteristiqueUniteLogements;
|
// private List<CaracteristiqueUniteLogement> caracteristiqueUniteLogements;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Tpe terminal;
|
private Tpe terminal;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class Equipe extends BaseEntity implements Serializable {
|
|||||||
@JoinColumn(name = "equipe_id")
|
@JoinColumn(name = "equipe_id")
|
||||||
private List<Participer> participers;
|
private List<Participer> participers;
|
||||||
|
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "equipe")
|
// @OneToMany(mappedBy = "equipe")
|
||||||
private List<Enquete> enquetes;
|
// private List<Enquete> enquetes;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class Participer extends BaseEntity implements Serializable {
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Equipe equipe;
|
private Equipe equipe;
|
||||||
|
@JsonIgnore
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private User user;
|
private User user;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ public class TypeCaracteristique extends BaseEntity implements Serializable {
|
|||||||
private boolean actif;
|
private boolean actif;
|
||||||
private boolean bati;
|
private boolean bati;
|
||||||
private boolean nonBati;
|
private boolean nonBati;
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
private TypeImmeuble typeImmeuble;
|
private TypeImmeuble typeImmeuble;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "typeCaracteristique")
|
// @OneToMany(mappedBy = "typeCaracteristique")
|
||||||
private List<Caracteristique> caracteristiques;
|
// private List<Caracteristique> caracteristiques;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,15 +54,15 @@ public class User extends BaseEntity implements Serializable {
|
|||||||
private Set<Role> roles;
|
private Set<Role> roles;
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Structure structure;
|
private Structure structure;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "user")
|
// @OneToMany(mappedBy = "user")
|
||||||
private List<Enquete> enquetes;
|
// private List<Enquete> enquetes;
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@OneToMany(mappedBy = "user")
|
@OneToMany(mappedBy = "user")
|
||||||
private List<Participer> participers;
|
private List<Participer> participers;
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
@OneToMany(mappedBy = "chefSecteur")
|
// @OneToMany(mappedBy = "chefSecteur")
|
||||||
private List<Secteur> secteurs;
|
// private List<Secteur> secteurs;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private Long idCampagneCourant;
|
private Long idCampagneCourant;
|
||||||
@@ -84,17 +84,20 @@ public class User extends BaseEntity implements Serializable {
|
|||||||
|
|
||||||
|
|
||||||
public Long getIdCampagneCourant() {
|
public Long getIdCampagneCourant() {
|
||||||
|
if(participers!=null) {
|
||||||
for (Participer p : participers) {
|
for (Participer p : participers) {
|
||||||
if (p.getDateFin() == null) {
|
if (p.getDateFin() == null) {
|
||||||
if(p.getEquipe().getCampagne()!=null) {
|
if (p.getEquipe().getCampagne() != null) {
|
||||||
return p.getEquipe().getCampagne().getId();
|
return p.getEquipe().getCampagne().getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getIdSecteurCourant() {
|
public Long getIdSecteurCourant() {
|
||||||
|
if(participers!=null){
|
||||||
for (Participer p : participers) {
|
for (Participer p : participers) {
|
||||||
if (p.getDateFin() == null) {
|
if (p.getDateFin() == null) {
|
||||||
if(p.getEquipe().getSecteur()!=null) {
|
if(p.getEquipe().getSecteur()!=null) {
|
||||||
@@ -102,7 +105,8 @@ public class User extends BaseEntity implements Serializable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
}
|
||||||
|
return null ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ public class SecteurServiceImpl implements SecteurService {
|
|||||||
sd.setId(sdp.getId());
|
sd.setId(sdp.getId());
|
||||||
secteurDecoupageList.add(sd);
|
secteurDecoupageList.add(sd);
|
||||||
}
|
}
|
||||||
secteur.setSecteurDecoupages(secteurDecoupageList);
|
//secteur.setSecteurDecoupages(secteurDecoupageList);
|
||||||
|
//TODO
|
||||||
secteur.setId(secteurPayload.getId());
|
secteur.setId(secteurPayload.getId());
|
||||||
secteur.setCode(secteurPayload.getCode());
|
secteur.setCode(secteurPayload.getCode());
|
||||||
secteur.setNom(secteurPayload.getNom());
|
secteur.setNom(secteurPayload.getNom());
|
||||||
|
|||||||
@@ -385,39 +385,17 @@ public class EnqueteServiceImpl implements EnqueteService {
|
|||||||
if (optionalEnquete.isPresent()) {
|
if (optionalEnquete.isPresent()) {
|
||||||
ficheEnquetesResponse = modelMapper.map(optionalEnquete.get(), FicheEnquetesResponse.class);
|
ficheEnquetesResponse = modelMapper.map(optionalEnquete.get(), FicheEnquetesResponse.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<FicheActeurConcerneResponse> ficheActeurConcerneResponses = new ArrayList<>();
|
|
||||||
if (!acteurConcernes.isEmpty()) {
|
|
||||||
acteurConcernes.stream().forEach(acteurConcerne -> ficheActeurConcerneResponses.add(modelMapper.map(acteurConcerne, FicheActeurConcerneResponse.class)));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<CaracteristiqueParcelle> caracteristiqueParcelles = caracteristiqueParcelleRepository.findAllByEnquete_Id(enqueteId);
|
List<CaracteristiqueParcelle> caracteristiqueParcelles = caracteristiqueParcelleRepository.findAllByEnquete_Id(enqueteId);
|
||||||
|
|
||||||
List<FicheCaracteristiqueParcelleResponse> caracteristiqueParcelleResponses = new ArrayList<>();
|
|
||||||
if (!caracteristiqueParcelles.isEmpty()) {
|
|
||||||
caracteristiqueParcelles.stream().forEach(caracteristiqueParcelle -> caracteristiqueParcelleResponses.add(modelMapper.map(caracteristiqueParcelle, FicheCaracteristiqueParcelleResponse.class)));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<FicheEnqueteBatimentResponse> enqueteBatimentResponses = new ArrayList<>();
|
|
||||||
|
|
||||||
List<EnqueteBatiment> enqueteBatiments = enqueteBatimentRepository.findAllByEnquete_Id(enqueteId);
|
List<EnqueteBatiment> enqueteBatiments = enqueteBatimentRepository.findAllByEnquete_Id(enqueteId);
|
||||||
if (!enqueteBatiments.isEmpty()) {
|
|
||||||
enqueteBatiments.stream().forEach(enqueteBatiment -> enqueteBatimentResponses.add(modelMapper.map(enqueteBatiment, FicheEnqueteBatimentResponse.class)));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<FicheEnqueteUniteLogementResponse> enqueteUniteLogementResponses = new ArrayList<>();
|
|
||||||
|
|
||||||
List<EnqueteUniteLogement> enqueteUniteLogements = enqueteUniteLogementRepository.findAllByEnquete_Id(enqueteId);
|
List<EnqueteUniteLogement> enqueteUniteLogements = enqueteUniteLogementRepository.findAllByEnquete_Id(enqueteId);
|
||||||
if (!enqueteUniteLogements.isEmpty()) {
|
|
||||||
enqueteUniteLogements.stream().forEach(enqueteUniteLogement -> enqueteUniteLogementResponses.add(modelMapper.map(enqueteUniteLogement, FicheEnqueteUniteLogementResponse.class)));
|
|
||||||
}
|
|
||||||
|
|
||||||
ficheEnquetesResponse.setCaracteristiquesParcelles(caracteristiqueParcelleResponses);
|
|
||||||
ficheEnquetesResponse.setEnquetesBatiments(enqueteBatimentResponses);
|
|
||||||
ficheEnquetesResponse.setEnquetesUniteLogements(enqueteUniteLogementResponses);
|
|
||||||
|
|
||||||
|
ficheEnquetesResponse.setCaracteristiquesParcelles(caracteristiqueParcelles);
|
||||||
|
ficheEnquetesResponse.setEnquetesBatiments(enqueteBatiments);
|
||||||
|
ficheEnquetesResponse.setEnquetesUniteLogements(enqueteUniteLogements);
|
||||||
ficheEnqueteResponse.setEnquete(ficheEnquetesResponse);
|
ficheEnqueteResponse.setEnquete(ficheEnquetesResponse);
|
||||||
ficheEnqueteResponse.setActeurConcernes(ficheActeurConcerneResponses);
|
ficheEnqueteResponse.setActeurConcernes(acteurConcernes);
|
||||||
|
|
||||||
return ficheEnqueteResponse;
|
return ficheEnqueteResponse;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.gmss.fiscad.paylaods.response;
|
package io.gmss.fiscad.paylaods.response;
|
||||||
|
|
||||||
|
import io.gmss.fiscad.entities.infocad.metier.ActeurConcerne;
|
||||||
import io.gmss.fiscad.paylaods.response.FicheResponse.FicheActeurConcerneResponse;
|
import io.gmss.fiscad.paylaods.response.FicheResponse.FicheActeurConcerneResponse;
|
||||||
import io.gmss.fiscad.paylaods.response.FicheResponse.FicheEnquetesResponse;
|
import io.gmss.fiscad.paylaods.response.FicheResponse.FicheEnquetesResponse;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -16,6 +17,6 @@ public class FicheEnqueteResponse {
|
|||||||
//private List<ActeurConcerne> acteurConcernes;
|
//private List<ActeurConcerne> acteurConcernes;
|
||||||
|
|
||||||
private FicheEnquetesResponse enquete;
|
private FicheEnquetesResponse enquete;
|
||||||
private List<FicheActeurConcerneResponse> acteurConcernes;
|
private List<ActeurConcerne> acteurConcernes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import io.gmss.fiscad.entities.decoupage.Arrondissement;
|
|||||||
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
|
import io.gmss.fiscad.entities.infocad.metier.Parcelle;
|
||||||
import io.gmss.fiscad.entities.infocad.parametre.Bloc;
|
import io.gmss.fiscad.entities.infocad.parametre.Bloc;
|
||||||
import io.gmss.fiscad.entities.infocad.parametre.NatureDomaine;
|
import io.gmss.fiscad.entities.infocad.parametre.NatureDomaine;
|
||||||
|
import io.gmss.fiscad.entities.rfu.metier.CaracteristiqueParcelle;
|
||||||
|
import io.gmss.fiscad.entities.rfu.metier.EnqueteBatiment;
|
||||||
|
import io.gmss.fiscad.entities.rfu.metier.EnqueteUniteLogement;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Campagne;
|
import io.gmss.fiscad.entities.rfu.parametre.Campagne;
|
||||||
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
|
import io.gmss.fiscad.entities.rfu.parametre.Equipe;
|
||||||
import io.gmss.fiscad.entities.user.User;
|
import io.gmss.fiscad.entities.user.User;
|
||||||
@@ -49,7 +52,7 @@ public class FicheEnquetesResponse {
|
|||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateLitigeResolu;
|
private LocalDate dateLitigeResolu;
|
||||||
@JsonFormat
|
@JsonIgnore
|
||||||
private Bloc bloc;
|
private Bloc bloc;
|
||||||
@JsonFormat(pattern = "dd-MM-yyyy")
|
@JsonFormat(pattern = "dd-MM-yyyy")
|
||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
@@ -115,16 +118,9 @@ public class FicheEnquetesResponse {
|
|||||||
@JsonDeserialize(using = LocalDateDeserializer.class)
|
@JsonDeserialize(using = LocalDateDeserializer.class)
|
||||||
private LocalDate dateFinExcemption;
|
private LocalDate dateFinExcemption;
|
||||||
|
|
||||||
// public Long getTerminalId(){
|
private List<CaracteristiqueParcelle> caracteristiquesParcelles;
|
||||||
// if(this.terminal!=null){
|
private List<EnqueteBatiment> enquetesBatiments;
|
||||||
// return this.terminal.getId();
|
private List<EnqueteUniteLogement> enquetesUniteLogements;
|
||||||
// }else return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
private List<FicheCaracteristiqueParcelleResponse> caracteristiquesParcelles;
|
|
||||||
private List<FicheEnqueteBatimentResponse> enquetesBatiments;
|
|
||||||
private List<FicheEnqueteUniteLogementResponse> enquetesUniteLogements;
|
|
||||||
|
|
||||||
public String getNomPrenomEnqueteur() {
|
public String getNomPrenomEnqueteur() {
|
||||||
if (this.user != null) {
|
if (this.user != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user