Subversion Repositories eFlore/Applications.coel

Rev

Rev 1543 | Rev 1583 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1543 Rev 1572
Line 121... Line 121...
121
		
121
		
122
		// Construction de la requête
122
		// Construction de la requête
123
		$requete = 'SELECT '.(($this->distinct) ? 'DISTINCT' : '').' '.
123
		$requete = 'SELECT '.(($this->distinct) ? 'DISTINCT' : '').' '.
124
					'	cs_id_structure, '.
124
					'	cs_id_structure, '.
125
					'	SUM(csap_bota_travail_hebdo_tps) AS personnel_heure_nbre, '.
125
					'	SUM(csap_bota_travail_hebdo_tps) AS personnel_heure_nbre, '.
126
					'	cs_nom, csc_truk_stockage_parametre '.
126
					'	cs_nom, csc_truk_stockage_parametre, csv_mark_visite_avec_motif '.
127
					'FROM coel_structure '. 
127
					'FROM coel_structure '. 
128
					'	LEFT JOIN coel_structure_a_personne ON (cs_id_structure = csap_id_structure) '.
128
					'	LEFT JOIN coel_structure_a_personne ON (cs_id_structure = csap_id_structure) '.
-
 
129
		    		'	LEFT JOIN coel_structure_conservation ON (cs_id_structure = csc_id_structure) '.
129
		    		'	LEFT JOIN coel_structure_conservation ON (cs_id_structure = csc_id_structure) '.
130
					'	LEFT JOIN coel_structure_valorisation ON (cs_id_structure = csv_id_structure) '.
130
					( is_null($projet_id) ? '' : "WHERE cs_ce_projet = $projet_id ").			
131
					( is_null($projet_id) ? '' : "WHERE cs_ce_projet = $projet_id ").			
131
					'GROUP BY cs_id_structure '.
132
					'GROUP BY cs_id_structure '.
132
					'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'cs_nom ASC').' ';
133
					'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby  : 'cs_nom ASC').' ';
133
		$message_echec = "La requête a retourné aucun résultat.";
134
		$message_echec = "La requête a retourné aucun résultat.";
Line 172... Line 173...
172
				$stockage_params_nbre = $utilTruck->getNbreValeur($structure['csc_truk_stockage_parametre']);
173
				$stockage_params_nbre = $utilTruck->getNbreValeur($structure['csc_truk_stockage_parametre']);
173
				$stockage_params_nbre = empty($stockage_params_nbre) ? 0 : $stockage_params_nbre;
174
				$stockage_params_nbre = empty($stockage_params_nbre) ? 0 : $stockage_params_nbre;
174
				$collection_nbre = $collections_par_structure[$structure['cs_id_structure']];
175
				$collection_nbre = $collections_par_structure[$structure['cs_id_structure']];
175
				$collection_nbre = empty($collection_nbre) ? 0 : $collection_nbre;
176
				$collection_nbre = empty($collection_nbre) ? 0 : $collection_nbre;
176
				$personnel_heure_nbre = empty($structure['personnel_heure_nbre']) ? 0 : $structure['personnel_heure_nbre'];
177
				$personnel_heure_nbre = empty($structure['personnel_heure_nbre']) ? 0 : $structure['personnel_heure_nbre'];
-
 
178
				$visite_avec_motif_science = $structure['csv_mark_visite_avec_motif'];
Line 177... Line 179...
177
				
179
				
178
				$structure_affichage = array(
180
				$structure_affichage = array(
179
					'nom' => $nom, 
181
					'nom' => $nom, 
180
					'stockage_params' => $stockage_params,
182
					'stockage_params' => $stockage_params,
181
					'stockage_params_nbre' => $stockage_params_nbre,
183
					'stockage_params_nbre' => $stockage_params_nbre,
182
					'collection_nbre' => $collection_nbre,
184
					'collection_nbre' => $collection_nbre,
-
 
185
					'personnel_heure_nbre' => $personnel_heure_nbre,
183
					'personnel_heure_nbre' => $personnel_heure_nbre);
186
					'visite_avec_motif_science' => $visite_avec_motif_science);
Line 184... Line 187...
184
				$structure_affichage = $this->nettoyerTableau($structure_affichage);
187
				$structure_affichage = $this->nettoyerTableau($structure_affichage);
185
				
188
				
186
				$donnees['structures'][$id_structure] = $structure_affichage;
189
				$donnees['structures'][$id_structure] = $structure_affichage;