Line 86... |
Line 86... |
86 |
* - Nombre d'obs avec tag à déterminer ou certitude incertaine et avec consensus mais non validées
|
86 |
* - Nombre d'obs avec tag à déterminer ou certitude incertaine et avec consensus mais non validées
|
87 |
* - Nombre d'observations ayant une proposition retenue (parmi les observations de l'année)
|
87 |
* - Nombre d'observations ayant une proposition retenue (parmi les observations de l'année)
|
88 |
* - Nombre d'observations ayant une proposition retenue ou en consensus (parmi les observations de l'année)
|
88 |
* - Nombre d'observations ayant une proposition retenue ou en consensus (parmi les observations de l'année)
|
89 |
*/
|
89 |
*/
|
90 |
private function getObservations() {
|
90 |
private function getObservations() {
|
- |
|
91 |
$nbObsTotal = $this->getNbObsTotal();
|
- |
|
92 |
$nbObsSansIdentOuTC = $this->getNbObsSansIdentOuTC();
|
- |
|
93 |
$nbObsSansIdent = $this->getNbObsSansIdent();
|
- |
|
94 |
$nbObsTC = $this->getNbObsTC();
|
- |
|
95 |
$nbObsTCRetenue = $this->getNbObsTCRetenue();
|
- |
|
96 |
$nbObsTCConsensus = $this->getNbObsTCConsensus();
|
- |
|
97 |
$nbObsTCConsensusNonValide = $this->getNbObsTCConsensusNonValide();
|
- |
|
98 |
$nbPropositionsRetenuesObsAnnee = $this->getNbPropositionsRetenuesObsAnnee();
|
- |
|
99 |
$nbPropositionsConsensusObsAnnee = $this->getNbPropositionsConsensusObsAnnee();
|
91 |
return array(
|
100 |
return array(
|
92 |
'nbObsTotal' => $this->getNbObsTotal(),
|
101 |
'nbObsTotal' => $nbObsTotal,
|
93 |
'nbObsTotalMPM' => $this->getNbObsTotal(true),
|
102 |
'nbObsTotalMPM' => $this->getNbObsTotal(true),
|
94 |
'nbObsSansIdentOuTC' => $this->getNbObsSansIdentOuTC(),
|
103 |
'nbObsSansIdentOuTC' => $nbObsSansIdentOuTC,
|
95 |
'nbObsSansIdentOuTCMPM' => $this->getNbObsSansIdentOuTC(true),
|
104 |
'nbObsSansIdentOuTCMPM' => $this->getNbObsSansIdentOuTC(true),
|
- |
|
105 |
'nbObsSansIdentOuTCPC' => round(($nbObsSansIdentOuTC / $nbObsTotal) * 100, 2),
|
96 |
'nbObsSansIdent' => $this->getNbObsSansIdent(),
|
106 |
'nbObsSansIdent' => $nbObsSansIdent,
|
97 |
'nbObsSansIdentMPM' => $this->getNbObsSansIdent(true),
|
107 |
'nbObsSansIdentMPM' => $this->getNbObsSansIdent(true),
|
- |
|
108 |
'nbObsSansIdentPC' => round(($nbObsSansIdent / $nbObsTotal) * 100, 2),
|
98 |
'nbObsTC' => $this->getNbObsTC(),
|
109 |
'nbObsTC' => $nbObsTC,
|
99 |
'nbObsTCMPM' => $this->getNbObsTC(true),
|
110 |
'nbObsTCMPM' => $this->getNbObsTC(true),
|
- |
|
111 |
'nbObsTCPC' => round(($nbObsTC / $nbObsTotal) * 100, 2),
|
100 |
'nbObsTCRetenue' => $this->getNbObsTCRetenue(),
|
112 |
'nbObsTCRetenue' => $nbObsTCRetenue,
|
101 |
'nbObsTCRetenueMPM' => $this->getNbObsTCRetenue(true),
|
113 |
'nbObsTCRetenueMPM' => $this->getNbObsTCRetenue(true),
|
- |
|
114 |
'nbObsTCRetenuePC' => round(($nbObsTCRetenue / $nbObsTotal) * 100, 2),
|
102 |
'nbObsTCConsensus' => $this->getNbObsTCConsensus(),
|
115 |
'nbObsTCConsensus' => $nbObsTCConsensus,
|
103 |
'nbObsTCConsensusMPM' => $this->getNbObsTCConsensus(true),
|
116 |
'nbObsTCConsensusMPM' => $this->getNbObsTCConsensus(true),
|
- |
|
117 |
'nbObsTCConsensusPC' => round(($nbObsTCConsensus / $nbObsTotal) * 100, 2),
|
104 |
'nbObsTCConsensusNonValide' => $this->getNbObsTCConsensusNonValide(),
|
118 |
'nbObsTCConsensusNonValide' => $nbObsTCConsensusNonValide,
|
105 |
'nbObsTCConsensusNonValideMPM' => $this->getNbObsTCConsensusNonValide(true),
|
119 |
'nbObsTCConsensusNonValideMPM' => $this->getNbObsTCConsensusNonValide(true),
|
- |
|
120 |
'nbObsTCConsensusNonValidePC' => round(($nbObsTCConsensusNonValide / $nbObsTotal) * 100, 2),
|
106 |
'nbPropositionsRetenuesObsAnnee' => $this->getNbPropositionsRetenuesObsAnnee(),
|
121 |
'nbPropositionsRetenuesObsAnnee' => $nbPropositionsRetenuesObsAnnee,
|
107 |
'nbPropositionsRetenuesObsAnneeMPM' => $this->getNbPropositionsRetenuesObsAnnee(true),
|
122 |
'nbPropositionsRetenuesObsAnneeMPM' => $this->getNbPropositionsRetenuesObsAnnee(true),
|
- |
|
123 |
'nbPropositionsRetenuesObsAnneePC' => round(($nbPropositionsRetenuesObsAnnee / $nbObsTotal) * 100, 2),
|
108 |
'nbPropositionsConsensusObsAnnee' => $this->getNbPropositionsConsensusObsAnnee(),
|
124 |
'nbPropositionsConsensusObsAnnee' => $nbPropositionsConsensusObsAnnee,
|
109 |
'nbPropositionsConsensusObsAnneeMPM' => $this->getNbPropositionsConsensusObsAnnee(true),
|
125 |
'nbPropositionsConsensusObsAnneeMPM' => $this->getNbPropositionsConsensusObsAnnee(true),
|
- |
|
126 |
'nbPropositionsConsensusObsAnneePC' => round(($nbPropositionsConsensusObsAnnee / $nbObsTotal) * 100, 2),
|
110 |
);
|
127 |
);
|
111 |
}
|
128 |
}
|
Line 112... |
Line 129... |
112 |
|
129 |
|
113 |
/**
|
130 |
/**
|
Line 397... |
Line 414... |
397 |
|
414 |
|
398 |
/**
|
415 |
/**
|
399 |
* Nombre d'observations ayant une proposition retenue ou en consensus (parmi les observations de l'année)
|
416 |
* Nombre d'observations ayant une proposition retenue ou en consensus (parmi les observations de l'année)
|
400 |
*/
|
417 |
*/
|
- |
|
418 |
private function getNbPropositionsRetenuesObsAnnee($mpm=false) {
|
401 |
private function getNbPropositionsRetenuesObsAnnee($mpm=false) {
|
419 |
$requete = "SELECT COUNT(DISTINCT ce_observation) AS nb_total FROM del_commentaire WHERE ";
|
402 |
if ($this->annee == null) {
|
420 |
if ($this->annee != null) {
|
403 |
return null;
|
421 |
$requete .= "YEAR(date) = " . $this->annee . " AND ";
|
404 |
}
|
422 |
}
|
- |
|
423 |
$requete .= "proposition_retenue = 1 AND ce_observation in (SELECT id_observation FROM del_observation ";
|
405 |
$requete = "SELECT COUNT(DISTINCT ce_observation) AS nb_total FROM del_commentaire WHERE YEAR(date) = " . $this->annee . " AND "
|
424 |
if ($this->annee != null) {
|
- |
|
425 |
$requete .= "WHERE year(date_transmission) = " . $this->annee;
|
- |
|
426 |
}
|
406 |
. "proposition_retenue = 1 AND ce_observation in (SELECT id_observation FROM del_observation WHERE year(date_transmission) = " . $this->annee . ")";
|
427 |
$requete .= ")";
|
407 |
if ($mpm) {
|
428 |
if ($mpm) {
|
408 |
$requete = $this->encapsulerMPM($requete);
|
429 |
$requete = $this->encapsulerMPM($requete);
|
409 |
}
|
430 |
}
|
410 |
$resultat = $this->bdd->recupererTous($requete);
|
431 |
$resultat = $this->bdd->recupererTous($requete);
|
Line 413... |
Line 434... |
413 |
|
434 |
|
414 |
/**
|
435 |
/**
|
415 |
* Nombre de proposition en consensus faites sur les observations d'une année
|
436 |
* Nombre de proposition en consensus faites sur les observations d'une année
|
416 |
*/
|
437 |
*/
|
417 |
private function getNbPropositionsConsensusObsAnnee($mpm=false) {
|
- |
|
418 |
if ($this->annee == null) {
|
- |
|
419 |
return null;
|
- |
|
420 |
}
|
438 |
private function getNbPropositionsConsensusObsAnnee($mpm=false) {
|
- |
|
439 |
$requete = "SELECT COUNT(DISTINCT ce_observation) AS nb_total FROM del_commentaire dc WHERE ce_observation in ("
|
- |
|
440 |
. " SELECT id_observation FROM del_observation ";
|
421 |
$requete = "SELECT COUNT(DISTINCT ce_observation) AS nb_total FROM del_commentaire dc WHERE ce_observation in ("
|
441 |
if ($this->annee != null) {
|
- |
|
442 |
$requete .= "WHERE year(date_transmission) = " . $this->annee ;
|
- |
|
443 |
}
|
422 |
. " SELECT id_observation FROM del_observation WHERE year(date_transmission) = " . $this->annee . ") AND ("
|
444 |
$requete .= ") AND ("
|
423 |
. " dc.proposition_retenue = 1 OR (dc.proposition_initiale = 1"
|
445 |
. " dc.proposition_retenue = 1 OR (dc.proposition_initiale = 1"
|
424 |
. " AND dc.nom_sel_nn != 0 AND dc.nom_sel_nn IS NOT NULL AND dc.id_commentaire IN"
|
446 |
. " AND dc.nom_sel_nn != 0 AND dc.nom_sel_nn IS NOT NULL AND dc.id_commentaire IN"
|
- |
|
447 |
. " (SELECT ce_proposition FROM del_commentaire_vote dcv";
|
425 |
. " (SELECT ce_proposition FROM del_commentaire_vote dcv"
|
448 |
if ($this->annee != null) {
|
- |
|
449 |
$requete .= " WHERE year(date) <= " . $this->annee;
|
426 |
. " WHERE year(date) <= " . $this->annee
|
450 |
}
|
427 |
. " GROUP BY ce_proposition"
|
451 |
$requete .= " GROUP BY ce_proposition"
|
428 |
. " HAVING SUM(CASE"
|
452 |
. " HAVING SUM(CASE"
|
429 |
. " WHEN valeur = 1 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' != 0 THEN 3"
|
453 |
. " WHEN valeur = 1 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' != 0 THEN 3"
|
430 |
. " WHEN valeur = 0 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' != 0 THEN -3"
|
454 |
. " WHEN valeur = 0 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' != 0 THEN -3"
|
431 |
. " WHEN valeur = 1 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' = 0 THEN 1"
|
455 |
. " WHEN valeur = 1 AND dcv.ce_utilisateur REGEXP '^-?[0-9]+$' = 0 THEN 1"
|