/[openfoncier]/trunk/sql/pgsql/dossier_cadastre_date.reqmo.inc.php
ViewVC logotype

Annotation of /trunk/sql/pgsql/dossier_cadastre_date.reqmo.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1138 - (hide annotations)
Thu Jan 3 15:18:21 2013 UTC (12 years, 1 month ago) by nhaye
File size: 6767 byte(s)
Suppression de la colonne nature de la table dossier,
correction des requètes sql faisant appel à cette colonne.

1 fraynaud 3 <?php
2     $reqmo['libelle']="dossier depose";
3 nhaye 1138 $reqmo['sql']="SELECT dossier,
4     [dossier_autorisation_type_detaille.code as nature],
5     [dossier.etat as etat],
6 fraynaud 3 [types],
7     [objet_dossier],
8 fraynaud 198 [to_char(date_demande,'DD/MM/YYYY') as date_demande],
9     [to_char(date_depot,'DD/MM/YYYY') as date_depot],
10     [to_char(date_complet,'DD/MM/YYYY') as date_complet],
11     [to_char(date_rejet,'DD/MM/YYYY') as date_rejet],
12     [to_char(date_notification_delai,'DD/MM/YYYY') as date_notification_delai],
13 fraynaud 3 [delai],
14 fraynaud 198 [to_char(date_limite,'DD/MM/YYYY') as date_limite],
15 fraynaud 3 [accord_tacite],
16 fraynaud 198 [to_char(date_decision,'DD/MM/YYYY') as date_decision],
17 vpihour 489 [avis_decision],
18 fraynaud 198 [to_char(date_validite,'DD/MM/YYYY') as date_validite],
19     [to_char(date_chantier,'DD/MM/YYYY') as date_chantier],
20     [to_char(date_achevement,'DD/MM/YYYY') as date_achevement],
21     [to_char(date_conformite,'DD/MM/YYYY') as date_conformite],
22 fraynaud 3 [categorie_demandeur.libelle as categorie],
23     [demandeur_civilite],
24     [demandeur_nom],
25     [demandeur_societe],
26     [demandeur_adresse],
27     [demandeur_cp],
28     [demandeur_ville],
29     [demandeur_pays],
30     [terrain_numero],
31     [terrain_numero_complement],
32     [terrain_adresse],
33     [terrain_adresse_complement],
34     [terrain_cp],
35     [terrain_ville],
36 nhaye 1138 [terrain_surface],
37     [terrain_surface_calcul],
38 fraynaud 3 [rivoli],
39     [travaux.libelle as travaux],
40     [parcelle],
41     [batiment_nombre],
42     [logement_nombre],
43     [shon],
44 nhaye 1138 [shon_calcul],
45     [shob],
46 fraynaud 3 [lot],
47     [hauteur],
48 nhaye 1138 [piece_nombre],
49 fraynaud 3 [amenagement],
50 nhaye 1138 [pos],
51     [temp1]
52     FROM ".DB_PREFIXE."dossier
53     INNER JOIN ".DB_PREFIXE."dossier_autorisation
54     ON dossier.dossier_autorisation=dossier_autorisation.dossier_autorisation
55     INNER JOIN ".DB_PREFIXE."dossier_autorisation_type_detaille
56     ON dossier_autorisation.dossier_autorisation_type_detaille
57     = dossier_autorisation_type_detaille.dossier_autorisation_type_detaille
58     LEFT JOIN ".DB_PREFIXE."travaux
59     ON travaux.travaux = dossier.travaux
60     LEFT JOIN ".DB_PREFIXE."categorie_demandeur
61     ON categorie_demandeur.categorie_demandeur= dossier.demandeur_categorie";
62     $reqmo['sql'].= " where dossier_autorisation_type_detaille.code = '[selection]'";
63 fraynaud 3 $reqmo['sql'].= " and date_depot>='[datedebut]'";
64     $reqmo['sql'].= " and date_depot<='[datefin]'";
65    
66     /*
67     where dossier.nature = '[selection]' and types ='initial'
68 vpihour 489 and (avis_decision like 'F%' or avis_decision like 'T%')
69 fraynaud 3 order by [tri]";
70     */
71     /*
72     $sousetat['sql']="SELECT concat('".$commune."',' ',dossier) as dossier,concat(substring(date_depot,9,2),'-',substring(date_depot,6,2),'-',substring(date_depot,1,4)) as date_depot,concat(demandeur_civilite,' ',demandeur_nom) as nom_demandeur,";
73     $sousetat['sql']=$sousetat['sql']." concat(terrain_numero,' ',terrain_numero_complement,' ',terrain_adresse,' ',terrain_adresse_complement,' ',terrain_cp,' ',terrain_ville) as adresse_terrain,";
74     $sousetat['sql']=$sousetat['sql']." shon as SHON,logement_nombre as nb_logt";
75     $sousetat['sql']=$sousetat['sql']." FROM dossier";
76     $sousetat['sql']=$sousetat['sql']." WHERE ";
77     if ($_GET["nature"]=='tous'){
78     $sousetat['sql']=$sousetat['sql']." date_depot>='".substr($_GET["datedebut"],6,4)."-".substr($_GET["datedebut"],3,2)."-".substr($_GET["datedebut"],0,2)."'";
79     $sousetat['sql']=$sousetat['sql']." AND date_depot<='".substr($_GET["datefin"],6,4)."-".substr($_GET["datefin"],3,2)."-".substr($_GET["datefin"],0,2)."'";
80     }else{
81     $sousetat['sql']=$sousetat['sql']." nature='".$_GET["nature"]."'";
82     $sousetat['sql']=$sousetat['sql']." AND (date_depot>='".substr($_GET["datedebut"],6,4)."-".substr($_GET["datedebut"],3,2)."-".substr($_GET["datedebut"],0,2)."'";
83     $sousetat['sql']=$sousetat['sql']." AND date_depot<='".substr($_GET["datefin"],6,4)."-".substr($_GET["datefin"],3,2)."-".substr($_GET["datefin"],0,2)."')";
84     }
85    
86     */
87    
88 nhaye 1138 $reqmo['selection']= array('PCI','PCA','PD','DP','PA','CU','AZ','DAT');
89 fraynaud 3 $reqmo['tri']= array('dossier','etat','demandeur_nom');
90     //
91    
92     $reqmo['nature']="checked";
93     $reqmo['etat']="checked";
94     $reqmo['types']="checked";
95     $reqmo['objet_dossier']="checked";
96     $reqmo['date_demande']="checked";
97     $reqmo['date_depot']="checked";
98     $reqmo['date_complet']="checked";
99     $reqmo['date_rejet']="checked";
100     $reqmo['date_notification_delai']="checked";
101     $reqmo['delai']="checked";
102     $reqmo['date_limite']="checked";
103     $reqmo['accord_tacite']="checked";
104     $reqmo['date_decision']="checked";
105 vpihour 489 $reqmo['avis_decision']="checked";
106 fraynaud 3 $reqmo['date_validite']="checked";
107     $reqmo['date_chantier']="checked";
108     $reqmo['date_achevement']="checked";
109     $reqmo['date_conformite']="checked";
110     $reqmo['demandeur_civilite']="checked";
111     $reqmo['demandeur_nom']="checked";
112     $reqmo['demandeur_societe']="checked";
113     $reqmo['demandeur_adresse']="checked";
114     $reqmo['demandeur_cp']="checked";
115     $reqmo['demandeur_ville']="checked";
116     $reqmo['demandeur_pays']="checked";
117     $reqmo['terrain_numero']="checked";
118     $reqmo['terrain_numero_complement']="checked";
119     $reqmo['terrain_adresse']="checked";
120     $reqmo['terrain_adresse_complement']="checked";
121     $reqmo['terrain_cp']="checked";
122     $reqmo['terrain_ville']="checked";
123     $reqmo['terrain_surface']="checked";
124     $reqmo['terrain_surface_calcul']="checked";
125     $reqmo['rivoli']="checked";
126     $reqmo['travaux']="checked";
127     $reqmo['parcelle']="checked";
128     $reqmo['batiment_nombre']="checked";
129     $reqmo['logement_nombre']="checked";
130     $reqmo['shon']="checked";
131     $reqmo['shon_calcul']="checked";
132     $reqmo['shob']="checked";
133     $reqmo['lot']="checked";
134     $reqmo['hauteur']="checked";
135     $reqmo['piece_nombre']="checked";
136     $reqmo['amenagement']="checked";
137     $reqmo['categorie']="checked";
138     $reqmo['pos']="checked";
139     $reqmo['temp1']="checked";
140     //$reqmo['datedebut']="";
141     //$reqmo['datefin']="";
142     ?>

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26