Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete #10
16598
dgi_zone_pilote.geojson
Normal file
@@ -32,8 +32,8 @@ services:
|
||||
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}
|
||||
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
SERVER_PORT: 8282
|
||||
IO_GMSS_FISCAD_PROFILE: abomey
|
||||
SPRING_PROFILES_ACTIVE: abomey
|
||||
IO_GMSS_FISCAD_PROFILE: dgi
|
||||
SPRING_PROFILES_ACTIVE: dgi
|
||||
ports:
|
||||
- "8282:8282"
|
||||
volumes:
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 295 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 489 KiB |
|
Before Width: | Height: | Size: 489 KiB |
|
Before Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 210 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 335 KiB |
|
Before Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 352 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 178 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 317 KiB |
|
Before Width: | Height: | Size: 317 KiB |
|
Before Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 4.3 MiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 112 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 135 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 266 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 263 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 392 KiB |
|
Before Width: | Height: | Size: 392 KiB |
|
Before Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 383 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 166 KiB |