21 Commits

Author SHA1 Message Date
62f25ea726 Merge pull request 'correction docker composer avec les secrets' (#18) from features/crud_entites into develop
Reviewed-on: #18
2025-12-17 16:41:46 +00:00
6c92d06c50 correction docker composer avec les secrets
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 27s
2025-12-17 17:40:58 +01:00
6125fcbd0b Merge pull request 'correction docker composer' (#16) from features/crud_entites into develop
Reviewed-on: #16
2025-12-17 16:26:17 +00:00
9336715c18 correction docker composer
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 28s
2025-12-17 17:23:32 +01:00
211af6103a Merge pull request 'features/crud_entites' (#14) from features/crud_entites into develop
Reviewed-on: #14
2025-12-17 14:12:53 +00:00
4075fba99b revu des secrets et .env pour différencier
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 32s
2025-12-17 15:11:49 +01:00
c34334376a revu des secrets et .env pour différencier 2025-12-17 15:10:27 +01:00
d27b622db8 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#12) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 35s
Reviewed-on: #12
2025-12-16 18:22:48 +00:00
98d0187df4 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
2025-12-16 19:21:55 +01:00
c80b40082c Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#10) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 44s
Reviewed-on: #10
2025-12-16 18:06:52 +00:00
1d4a1f61c9 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
2025-12-16 19:01:07 +01:00
4a88af6487 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#8) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 34s
Reviewed-on: #8
2025-12-05 19:24:00 +00:00
bc31074a24 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 29s
2025-12-05 20:23:36 +01:00
966b0af1c2 Merge pull request 'Changement en DB du nom de la colonne personne_id en proprietaire_id dans la table enquete' (#6) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 36s
Reviewed-on: #6
2025-12-05 19:20:57 +00:00
ad2c3c70b2 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 28s
2025-12-05 20:19:58 +01:00
58aa088ac3 Merge pull request 'ajout de ci-cd' (#4) from features/crud_entites into develop
All checks were successful
CD - Deploy on main / deploy (pull_request) Successful in 39s
Reviewed-on: #4
2025-12-05 19:10:37 +00:00
ac624a62fb ajout de ci-cd
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2025-12-05 20:09:45 +01:00
033b430051 Merge pull request 'ajout de ci-cd' (#2) from features/crud_entites into develop
Some checks failed
CD - Deploy on main / deploy (pull_request) Failing after 39s
Reviewed-on: #2
2025-12-05 19:06:43 +00:00
87615f210b ajout de ci-cd
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 29s
2025-12-05 20:05:52 +01:00
b8dbc7f625 Merge pull request 'ajout de ci-cd' (#1) from features/crud_entites into develop
Reviewed-on: #1
2025-12-05 17:53:30 +00:00
de2f149cf7 ajout de ci-cd
All checks were successful
CI - Build & Test (develop) / build-and-test (pull_request) Successful in 49s
2025-12-05 18:39:21 +01:00
266 changed files with 33648 additions and 98 deletions

3
.env
View File

@@ -1,3 +1,2 @@
POSTGRES_DB=abomey_db
POSTGRES_USER=infocad_user
POSTGRES_PASSWORD=W5fwD({9*q53
POSTGRES_USER=infocad_user

View File

@@ -0,0 +1,129 @@
name: CD - Deploy on main
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
# 1) S'assurer que Node.js est installé
- name: Ensure Node.js is installed
shell: sh
run: |
if command -v node >/dev/null 2>&1; then
echo "Node.js already installed: $(node -v)"
else
apk update && apk add --no-cache nodejs
echo "Node.js installed: $(node -v)"
fi
# 2) S'assurer que Java 17 & Maven sont installés
- name: Ensure Java & Maven are installed
shell: sh
run: |
if ! command -v java >/dev/null 2>&1; then
apk update && apk add --no-cache openjdk17-jdk
fi
java -version
if ! command -v mvn >/dev/null 2>&1; then
apk update && apk add --no-cache maven
fi
mvn -version
# 3) Détecter JAVA_HOME dynamiquement
- name: Detect JAVA_HOME dynamically
shell: sh
run: |
JAVA_BIN=$(readlink -f "$(command -v java)")
JAVA_HOME=$(dirname "$(dirname "$JAVA_BIN")")
echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
# 4) Checkout du dépôt
- name: Checkout repository
uses: actions/checkout@v4
# 5) Informations de contexte (sans secrets)
- name: Show context information
shell: sh
run: |
echo "Commit:"
git rev-parse HEAD
echo "JAVA_HOME=$JAVA_HOME"
java -version
mvn -version
# 6) S'assurer que Docker CLI & docker-compose sont installés
- name: Ensure Docker & docker-compose are installed
shell: sh
run: |
if command -v docker >/dev/null 2>&1; then
docker version || true
else
apk update && apk add --no-cache docker docker-compose
docker version || true
fi
# 7) Fournir la configuration NON sensible
- name: Export database configuration
shell: sh
run: |
echo "POSTGRES_DB_FISCAD=fiscad_db" >> "$GITHUB_ENV"
echo "POSTGRES_USER_FISCAD=fiscad_user" >> "$GITHUB_ENV"
# 8) Création des secrets runtime (PRODUCTION)
- name: Create runtime secrets
shell: sh
run: |
mkdir -p secrets
echo "${{ secrets.DEFAULT_USER_NAME }}" > secrets/defaultUserName.txt
echo "${{ secrets.DEFAULT_USER_PASSWORD }}" > secrets/defaultUserPassword.txt
echo "${{ secrets.POSTGRES_PASSWORD_FISCAD }}" > secrets/postgresPassword.txt
chmod 600 secrets/*
# 9) Build Maven (jar final)
- name: Build backend with Maven
shell: sh
run: mvn -B clean package -DskipTests
# 10) Déploiement avec docker-compose (prod)
- name: Deploy using docker-compose (prod)
shell: sh
run: |
export COMPOSE_PROJECT_NAME=fiscad
docker-compose -f docker-compose-prod.yml pull || true
docker-compose -f docker-compose-prod.yml down --remove-orphans
docker-compose -f docker-compose-prod.yml up -d --build
# 11) ✅ TEST BLOQUANT : connexion PostgreSQL
- name: Test database connection
shell: sh
run: |
echo "⏳ Waiting for PostgreSQL to be ready..."
sleep 10
echo "🔍 Testing database connection..."
docker exec fiscad-db sh -c "
export PGPASSWORD=\$(cat /run/secrets/postgresPassword) &&
psql -h localhost \
-U ${POSTGRES_USER_FISCAD} \
-d ${POSTGRES_DB_FISCAD} \
-c 'SELECT 1;'
"
# 12) Nettoyage des secrets (OBLIGATOIRE)
- name: Cleanup secrets
if: always()
shell: sh
run: rm -rf secrets
# 13) Nettoyage des images Docker inutilisées
- name: Cleanup unused Docker images
shell: sh
run: docker image prune -f || true

View File

@@ -0,0 +1,78 @@
name: CI - Build & Test (develop)
on:
pull_request:
branches:
- develop
jobs:
build-and-test:
runs-on: self-hosted
steps:
# 1) Node.js
- name: Ensure Node.js is installed
shell: sh
run: |
if command -v node >/dev/null 2>&1; then
echo "Node.js already installed: $(node -v)"
else
apk update && apk add --no-cache nodejs
echo "Node.js installed: $(node -v)"
fi
# 2) Java & Maven
- name: Ensure Java & Maven are installed
shell: sh
run: |
if ! command -v java >/dev/null 2>&1; then
apk update && apk add --no-cache openjdk17-jdk
fi
java -version
if ! command -v mvn >/dev/null 2>&1; then
apk update && apk add --no-cache maven
fi
mvn -version
# 3) JAVA_HOME
- name: Detect JAVA_HOME dynamically
shell: sh
run: |
JAVA_BIN=$(readlink -f "$(command -v java)")
JAVA_HOME=$(dirname "$(dirname "$JAVA_BIN")")
echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_ENV"
# 4) Checkout
- name: Checkout repository
uses: actions/checkout@v4
# 5) Secrets runtime (CI)
- name: Create runtime secrets
shell: sh
run: |
mkdir -p secrets
echo "${{ secrets.DEFAULT_USER_NAME }}" > secrets/defaultUserName.txt
echo "${{ secrets.DEFAULT_USER_PASSWORD }}" > secrets/defaultUserPassword.txt
echo "${{ secrets.POSTGRES_PASSWORD_FISCAD }}" > secrets/postgresPassword.txt
chmod 600 secrets/*
# 6) Vérification outils
- name: Show Java & Maven versions
shell: sh
run: |
echo "JAVA_HOME=$JAVA_HOME"
java -version
mvn -version
# 7) Build & tests
- name: Build with Maven
shell: sh
run: mvn -B clean verify
# 8) Nettoyage
- name: Cleanup secrets
if: always()
shell: sh
run: rm -rf secrets

2
.gitignore vendored
View File

@@ -3,3 +3,5 @@ fiscad.log*
.DS_Store
target/*
ansible
secrets/
.env

View File

@@ -1,5 +1,5 @@
# Étape 1 : Build avec Maven et Java 17
FROM openjdk:17-jdk-slim
FROM eclipse-temurin:17-jdk-jammy
WORKDIR /app

16598
dgi_zone_pilote.geojson Normal file

File diff suppressed because it is too large Load Diff

74
docker-compose-prod.yml Normal file
View File

@@ -0,0 +1,74 @@
services:
db:
image: postgres:15
container_name: fiscad-db
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB_FISCAD}
POSTGRES_USER: ${POSTGRES_USER_FISCAD}
POSTGRES_PASSWORD_FILE: /run/secrets/postgresPassword
secrets:
- postgresPassword
ports:
- "5432:5432"
volumes:
- db-data-fiscad:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER_FISCAD}"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
container_name: fiscad-app
restart: on-failure
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB_FISCAD}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER_FISCAD}
SPRING_DATASOURCE_PASSWORD_FILE: /run/secrets/postgresPassword
SERVER_PORT: 8282
IO_GMSS_FISCAD_PROFILE: abomey
SPRING_PROFILES_ACTIVE: abomey
DEFAULT_USER_NAME_FILE: /run/secrets/defaultUserName
DEFAULT_USER_PASSWORD_FILE: /run/secrets/defaultUserPassword
secrets:
- postgresPassword
- defaultUserName
- defaultUserPassword
ports:
- "8282:8282"
volumes:
- /fiscad/uploads:/app/uploads
- /fiscad/jasperReport:/app/jasperReport
- /fiscad/logs:/app/logs
volumes:
db-data-fiscad:
secrets:
postgresPassword:
file: ./secrets/postgresPassword.txt
defaultUserName:
file: ./secrets/defaultUserName.txt
defaultUserPassword:
file: ./secrets/defaultUserPassword.txt

View File

@@ -1,4 +1,4 @@
version: '3.9'
#version: '3.9'
services:
@@ -6,41 +6,73 @@ services:
image: postgres:15
container_name: fiscad-db
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB_FISCAD}
POSTGRES_USER: ${POSTGRES_USER_FISCAD}
POSTGRES_PASSWORD_FILE: /run/secrets/postgresPassword
secrets:
- postgresPassword
ports:
- "5432:5432"
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
app:
build:
context: .
dockerfile: Dockerfile
container_name: fiscad-app
restart: on-failure
depends_on:
- db
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER}
SPRING_DATASOURCE_PASSWORD: ${POSTGRES_PASSWORD}
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/${POSTGRES_DB_FISCAD}
SPRING_DATASOURCE_USERNAME: ${POSTGRES_USER_FISCAD}
SPRING_DATASOURCE_PASSWORD_FILE: /run/secrets/postgresPassword
SERVER_PORT: 8282
IO_GMSS_FISCAD_PROFILE: abomey
SPRING_PROFILES_ACTIVE: abomey
IO_GMSS_FISCAD_PROFILE: dgi
SPRING_PROFILES_ACTIVE: dgi
# 🔐 Secrets Spring (fichiers)
DEFAULT_USER_NAME_FILE: /run/secrets/defaultUserName
DEFAULT_USER_PASSWORD_FILE: /run/secrets/defaultUserPassword
secrets:
- defaultUserName
- defaultUserPassword
- postgresPassword
ports:
- "8282:8282"
volumes:
- ./uploads:/app/uploads
- ./jasperReport:/app/jasperReport
- ./logs:/app/logs
restart: on-failure
volumes:
db-data:
db-data:
secrets:
defaultUserName:
file: ./secrets/defaultUserName.txt
defaultUserPassword:
file: ./secrets/defaultUserPassword.txt
postgresPassword:
file: ./secrets/postgresPassword.txt

View File

@@ -0,0 +1 @@
infocad_admin

View File

@@ -0,0 +1 @@
admin@123

View File

@@ -20,8 +20,11 @@ public class DataLoadConfig {
private final UserRepository userRepository;
private final PasswordEncoder passwordEncoder;
@Value("${app.sourcemind.env.defaultpassword}")
private String defaultPassword;
@Value("${DEFAULT_USER_NAME_FILE}")
private String usernameFile;
@Value("${DEFAULT_USER_PASSWORD_FILE}")
private String passwordFile;
public DataLoadConfig(RoleRepository roleRepository, UserRepository userRepository, PasswordEncoder passwordEncoder) {
this.roleRepository = roleRepository;
@@ -52,14 +55,14 @@ public class DataLoadConfig {
}
public void loadUsers() {
if (userRepository.countAllByUsernameIsNotNull() == 0) {
if (userRepository.existsByUsername(usernameFile) ) {
User admin = new User();
admin.setUsername("administrateur@infocad.bj");
admin.setUsername(usernameFile);
admin.setEmail("administrateur@infocad.bj");
admin.setTel("N/A");
admin.setNom("Administrateur");
admin.setPrenom("Principal");
admin.setPassword(passwordEncoder.encode(defaultPassword));
admin.setPassword(passwordEncoder.encode(passwordFile));
admin.setActive(true);
Set<Role> roles = new HashSet<>();
roles.add(roleRepository.findRoleByNom(UserRole.ROLE_ADMIN).get());

View File

@@ -13,16 +13,16 @@ import io.swagger.v3.oas.annotations.servers.Server;
@OpenAPIDefinition(
info = @Info(
contact = @Contact(
name = "Novatic",
email = "contact@novatic.org",
url = "https://novatic.org"
name = "ABS Company Bénin",
email = "contact@abs.org",
url = "https://abs.org"
),
description = "Cette page présente toutes les ressources API pour la gestion des données socio-foncières et fiscales",
title = "FISCAD",
version = "1.0",
license = @License(
name = "Licence name",
url = "https://novatic.org"
url = "https://abs.org"
),
termsOfService = "Terms of service"
),
@@ -33,7 +33,7 @@ import io.swagger.v3.oas.annotations.servers.Server;
),
@Server(
description = "TEST ENV (http)",
url = "http://novatic.vps.webdock.cloud:8282"
url = "https://backend.fiscad-test.novatic.org"
),
@Server(
description = "PROD ENV (https)",

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;
@@ -80,6 +88,7 @@ public class Enquete extends BaseEntity implements Serializable {
@JsonIgnore
@ManyToOne
@JoinColumn(name = "proprietaire_id")
private Personne personne ;
@JsonIgnore
@@ -158,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

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

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

@@ -49,8 +49,9 @@ public class EnqueteActivite extends BaseEntity implements Serializable {
@JsonDeserialize(using = LocalDateDeserializer.class)
private LocalDate dateEnquete;
@Column(columnDefinition = "false")
@Column(columnDefinition = "boolean default false", nullable = false)
private boolean estDeclarer;
private String nc;
private Long ChiffreAffaire;
private String NumeroRccm;

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

@@ -14,6 +14,8 @@ public interface UserRepository extends JpaRepository<User, Long> {
Optional<User> findByUsername(String username);
boolean existsByUsername(String username);
long countAllByUsernameIsNotNull();
List<User> findAllByStructureAndRolesIn(Structure structure, Set<Role> roleSet);

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

View File

@@ -11,7 +11,7 @@ jwt.jwtExpirationInMs=7776000000
spring.application.name=infocad
#logging.file.name=fiscad.log
logging.level.org.springframework.security=DEBUG
app.sourcemind.env.defaultpassword=1234567890
app.sourcemind.env.resetlink=http://localhost:4200/reset-password/
spring.mail.host=sandbox.smtp.mailtrap.io
spring.mail.port=587
@@ -42,6 +42,13 @@ file.upload_dir=./uploads
file.jasper-reports=./jasperReport
logging.file.name=/app/logs/fiscad.log
#app.abs.env.defaultpassword = 1234567890
#app.abs.env.defaultuser = infocad_admin
app.default-user.username=${DEFAULT_USER_NAME:}
app.default-user.password=${DEFAULT_USER_PASSWORD:}
app.upload.root=${file.upload_dir}
app.upload.zips.received=${app.upload.root}/zips/received
app.upload.zips.done=${app.upload.root}/zips/done

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Some files were not shown because too many files have changed in this diff Show More