Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 32s

This commit is contained in:
2025-12-16 19:01:07 +01:00
parent bc31074a24
commit 1d4a1f61c9
252 changed files with 33293 additions and 73 deletions

View File

@@ -56,13 +56,21 @@ public class ParcelleGeomController {
}
@GetMapping("/by-quartier/{codeQuartier}")
public ResponseEntity<?> getAllTpeList(@PathVariable String codeQuartier) {
public ResponseEntity<?> getParcellesGeomsByQuartier(@PathVariable String codeQuartier) {
return new ResponseEntity<>(
new ApiResponse<>(true, parcelleGeomService.getParcelleGeomListUnQuatier(codeQuartier), "Liste des parcelle chargée avec succès."),
HttpStatus.OK
);
}
@GetMapping("/by-arrondissement/{codeArrondissement}")
public ResponseEntity<?> getParcellesGeomsByArrondissement(@PathVariable String codeArrondissement) {
return new ResponseEntity<>(
new ApiResponse<>(true, parcelleGeomService.getParcelleGeomListUnArrondissement(codeArrondissement), "Liste des parcelle chargée avec succès."),
HttpStatus.OK
);
}
@GetMapping("/all-paged")
public ResponseEntity<?> getAllTpePaged(@RequestParam int pageNo, @RequestParam int pageSize) {

View File

@@ -50,27 +50,35 @@ public class Enquete extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateEnquete;
private boolean litige;
@JsonIgnore
@ManyToOne
private User user;
private Long mobileDataId;
@JsonIgnore
@OneToMany(mappedBy = "enquete")
private List<ActeurConcerne> acteurConcernes;
@JsonIgnore
@ManyToOne
private Parcelle parcelle;
private Long parcelleExternalKey;
@JsonIgnore
@ManyToOne
private Bloc bloc;
@ManyToOne
private Campagne campagne;
@@ -159,9 +167,11 @@ public class Enquete extends BaseEntity implements Serializable {
private String surface;
private int nbreBatiment;
private int nbrePiscine;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateDebutExcemption;
@JsonFormat(pattern = "dd-MM-yyyy")
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateFinExcemption;

View File

@@ -5,6 +5,9 @@ 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.BaseEntity;
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.StatutParcelle;
import jakarta.persistence.*;
@@ -26,16 +29,20 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
@AllArgsConstructor
@SQLDelete(sql =
"UPDATE parcelle " +
"SET deleted = true " +
"WHERE id = ?")
@Where(clause = " deleted = false")
//@SQLDelete(sql =
// "UPDATE parcelle " +
// "SET deleted = true " +
// "WHERE id = ?")
//@Where(clause = " deleted = false")
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;
@@ -47,60 +54,51 @@ public class ParcelleGeom extends BaseEntity implements Serializable {
private String longitude;
private String latitude;
private String pointsPolygone;
//////////
private String departement;
private String commune;
private String arrondissement;
private String villageQuartier;
private String codeBloc;
//private String codeParcelle;
private String codeEquipe;
private Integer superficie;
private String elNumeroEtatLieux;
private String elLot;
private String elLettreParcelle;
private String rfuQuartierOuZone;
private String rfuIlot;
private String rfuLettreParcelle;
private String dateCollecte;
private String nomLotissement;
private String nomEtPrenoms;
private String sourceCollecte;
private String dateCollecte;
private String sourceDonnees;
private String observations;
@Enumerated(EnumType.STRING)
private StatutParcelle statutParcelle;
// @JsonIgnore
// @ManyToOne
// private Upload upload;
private Long uploadId;
@ManyToOne
private Departement departement;
@ManyToOne
private Commune commune;
@ManyToOne
private Arrondissement arrondissement;
@ManyToOne
private Quartier quartier ;
@ColumnDefault("0")
private int 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;
@ManyToOne
private Quartier quartier;
@ColumnDefault("0")
private int geomSrid;
// @JsonSerialize(using = GeometrySerializer.class)
// @JsonDeserialize(contentUsing = GeometryDeserializer.class)
// @Column(name = "geom",columnDefinition = "geometry(Polygon,4326)")
// private Polygon geometry ;
@JsonSerialize(using = GeometrySerializer.class)
@JsonDeserialize(contentUsing = GeometryDeserializer.class)
@Column(name = "geometry",columnDefinition = "geometry(Polygon,32631)")
private Polygon geometry;
@Column(columnDefinition = "TEXT")
private String geometryString;
}

View File

@@ -16,7 +16,7 @@ import java.io.Serializable;
@Setter
@Table(
indexes = {
@Index(name = "idx_terminal_external_bat", columnList = "terminalId, externalKey")
@Index(name = "idx_terminal_external_activite", columnList = "terminalId, externalKey")
}
)
public class MobileDataEnqueteActivite extends BaseEntity implements Serializable {

View File

@@ -120,28 +120,28 @@ public class ParcelleGeomServiceImpl implements ParcelleGeomService {
}
parcelleGeom.setUploadId(upload.getId());
parcelleGeom.setDepartement(propertiesNode.get("DEPARTEMENT").textValue());
parcelleGeom.setCommune(propertiesNode.get("COMMUNE").textValue());
parcelleGeom.setArrondissement(propertiesNode.get("ARRONDISSEMENT").textValue());
parcelleGeom.setVillageQuartier(propertiesNode.get("VILLAGE_QUARTIER").textValue());
parcelleGeom.setCodeBloc(propertiesNode.get("CODE_BLOC").textValue());
parcelleGeom.setNupProvisoire(propertiesNode.get("CODE_PARCELLE").textValue());
parcelleGeom.setCodeEquipe(propertiesNode.get("CODE_EQUIPE").textValue());
try {
parcelleGeom.setSuperficie(Integer.parseInt(propertiesNode.get("SUPERFICIE").textValue()));
}catch (Exception e){
}
parcelleGeom.setElNumeroEtatLieux(propertiesNode.get("EL_NUMERO_ETAT_LIEUX").textValue());
parcelleGeom.setElLot(propertiesNode.get("EL_LOT").textValue());
parcelleGeom.setRfuQuartierOuZone(propertiesNode.get("RFU_QUARTIER_OU_ZONE").textValue());
parcelleGeom.setElLettreParcelle(propertiesNode.get("EL_LETTRE_PARCELLE").textValue());
parcelleGeom.setRfuIlot(propertiesNode.get("RFU_ILOT").textValue());
parcelleGeom.setRfuLettreParcelle(propertiesNode.get("RFU_LETTRE_PARCELLE").textValue());
parcelleGeom.setDateCollecte(propertiesNode.get("DATE_COLLECTE").textValue());
parcelleGeom.setNomLotissement(propertiesNode.get("NOM_LOTISSEMENT").textValue());
parcelleGeom.setNomEtPrenoms(propertiesNode.get("NOM_ET_PRENOMS").textValue());
parcelleGeom.setSourceCollecte(propertiesNode.get("SOURCE_COLLECTE").textValue());
parcelleGeom.setObservations(propertiesNode.get("OBSERVATIONS").textValue());
// parcelleGeom.setDepartement(propertiesNode.get("DEPARTEMENT").textValue());
// parcelleGeom.setCommune(propertiesNode.get("COMMUNE").textValue());
// parcelleGeom.setArrondissement(propertiesNode.get("ARRONDISSEMENT").textValue());
// parcelleGeom.setVillageQuartier(propertiesNode.get("VILLAGE_QUARTIER").textValue());
// parcelleGeom.setCodeBloc(propertiesNode.get("CODE_BLOC").textValue());
// parcelleGeom.setNupProvisoire(propertiesNode.get("CODE_PARCELLE").textValue());
// parcelleGeom.setCodeEquipe(propertiesNode.get("CODE_EQUIPE").textValue());
// try {
// parcelleGeom.setSuperficie(Integer.parseInt(propertiesNode.get("SUPERFICIE").textValue()));
// }catch (Exception e){
// }
// parcelleGeom.setElNumeroEtatLieux(propertiesNode.get("EL_NUMERO_ETAT_LIEUX").textValue());
// parcelleGeom.setElLot(propertiesNode.get("EL_LOT").textValue());
// parcelleGeom.setRfuQuartierOuZone(propertiesNode.get("RFU_QUARTIER_OU_ZONE").textValue());
// parcelleGeom.setElLettreParcelle(propertiesNode.get("EL_LETTRE_PARCELLE").textValue());
// parcelleGeom.setRfuIlot(propertiesNode.get("RFU_ILOT").textValue());
// parcelleGeom.setRfuLettreParcelle(propertiesNode.get("RFU_LETTRE_PARCELLE").textValue());
// parcelleGeom.setDateCollecte(propertiesNode.get("DATE_COLLECTE").textValue());
// parcelleGeom.setNomLotissement(propertiesNode.get("NOM_LOTISSEMENT").textValue());
// parcelleGeom.setNomEtPrenoms(propertiesNode.get("NOM_ET_PRENOMS").textValue());
// parcelleGeom.setSourceCollecte(propertiesNode.get("SOURCE_COLLECTE").textValue());
// parcelleGeom.setObservations(propertiesNode.get("OBSERVATIONS").textValue());
parcelleGeom= parcelleGeomRepository.save(parcelleGeom);
try {
setStatutParcelleGeomFromGeoJson(parcelleGeom);
@@ -180,6 +180,11 @@ public class ParcelleGeomServiceImpl implements ParcelleGeomService {
return parcelleGeomRepository.findAllByQuartier_Code(codeQuartier);
}
@Override
public List<ParcelleGeom> getParcelleGeomListUnArrondissement(String codeArrondissement) {
return parcelleGeomRepository.findAllByQuartier_Arrondissement_Code(codeArrondissement);
}
@Override

View File

@@ -21,6 +21,7 @@ public interface ParcelleGeomService {
Page<ParcelleGeom> getParcelleGeomList(Pageable pageable);
List<ParcelleGeom> getParcelleGeomList();
List<ParcelleGeom> getParcelleGeomListUnQuatier(String codeQuartier);
public List<ParcelleGeom> getParcelleGeomListUnArrondissement(String codeArrondissement);
Optional<ParcelleGeom> getParcelleGeomById(Long id);

View File

@@ -24,7 +24,7 @@ public class EnqueteActivitePayload {
private Long idBackend;
private Long externalKey;
private Long terminalId;
private Long ChiffreAffaire;
private Long ChiffreAffaire; // Todo : Revoir le nom de la variable 15/12/2015
private String NumeroRccm;
private boolean synchronise;
private String observation;

View File

@@ -12,6 +12,7 @@ import java.util.Optional;
public interface ParcelleGeomRepository extends JpaRepository<ParcelleGeom, Long> {
List<ParcelleGeom> findAllByQuartier_Code(String code);
List<ParcelleGeom> findAllByQuartier_Arrondissement_Code(String code);
Optional<ParcelleGeom> findFirstByNupProvisoire(String numProvisoir);
@Modifying

View File

@@ -6,6 +6,7 @@ io.gmss.fiscad.profile=dgi
#spring.datasource.username=infocad_user
#spring.datasource.password=W5fwD({9*q53
# LOCAL ENV
spring.datasource.url=jdbc:postgresql://localhost:5432/fiscad_dgi
spring.datasource.username=infocad_user
spring.datasource.password=W5fwD({9*q53