Skip to content

Commit

Permalink
adaptations pour 2024, par @MaelREBOUX et @EtienneRouvin (3liz#450)
Browse files Browse the repository at this point in the history
- ajout des champs assietf et codique a la table local00
- ajout du champ jancmp a la table pev
- on ne remplit plus le champ locinc de local00, vide dans la doc
  • Loading branch information
landryb committed Jul 29, 2024
1 parent b723e1c commit d9fb9d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cadastre/scripts/plugin/2024/majic3_formatage_donnees.sql
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ FROM [PREFIXE]nbat WHERE SUBSTRING(tmp,20,2) ='36';
INSERT INTO [PREFIXE]local00
(
local00, annee, ccodep, ccodir, ccocom, invar, ccopre, ccosec, dnupla, dnubat, descr, dniv, dpor, ccoriv, ccovoi, dnvoiri, dindic, ccocif, dvoilib, cleinvar,
ccpper, locinc, parcelle, voie, lot
assietf, ccpper, codique, parcelle, voie, lot
)
SELECT
REPLACE(SUBSTRING(tmp,1,3)||SUBSTRING(tmp,7,10),' ','0') AS local00,
Expand All @@ -211,8 +211,9 @@ SELECT
SUBSTRING(tmp,72,4) AS ccocif,
SUBSTRING(tmp,76,30) AS dvoilib,
SUBSTRING(tmp,106,1) AS cleinvar,
SUBSTRING(tmp,108,10) AS assietf,
SUBSTRING(tmp,125,3) AS ccpper,
SUBSTRING(tmp,107,1) AS locinc,
SUBSTRING(tmp,128,7) AS codique,
REPLACE(SUBSTRING(tmp,1,6)||SUBSTRING(tmp,36,9),' ', '0') AS parcelle,
REPLACE(SUBSTRING(tmp,1,6)||SUBSTRING(tmp,62,5),' ', '0')||SUBSTRING(tmp,57,4) AS voie,
'[LOT]' as lot
Expand Down Expand Up @@ -317,7 +318,7 @@ INSERT INTO [PREFIXE]pev
ccocac, dnutrf, dcfloc, dsupot, dvlper, dvlpera, gnexpl,
ccthp, retimp, dnuref, gnidom,
dvltpe,
tpevtieom, ccortar, ccorvl, dtaurv, dcmloc, dcsplca, dcsglca, dcralca,
tpevtieom, ccortar, ccorvl, dtaurv, dcmloc, dcsplca, dcsglca, dcralca, jancmp
local10, lot
)
SELECT
Expand Down Expand Up @@ -359,6 +360,7 @@ SELECT
SUBSTRING(tmp,156,5) AS dcsplca,
SUBSTRING(tmp,161,5) AS dcsglca,
SUBSTRING(tmp,166,5) AS dcralca,
SUBSTRING(tmp,171,4) AS jancmp,


SUBSTRING(tmp,1,3)||SUBSTRING(tmp,7,10) AS local10,
Expand Down
6 changes: 6 additions & 0 deletions cadastre/scripts/plugin/commun_create_metier.sql
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ CREATE TABLE local00 (
ccocif text,
dvoilib text,
cleinvar text,
assietf text,
ccpper text,
locinc text,
codique text,
lot text
);

Expand Down Expand Up @@ -277,6 +279,7 @@ CREATE TABLE pev (
ccorvl text,
dtaurv integer,
dcmloc integer,
jancmp text,
lot text
);

Expand Down Expand Up @@ -1387,8 +1390,10 @@ COMMENT ON COLUMN local00.dindic IS 'indice de répétition - ';
COMMENT ON COLUMN local00.ccocif IS 'code du cdi/cdif (code topad) - ';
COMMENT ON COLUMN local00.dvoilib IS 'libelle de la voie - ';
COMMENT ON COLUMN local00.cleinvar IS 'clé alpha no invariant - ';
COMMENT ON COLUMN local00.assietf IS 'Code SAGES du service gestionnaire de la taxe foncière';
COMMENT ON COLUMN local00.ccpper IS 'Code de trésorerie gestionnaire - ';
COMMENT ON COLUMN local00.locinc IS 'code local sans évaluation - INDISPONIBLE';
COMMENT ON COLUMN local00.codique IS 'Code codique du service de recouvrement de la TF';
COMMENT ON TABLE local10 IS 'Article identifiant du local';
COMMENT ON COLUMN local10.ccodep IS 'code département - ';
COMMENT ON COLUMN local10.ccodir IS 'code direction - ';
Expand Down Expand Up @@ -1477,6 +1482,7 @@ COMMENT ON COLUMN pev.ccortar IS 'Code commune origine du tarif';
COMMENT ON COLUMN pev.ccorvl IS 'Code réduction du local';
COMMENT ON COLUMN pev.dtaurv IS 'Taux de réduction';
COMMENT ON COLUMN pev.dcmloc IS 'Coefficient de modulation du local';
COMMENT ON COLUMN pev.jancmp IS 'Année de début de compensation';


COMMENT ON TABLE pevexoneration IS 'Article exonération de pev imposable';
Expand Down

0 comments on commit d9fb9d2

Please sign in to comment.