diff --git a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json index d1969097d8a6bddaa0a62ee9b85a1cd0b1486eb5..9c06715511f0dc1829fb151d5d609b1d473a7b31 100755 --- a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json +++ b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_traitement.json @@ -423,6 +423,19 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"tra_commentaire_17_1" + } + ] + }, { "fields":[ { @@ -616,7 +629,8 @@ "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -1569,6 +1583,18 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "nb_cols":12, + "id":"tra_commentaire_17_1", + "nb_rows":10 + } + ] + }, { "fields":[ { @@ -1716,7 +1742,8 @@ "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -2666,6 +2693,18 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "nb_cols":12, + "id":"tra_commentaire_17_1", + "nb_rows":10 + } + ] + }, { "fields":[ { @@ -2866,7 +2905,8 @@ "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -3404,4 +3444,4 @@ "id":"datasource_41" } } -} \ No newline at end of file +} diff --git a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_traitement.json b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_traitement.json index 6475ffa6e35a671620ceb874b23ed116aa6e7f0c..ca350ea373b0755fcf51918f2e54ef586a8e1a28 100755 --- a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_traitement.json +++ b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_traitement.json @@ -430,6 +430,19 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"tra_commentaire_17_1" + } + ] + }, { "fields":[ { @@ -635,7 +648,8 @@ "schema_f", "documents_f", "plan_f", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -1804,6 +1818,18 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "nb_cols":12, + "id":"tra_commentaire_17_1", + "nb_rows":10 + } + ] + }, { "fields":[ { @@ -1961,7 +1987,8 @@ "id_installation", "Element_0", "Element_7", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -3022,6 +3049,18 @@ } ] }, + { + "fields":[ + { + "type":"tinymce", + "name":"tra_commentaire", + "label":"Commentaires", + "nb_cols":12, + "id":"tra_commentaire_17_1", + "nb_rows":10 + } + ] + }, { "fields":[ { @@ -3235,7 +3274,8 @@ "schema_f", "documents_f", "plan_f", - "tra_vm_geomembrane" + "tra_vm_geomembrane", + "tra_commentaire" ] } ] @@ -3773,4 +3813,4 @@ "id":"datasource_41" } } -} \ No newline at end of file +} diff --git a/src/module_anc/module/javascript/script_module.js b/src/module_anc/module/javascript/script_module.js index 7d639dfe35c9936fdd5640a7ef12929b90c2702c..c1c63cfd07f5433e38daffb81b8c6859810f8036 100755 --- a/src/module_anc/module/javascript/script_module.js +++ b/src/module_anc/module/javascript/script_module.js @@ -621,9 +621,9 @@ vitisApp.on('appMainDrtvLoaded', function () { */ } else { oFormFieldsToDisplay = { - "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6"], - "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6"], - "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", "tra_dist_hab", "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane"] + "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6", "tra_commentaire"], + "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6", "tra_commentaire"], + "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", "tra_dist_hab", "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane", "tra_commentaire"] }; // var setTypeTraitement = function (event) { @@ -1135,9 +1135,9 @@ vitisApp.on('appMainDrtvLoaded', function () { var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_traitement", "id_controle", "tra_type", "id_installation"]; var oFormFieldsToDisplay, aFormFieldsToDisplay = []; oFormFieldsToDisplay = { - "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6"], - "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6"], - "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", , "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane"] + "BON FONCTIONNEMENT": ["tra_dist_hab", "tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regbl_mat", "tra_regbl_affl", "tra_regcol_mat", "tra_regcol_affl", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_3", "Element_4", "Element_5", "Element_6","tra_commentaire"], + "CONCEPTION": ["maj", "maj_date", "create", "create_date", "Element_0", "Element_6","tra_commentaire"], + "REALISATION": ["tra_dist_lim_parc", "tra_dist_veget", "tra_dist_puit", "tra_vm_grav_qual", "tra_vm_grav_ep", "tra_vm_geo_text", "tra_vm_bon_mat", "tra_regrep_mat", "tra_regrep_affl", "tra_regrep_equi", "tra_regrep_perf", "tra_regbl_mat", "tra_regbl_affl", "tra_regbl_hz", "tra_regbl_epand", "tra_regbl_perf", "tra_regcol_mat", "tra_regcol_affl", "tra_regcol_hz", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "Element_5", "Element_6", , "tra_vm_racine", "tra_vm_humidite", "tra_vm_imper", "tra_vm_geogrille", "tra_vm_tuy_perf", "tra_vm_sab_qual", "tra_vm_sab_ep", "tra_vm_geomembrane","tra_commentaire"] }; // var setTypeTraitement = function (event) { diff --git a/src/module_anc/web_service/sql/sqlQueries.xml b/src/module_anc/web_service/sql/sqlQueries.xml index 89514cc20fedd472328a9350427715248e0bd415..1741ee1d666aca0520ac490ac6810771af3495e2 100644 --- a/src/module_anc/web_service/sql/sqlQueries.xml +++ b/src/module_anc/web_service/sql/sqlQueries.xml @@ -3149,6 +3149,17 @@ CREATE OR REPLACE RULE insert_v_installation AS ON INSERT TO s_anc.v_installation DO INSTEAD INSERT INTO s_anc.installation (id_installation, id_com, id_parc, parc_sup, parc_parcelle_associees, parc_adresse, code_postal, parc_commune, prop_titre, prop_nom_prenom, prop_adresse, prop_code_postal, prop_commune, prop_tel, prop_mail, bati_type, bati_ca_nb_pp, bati_ca_nb_eh, bati_ca_nb_chambres, bati_ca_nb_autres_pieces, bati_ca_nb_occupant, bati_nb_a_control, bati_date_achat, bati_date_mutation, cont_zone_enjeu, cont_zone_sage, cont_zone_autre, cont_zone_urba, cont_zone_anc, cont_alim_eau_potable, cont_puits_usage, cont_puits_declaration, cont_puits_situation, cont_puits_terrain_mitoyen, observations, maj, maj_date, "create", create_date, archivage, geom, photo_f, document_f) VALUES (new.id_installation, new.id_com, new.id_parc, new.parc_sup, new.parc_parcelle_associees, new.parc_adresse, new.code_postal, new.parc_commune, new.prop_titre, new.prop_nom_prenom, new.prop_adresse, new.prop_code_postal, new.prop_commune, new.prop_tel, new.prop_mail, new.bati_type, new.bati_ca_nb_pp, new.bati_ca_nb_eh, new.bati_ca_nb_chambres, new.bati_ca_nb_autres_pieces, new.bati_ca_nb_occupant, new.bati_nb_a_control, new.bati_date_achat, new.bati_date_mutation, new.cont_zone_enjeu, new.cont_zone_sage, new.cont_zone_autre, new.cont_zone_urba, new.cont_zone_anc, new.cont_alim_eau_potable, new.cont_puits_usage, new.cont_puits_declaration, new.cont_puits_situation, new.cont_puits_terrain_mitoyen, new.observations, new.maj, new.maj_date, new."create", new.create_date, new.archivage, new.geom, new.photo_f, new.document_f) RETURNING installation.id_installation,installation.id_com,installation.id_parc,installation.parc_sup,installation.parc_parcelle_associees,installation.parc_adresse,installation.code_postal,installation.parc_commune,installation.prop_titre,installation.prop_nom_prenom,installation.prop_adresse,installation.prop_code_postal,installation.prop_commune,installation.prop_tel,installation.prop_mail,installation.bati_type,installation.bati_ca_nb_pp,installation.bati_ca_nb_eh,installation.bati_ca_nb_chambres,installation.bati_ca_nb_autres_pieces,installation.bati_ca_nb_occupant,installation.bati_nb_a_control,installation.bati_date_achat,installation.bati_date_mutation,installation.cont_zone_enjeu,installation.cont_zone_sage,installation.cont_zone_autre,installation.cont_zone_urba,installation.cont_zone_anc,installation.cont_alim_eau_potable,installation.cont_puits_usage,installation.cont_puits_declaration,installation.cont_puits_situation,installation.cont_puits_terrain_mitoyen,installation.observations,installation.maj,installation.maj_date,installation."create",installation.create_date,installation.archivage,installation.geom,installation.photo_f,installation.document_f,(installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier,( SELECT commune.texte AS commune FROM s_cadastre.commune WHERE commune.id_com = installation.id_com::bpchar) AS commune,( SELECT parcelle.section FROM s_cadastre.parcelle WHERE parcelle.id_par = installation.id_parc::bpchar) AS section,( SELECT parcelle.parcelle FROM s_cadastre.parcelle WHERE parcelle.id_par = installation.id_parc::bpchar) AS parcelle,( SELECT count(*) AS nb_controle FROM s_anc.controle WHERE controle.id_installation = installation.id_installation) AS nb_controle,( SELECT controle.des_date_control FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control DESC LIMIT 1) AS last_date_control,( SELECT controle.cl_avis FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control DESC LIMIT 1) AS cl_avis,( SELECT controle.des_date_control + '1 year'::interval * controle.des_interval_control::double precision AS next_control FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation ORDER BY controle.des_date_control LIMIT 1) AS next_control,( SELECT controle.cl_classe_cbf FROM s_anc.controle WHERE controle.des_date_control < now() AND controle.id_installation = installation.id_installation AND controle.controle_type::text <> 'CONCEPTION'::text ORDER BY controle.des_date_control DESC LIMIT 1) AS classement_installation; CREATE OR REPLACE RULE update_v_installation AS ON UPDATE TO s_anc.v_installation DO INSTEAD UPDATE s_anc.installation SET id_com = new.id_com, id_parc = new.id_parc, parc_sup = new.parc_sup, parc_parcelle_associees = new.parc_parcelle_associees, parc_adresse = new.parc_adresse, code_postal = new.code_postal, parc_commune = new.parc_commune, prop_titre = new.prop_titre, prop_nom_prenom = new.prop_nom_prenom, prop_adresse = new.prop_adresse, prop_code_postal = new.prop_code_postal, prop_commune = new.prop_commune, prop_tel = new.prop_tel, prop_mail = new.prop_mail, bati_type = new.bati_type, bati_ca_nb_pp = new.bati_ca_nb_pp, bati_ca_nb_eh = new.bati_ca_nb_eh, bati_ca_nb_chambres = new.bati_ca_nb_chambres, bati_ca_nb_autres_pieces = new.bati_ca_nb_autres_pieces, bati_ca_nb_occupant = new.bati_ca_nb_occupant, bati_nb_a_control = new.bati_nb_a_control, bati_date_achat = new.bati_date_achat, bati_date_mutation = new.bati_date_mutation, cont_zone_enjeu = new.cont_zone_enjeu, cont_zone_sage = new.cont_zone_sage, cont_zone_autre = new.cont_zone_autre, cont_zone_urba = new.cont_zone_urba, cont_zone_anc = new.cont_zone_anc, cont_alim_eau_potable = new.cont_alim_eau_potable, cont_puits_usage = new.cont_puits_usage, cont_puits_declaration = new.cont_puits_declaration, cont_puits_situation = new.cont_puits_situation, cont_puits_terrain_mitoyen = new.cont_puits_terrain_mitoyen, observations = new.observations, maj = new.maj, maj_date = new.maj_date, "create" = new."create", create_date = new.create_date, archivage = new.archivage, geom = new.geom, photo_f = new.photo_f, document_f = new.document_f WHERE installation.id_installation = new.id_installation; CREATE OR REPLACE RULE insert_v_controle AS ON INSERT TO s_anc.v_controle DO INSTEAD INSERT INTO s_anc.controle (id_controle, id_installation, controle_type, controle_ss_type, des_date_control, des_interval_control, des_pers_control, des_agent_control, des_installateur, des_refus_visite, des_date_installation, des_date_recommande, des_numero_recommande, dep_date_depot, dep_liste_piece, dep_dossier_complet, dep_date_envoi_incomplet, des_nature_projet, des_concepteur, des_ancien_disp, car_surface_dispo_m2, car_permea, car_valeur_permea, car_hydromorphie, car_prof_app, car_nappe_fond, car_terrain_innondable, car_roche_sol, car_dist_hab, car_dist_lim_par, car_dist_veget, car_dist_puit, des_reamenage_terrain, des_reamenage_immeuble, des_real_trvx, des_anc_ss_accord, des_collecte_ep, des_sep_ep_eu, des_eu_nb_sortie, des_eu_tes_regards, des_eu_pente_ecoul, des_eu_regars_acces, des_eu_alteration, des_eu_ecoulement, des_eu_depot_regard, des_commentaire, ts_conforme, ts_type_effluent, ts_capacite_bac, ts_nb_bac, ts_coher_taille_util, ts_aire_etanche, ts_aire_abri, ts_ventilation, ts_cuve_etanche, ts_val_comp, ts_ruissel_ep, ts_absence_nuisance, ts_respect_regles, ts_commentaires, vt_primaire, vt_secondaire, vt_prim_loc, vt_prim_ht, vt_prim_diam, vt_prim_type_extract, vt_second_loc, vt_second_ht, vt_second_diam, vt_second_type_extract, da_chasse_acces, da_chasse_auto, da_chasse_pr_nat_eau, da_chasse_ok, da_chasse_dysfonctionnement, da_chasse_degradation, da_chasse_entretien, da_pr_loc_pompe, da_pr_acces, da_pr_nb_pompe, da_pr_nat_eau, da_pr_ventilatio, da_pr_ok, da_pr_alarme, da_pr_clapet, da_pr_etanche, da_pr_branchement, da_pr_dysfonctionnement, da_pr_degradation, da_pr_entretien, da_commentaires, cl_avis, cl_classe_cbf, cl_commentaires, cl_date_avis, cl_auteur_avis, cl_date_prochain_control, cl_montant, cl_facture, cl_facture_le, maj, maj_date, "create", create_date, cloturer, photos_f, fiche_f, rapport_f, schema_f, documents_f, plan_f, cl_constat, cl_travaux, vt_commentaire, tra_vm_geomembrane, emplacement_vt_secondaire, vt_prim_type_materiau, vt_second_type_materiau) VALUES (new.id_controle, new.id_installation, new.controle_type, new.controle_ss_type, new.des_date_control, new.des_interval_control, new.des_pers_control, new.des_agent_control, new.des_installateur, new.des_refus_visite, new.des_date_installation, new.des_date_recommande, new.des_numero_recommande, new.dep_date_depot, new.dep_liste_piece, new.dep_dossier_complet, new.dep_date_envoi_incomplet, new.des_nature_projet, new.des_concepteur, new.des_ancien_disp, new.car_surface_dispo_m2, new.car_permea, new.car_valeur_permea, new.car_hydromorphie, new.car_prof_app, new.car_nappe_fond, new.car_terrain_innondable, new.car_roche_sol, new.car_dist_hab, new.car_dist_lim_par, new.car_dist_veget, new.car_dist_puit, new.des_reamenage_terrain, new.des_reamenage_immeuble, new.des_real_trvx, new.des_anc_ss_accord, new.des_collecte_ep, new.des_sep_ep_eu, new.des_eu_nb_sortie, new.des_eu_tes_regards, new.des_eu_pente_ecoul, new.des_eu_regars_acces, new.des_eu_alteration, new.des_eu_ecoulement, new.des_eu_depot_regard, new.des_commentaire, new.ts_conforme, new.ts_type_effluent, new.ts_capacite_bac, new.ts_nb_bac, new.ts_coher_taille_util, new.ts_aire_etanche, new.ts_aire_abri, new.ts_ventilation, new.ts_cuve_etanche, new.ts_val_comp, new.ts_ruissel_ep, new.ts_absence_nuisance, new.ts_respect_regles, new.ts_commentaires, new.vt_primaire, new.vt_secondaire, new.vt_prim_loc, new.vt_prim_ht, new.vt_prim_diam, new.vt_prim_type_extract, new.vt_second_loc, new.vt_second_ht, new.vt_second_diam, new.vt_second_type_extract, new.da_chasse_acces, new.da_chasse_auto, new.da_chasse_pr_nat_eau, new.da_chasse_ok, new.da_chasse_dysfonctionnement, new.da_chasse_degradation, new.da_chasse_entretien, new.da_pr_loc_pompe, new.da_pr_acces, new.da_pr_nb_pompe, new.da_pr_nat_eau, new.da_pr_ventilatio, new.da_pr_ok, new.da_pr_alarme, new.da_pr_clapet, new.da_pr_etanche, new.da_pr_branchement, new.da_pr_dysfonctionnement, new.da_pr_degradation, new.da_pr_entretien, new.da_commentaires, new.cl_avis, new.cl_classe_cbf, new.cl_commentaires, new.cl_date_avis, new.cl_auteur_avis, new.cl_date_prochain_control, new.cl_montant, new.cl_facture, new.cl_facture_le, new.maj, new.maj_date, new."create", new.create_date, new.cloturer, new.photos_f, new.fiche_f, new.rapport_f, new.schema_f, new.documents_f, new.plan_f, new.cl_constat, new.cl_travaux, new.vt_commentaire, new.tra_vm_geomembrane, new.emplacement_vt_secondaire, new.vt_prim_type_materiau, new.vt_second_type_materiau) RETURNING controle.id_controle,controle.id_installation,( SELECT (v_installation.id_com::text || '_anc_'::text) || v_installation.id_installation AS num_dossier FROM s_anc.v_installation WHERE v_installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text) AND controle.id_installation = v_installation.id_installation) AS num_dossier,controle.controle_type,controle.controle_ss_type,controle.des_date_control,controle.des_interval_control,controle.des_pers_control,controle.des_agent_control,controle.des_installateur,controle.des_refus_visite,controle.des_date_installation,controle.des_date_recommande,controle.des_numero_recommande,controle.dep_date_depot,controle.dep_liste_piece,controle.dep_dossier_complet,controle.dep_date_envoi_incomplet,controle.des_nature_projet,controle.des_concepteur,controle.des_ancien_disp,controle.car_surface_dispo_m2,controle.car_permea,controle.car_valeur_permea,controle.car_hydromorphie,controle.car_prof_app,controle.car_nappe_fond,controle.car_terrain_innondable,controle.car_roche_sol,controle.car_dist_hab,controle.car_dist_lim_par,controle.car_dist_veget,controle.car_dist_puit,controle.des_reamenage_terrain,controle.des_reamenage_immeuble,controle.des_real_trvx,controle.des_anc_ss_accord,controle.des_collecte_ep,controle.des_sep_ep_eu,controle.des_eu_nb_sortie,controle.des_eu_tes_regards,controle.des_eu_pente_ecoul,controle.des_eu_regars_acces,controle.des_eu_alteration,controle.des_eu_ecoulement,controle.des_eu_depot_regard,controle.des_commentaire,controle.ts_conforme,controle.ts_type_effluent,controle.ts_capacite_bac,controle.ts_nb_bac,controle.ts_coher_taille_util,controle.ts_aire_etanche,controle.ts_aire_abri,controle.ts_ventilation,controle.ts_cuve_etanche,controle.ts_val_comp,controle.ts_ruissel_ep,controle.ts_absence_nuisance,controle.ts_respect_regles,controle.ts_commentaires,controle.vt_primaire,controle.vt_secondaire,controle.vt_prim_loc,controle.vt_prim_ht,controle.vt_prim_diam,controle.vt_prim_type_extract,controle.vt_second_loc,controle.vt_second_ht,controle.vt_second_diam,controle.vt_second_type_extract,controle.da_chasse_acces,controle.da_chasse_auto,controle.da_chasse_pr_nat_eau,controle.da_chasse_ok,controle.da_chasse_dysfonctionnement,controle.da_chasse_degradation,controle.da_chasse_entretien,controle.da_pr_loc_pompe,controle.da_pr_acces,controle.da_pr_nb_pompe,controle.da_pr_nat_eau,controle.da_pr_ventilatio,controle.da_pr_ok,controle.da_pr_alarme,controle.da_pr_clapet,controle.da_pr_etanche,controle.da_pr_branchement,controle.da_pr_dysfonctionnement,controle.da_pr_degradation,controle.da_pr_entretien,controle.da_commentaires,controle.cl_avis,controle.cl_classe_cbf,controle.cl_commentaires,controle.cl_date_avis,controle.cl_auteur_avis,controle.cl_date_prochain_control,controle.cl_montant,controle.cl_facture,controle.cl_facture_le,controle.maj,controle.maj_date,controle."create",controle.create_date,controle.cloturer,controle.photos_f,controle.fiche_f,controle.rapport_f,controle.schema_f,controle.documents_f,controle.plan_f,controle.cl_constat,controle.cl_travaux,controle.vt_commentaire,controle.tra_vm_geomembrane,controle.emplacement_vt_secondaire,controle.vt_prim_type_materiau,controle.vt_second_type_materiau; + -- Frédéric 17/01/2019 12:04 + ALTER TABLE s_anc.traitement ADD COLUMN tra_commentaire text; + DROP VIEW s_anc.v_traitement; + CREATE OR REPLACE VIEW s_anc.v_traitement AS SELECT traitement.id_traitement,traitement.id_controle,traitement.tra_type,traitement.tra_nb,traitement.tra_long,traitement.tra_larg,traitement.tra_tot_lin,traitement.tra_surf,traitement.tra_largeur,traitement.tra_hauteur,traitement.tra_profondeur,traitement.tra_dist_hab,traitement.tra_dist_lim_parc,traitement.tra_dist_veget,traitement.tra_dist_puit,traitement.tra_vm_racine,traitement.tra_vm_humidite,traitement.tra_vm_imper,traitement.tra_vm_geogrille,traitement.tra_vm_grav_qual,traitement.tra_vm_grav_ep,traitement.tra_vm_geo_text,traitement.tra_vm_ht_terre_veget,traitement.tra_vm_tuy_perf,traitement.tra_vm_bon_mat,traitement.tra_vm_sab_ep,traitement.tra_vm_sab_qual,traitement.tra_regrep_mat,traitement.tra_regrep_affl,traitement.tra_regrep_equi,traitement.tra_regrep_perf,traitement.tra_regbl_mat,traitement.tra_regbl_affl,traitement.tra_regbl_hz,traitement.tra_regbl_epand,traitement.tra_regbl_perf,traitement.tra_regcol_mat,traitement.tra_regcol_affl,traitement.tra_regcol_hz,traitement.maj,traitement.maj_date,traitement."create",traitement.create_date,traitement.photos_f,traitement.fiche_f,traitement.schema_f,traitement.documents_f,traitement.plan_f,controle.id_installation,controle.controle_type,(installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier,traitement.tra_longueur,traitement.tra_profond,traitement.tra_commentaire FROM s_anc.traitement LEFT JOIN s_anc.controle ON traitement.id_controle = controle.id_controle LEFT JOIN s_anc.installation ON controle.id_installation = installation.id_installation WHERE installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text); + ALTER TABLE s_anc.v_traitement OWNER TO u_vitis; + GRANT ALL ON TABLE s_anc.v_traitement TO u_vitis; + GRANT ALL ON TABLE s_anc.v_traitement TO anc_admin; + GRANT ALL ON TABLE s_anc.v_traitement TO anc_user; + CREATE OR REPLACE RULE delete_v_traitement AS ON DELETE TO s_anc.v_traitement DO INSTEAD DELETE FROM s_anc.traitement WHERE traitement.id_traitement = old.id_traitement; + CREATE OR REPLACE RULE insert_v_traitement AS ON INSERT TO s_anc.v_traitement DO INSTEAD INSERT INTO s_anc.traitement (id_traitement, id_controle, tra_type, tra_nb, tra_long, tra_larg, tra_tot_lin, tra_surf, tra_largeur, tra_hauteur, tra_profondeur, tra_dist_hab, tra_dist_lim_parc, tra_dist_veget, tra_dist_puit, tra_vm_racine, tra_vm_humidite, tra_vm_imper, tra_vm_geogrille, tra_vm_grav_qual, tra_vm_grav_ep, tra_vm_geo_text, tra_vm_ht_terre_veget, tra_vm_tuy_perf, tra_vm_bon_mat, tra_vm_sab_ep, tra_vm_sab_qual, tra_regrep_mat, tra_regrep_affl, tra_regrep_equi, tra_regrep_perf, tra_regbl_mat, tra_regbl_affl, tra_regbl_hz, tra_regbl_epand, tra_regbl_perf, tra_regcol_mat, tra_regcol_affl, tra_regcol_hz, maj, maj_date, "create", create_date, photos_f, fiche_f, schema_f, documents_f, plan_f, tra_longueur, tra_profond, tra_commentaire) VALUES (new.id_traitement, new.id_controle, new.tra_type, new.tra_nb, new.tra_long, new.tra_larg, new.tra_tot_lin, new.tra_surf, new.tra_largeur, new.tra_hauteur, new.tra_profondeur, new.tra_dist_hab, new.tra_dist_lim_parc, new.tra_dist_veget, new.tra_dist_puit, new.tra_vm_racine, new.tra_vm_humidite, new.tra_vm_imper, new.tra_vm_geogrille, new.tra_vm_grav_qual, new.tra_vm_grav_ep, new.tra_vm_geo_text, new.tra_vm_ht_terre_veget, new.tra_vm_tuy_perf, new.tra_vm_bon_mat, new.tra_vm_sab_ep, new.tra_vm_sab_qual, new.tra_regrep_mat, new.tra_regrep_affl, new.tra_regrep_equi, new.tra_regrep_perf, new.tra_regbl_mat, new.tra_regbl_affl, new.tra_regbl_hz, new.tra_regbl_epand, new.tra_regbl_perf, new.tra_regcol_mat, new.tra_regcol_affl, new.tra_regcol_hz, new.maj, new.maj_date, new."create", new.create_date, new.photos_f, new.fiche_f, new.schema_f, new.documents_f, new.plan_f, new.tra_longueur, new.tra_profond, new.tra_commentaire) RETURNING traitement.id_traitement,traitement.id_controle,traitement.tra_type,traitement.tra_nb,traitement.tra_long,traitement.tra_larg,traitement.tra_tot_lin,traitement.tra_surf,traitement.tra_largeur,traitement.tra_hauteur,traitement.tra_profondeur,traitement.tra_dist_hab,traitement.tra_dist_lim_parc,traitement.tra_dist_veget,traitement.tra_dist_puit,traitement.tra_vm_racine,traitement.tra_vm_humidite,traitement.tra_vm_imper,traitement.tra_vm_geogrille,traitement.tra_vm_grav_qual,traitement.tra_vm_grav_ep,traitement.tra_vm_geo_text,traitement.tra_vm_ht_terre_veget,traitement.tra_vm_tuy_perf,traitement.tra_vm_bon_mat,traitement.tra_vm_sab_ep,traitement.tra_vm_sab_qual,traitement.tra_regrep_mat,traitement.tra_regrep_affl,traitement.tra_regrep_equi,traitement.tra_regrep_perf,traitement.tra_regbl_mat,traitement.tra_regbl_affl,traitement.tra_regbl_hz,traitement.tra_regbl_epand,traitement.tra_regbl_perf,traitement.tra_regcol_mat,traitement.tra_regcol_affl,traitement.tra_regcol_hz,traitement.maj,traitement.maj_date,traitement."create",traitement.create_date,traitement.photos_f,traitement.fiche_f,traitement.schema_f,traitement.documents_f,traitement.plan_f, ( SELECT controle.id_installation FROM s_anc.controle WHERE traitement.id_controle = controle.id_controle) AS id_installation, ( SELECT controle.controle_type FROM s_anc.controle WHERE traitement.id_controle = controle.id_controle) AS controle_type, ( SELECT (installation.id_com::text || '_anc_'::text) || installation.id_installation AS num_dossier FROM s_anc.installation WHERE installation.id_com::text ~ similar_escape(( SELECT "user".restriction FROM s_vitis."user" WHERE "user".login::name = "current_user"()), NULL::text) AND installation.id_installation = installation.id_installation) AS num_dossier,traitement.tra_longueur,traitement.tra_profond,traitement.tra_commentaire; + CREATE OR REPLACE RULE update_v_traitement AS ON UPDATE TO s_anc.v_traitement DO INSTEAD UPDATE s_anc.traitement SET id_traitement = new.id_traitement, id_controle = new.id_controle, tra_type = new.tra_type, tra_nb = new.tra_nb, tra_long = new.tra_long, tra_larg = new.tra_larg, tra_tot_lin = new.tra_tot_lin, tra_surf = new.tra_surf, tra_largeur = new.tra_largeur, tra_hauteur = new.tra_hauteur, tra_profondeur = new.tra_profondeur, tra_dist_hab = new.tra_dist_hab, tra_dist_lim_parc = new.tra_dist_lim_parc, tra_dist_veget = new.tra_dist_veget, tra_dist_puit = new.tra_dist_puit, tra_vm_racine = new.tra_vm_racine, tra_vm_humidite = new.tra_vm_humidite, tra_vm_imper = new.tra_vm_imper, tra_vm_geogrille = new.tra_vm_geogrille, tra_vm_grav_qual = new.tra_vm_grav_qual, tra_vm_grav_ep = new.tra_vm_grav_ep, tra_vm_geo_text = new.tra_vm_geo_text, tra_vm_ht_terre_veget = new.tra_vm_ht_terre_veget, tra_vm_tuy_perf = new.tra_vm_tuy_perf, tra_vm_bon_mat = new.tra_vm_bon_mat, tra_vm_sab_ep = new.tra_vm_sab_ep, tra_vm_sab_qual = new.tra_vm_sab_qual, tra_regrep_mat = new.tra_regrep_mat, tra_regrep_affl = new.tra_regrep_affl, tra_regrep_equi = new.tra_regrep_equi, tra_regrep_perf = new.tra_regrep_perf, tra_regbl_mat = new.tra_regbl_mat, tra_regbl_affl = new.tra_regbl_affl, tra_regbl_hz = new.tra_regbl_hz, tra_regbl_epand = new.tra_regbl_epand, tra_regbl_perf = new.tra_regbl_perf, tra_regcol_mat = new.tra_regcol_mat, tra_regcol_affl = new.tra_regcol_affl, tra_regcol_hz = new.tra_regcol_hz, maj = new.maj, maj_date = new.maj_date, "create" = new."create", create_date = new.create_date, photos_f = new.photos_f, fiche_f = new.fiche_f, schema_f = new.schema_f, documents_f = new.documents_f, plan_f = new.plan_f, tra_longueur = new.tra_longueur, tra_profond = new.tra_profond, tra_commentaire = new.tra_commentaire WHERE traitement.id_traitement = new.id_traitement; ]]> </code> </query>