Line 148... |
Line 148... |
148 |
private function getNbObsSansIdentOuTC($mpm=false) {
|
148 |
private function getNbObsSansIdentOuTC($mpm=false) {
|
149 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
149 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
150 |
if ($this->annee != null) {
|
150 |
if ($this->annee != null) {
|
151 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
151 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
152 |
}
|
152 |
}
|
153 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR nom_sel_nn = '' OR nom_sel_nn IS NULL OR certitude IN ('aDeterminer','douteux'))";
|
153 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR nom_sel_nn = '' OR nom_sel_nn IS NULL OR certitude IN ('à déterminer','douteux'))";
|
154 |
if ($mpm) {
|
154 |
if ($mpm) {
|
155 |
$requete = $this->encapsulerMPM($requete, 'date_transmission');
|
155 |
$requete = $this->encapsulerMPM($requete, 'date_transmission');
|
156 |
}
|
156 |
}
|
157 |
$resultat = $this->bdd->recupererTous($requete);
|
157 |
$resultat = $this->bdd->recupererTous($requete);
|
158 |
return intval(array_pop($resultat[0]));
|
158 |
return intval(array_pop($resultat[0]));
|
Line 180... |
Line 180... |
180 |
private function getNbObsTC($mpm=false) {
|
180 |
private function getNbObsTC($mpm=false) {
|
181 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
181 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
182 |
if ($this->annee != null) {
|
182 |
if ($this->annee != null) {
|
183 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
183 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
184 |
}
|
184 |
}
|
185 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('aDeterminer','douteux'))";
|
185 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('à déterminer','douteux'))";
|
186 |
if ($mpm) {
|
186 |
if ($mpm) {
|
187 |
$requete = $this->encapsulerMPM($requete, 'date_transmission');
|
187 |
$requete = $this->encapsulerMPM($requete, 'date_transmission');
|
188 |
}
|
188 |
}
|
189 |
$resultat = $this->bdd->recupererTous($requete);
|
189 |
$resultat = $this->bdd->recupererTous($requete);
|
190 |
return intval(array_pop($resultat[0]));
|
190 |
return intval(array_pop($resultat[0]));
|
Line 196... |
Line 196... |
196 |
private function getNbObsTCRetenue($mpm=false) {
|
196 |
private function getNbObsTCRetenue($mpm=false) {
|
197 |
$requete = "SELECT COUNT(*) AS nb_total FROM del_commentaire WHERE proposition_retenue = 1 AND ce_observation IN (SELECT id_observation FROM del_observation WHERE";
|
197 |
$requete = "SELECT COUNT(*) AS nb_total FROM del_commentaire WHERE proposition_retenue = 1 AND ce_observation IN (SELECT id_observation FROM del_observation WHERE";
|
198 |
if ($this->annee != null) {
|
198 |
if ($this->annee != null) {
|
199 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
199 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
200 |
}
|
200 |
}
|
201 |
$requete .= " (certitude IN ('aDeterminer','douteux')))";
|
201 |
$requete .= " (certitude IN ('à déterminer','douteux')))";
|
202 |
if ($mpm) {
|
202 |
if ($mpm) {
|
203 |
// @TODO vérifier que grouper sur "date" est pertinent
|
203 |
// @TODO vérifier que grouper sur "date" est pertinent
|
204 |
// date_transmission n'est pas dispo pour grouper ici :-/
|
204 |
// date_transmission n'est pas dispo pour grouper ici :-/
|
205 |
$requete = $this->encapsulerMPM($requete);
|
205 |
$requete = $this->encapsulerMPM($requete);
|
206 |
}
|
206 |
}
|
Line 214... |
Line 214... |
214 |
private function getNbObsTCConsensus($mpm=false) {
|
214 |
private function getNbObsTCConsensus($mpm=false) {
|
215 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
215 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
216 |
if ($this->annee != null) {
|
216 |
if ($this->annee != null) {
|
217 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
217 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
218 |
}
|
218 |
}
|
219 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('aDeterminer','douteux')) AND id_observation IN"
|
219 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('à déterminer','douteux')) AND id_observation IN"
|
220 |
. " (SELECT ce_observation FROM del_commentaire WHERE proposition_initiale = 1"
|
220 |
. " (SELECT ce_observation FROM del_commentaire WHERE proposition_initiale = 1"
|
221 |
. " AND nom_sel_nn != 0"
|
221 |
. " AND nom_sel_nn != 0"
|
222 |
. " AND nom_sel_nn IS NOT NULL"
|
222 |
. " AND nom_sel_nn IS NOT NULL"
|
223 |
. " AND id_commentaire IN (SELECT ce_proposition FROM del_commentaire_vote dcv";
|
223 |
. " AND id_commentaire IN (SELECT ce_proposition FROM del_commentaire_vote dcv";
|
224 |
if ($this->annee != null) {
|
224 |
if ($this->annee != null) {
|
Line 243... |
Line 243... |
243 |
private function getNbObsTCConsensusNonValide($mpm=false) {
|
243 |
private function getNbObsTCConsensusNonValide($mpm=false) {
|
244 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
244 |
$requete = "SELECT COUNT(id_observation) AS nb_total FROM del_observation WHERE";
|
245 |
if ($this->annee != null) {
|
245 |
if ($this->annee != null) {
|
246 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
246 |
$requete .= ' YEAR(date_transmission) = ' . $this->annee . " AND";
|
247 |
}
|
247 |
}
|
248 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('aDeterminer','douteux')) AND id_observation IN"
|
248 |
$requete .= " (mots_cles_texte LIKE '%determiner%' OR certitude IN ('à déterminer','douteux')) AND id_observation IN"
|
249 |
. " (SELECT ce_observation FROM del_commentaire WHERE proposition_initiale = 1 AND proposition_retenue = 0"
|
249 |
. " (SELECT ce_observation FROM del_commentaire WHERE proposition_initiale = 1 AND proposition_retenue = 0"
|
250 |
. " AND nom_sel_nn != 0"
|
250 |
. " AND nom_sel_nn != 0"
|
251 |
. " AND nom_sel_nn IS NOT NULL"
|
251 |
. " AND nom_sel_nn IS NOT NULL"
|
252 |
. " AND id_commentaire IN (SELECT ce_proposition FROM del_commentaire_vote dcv";
|
252 |
. " AND id_commentaire IN (SELECT ce_proposition FROM del_commentaire_vote dcv";
|
253 |
if ($this->annee != null) {
|
253 |
if ($this->annee != null) {
|
Line 1072... |
Line 1072... |
1072 |
//echo "URL: $url\n\n";
|
1072 |
//echo "URL: $url\n\n";
|
1073 |
$json = $this->conteneur->getRestClient()->consulter($url);
|
1073 |
$json = $this->conteneur->getRestClient()->consulter($url);
|
1074 |
$resultat = json_decode($json, true);
|
1074 |
$resultat = json_decode($json, true);
|
1075 |
return $resultat;
|
1075 |
return $resultat;
|
1076 |
}
|
1076 |
}
|
1077 |
}
|
- |
|
1078 |
|
1077 |
}
|
- |
|
1078 |
|