Example #1
0
<?php

Yii::import('application.modules.ProcesosEstrategias.models.*');
Yii::import('application.modules.GradoMadurez.models.*');
Yii::import('application.modules.InventarioRiesgo.models.*');
Yii::import('application.modules.Configuracion.models.*');
//parte de arriva del  dashboard
$cantidadRiesgos = count(Riesgo::model()->findAll());
$cantidadMacroproceso = count(Macroproceso::model()->findAll());
$cantidadProceso = count(Proceso::model()->findAll());
$GradorMadurez = new UnidadNegocio();
$GradorMadurez = UnidadNegocio::model()->findAll();
$cantidadUnidadesNegocio = count($GradorMadurez);
$suma = 0;
for ($index = 0; $index < $cantidadUnidadesNegocio; $index++) {
    $suma = $suma + $GradorMadurez[$index]->evaluacion;
}
$GradorMadurez = (int) ($suma / $cantidadUnidadesNegocio);
//end
//graficas
//polar
$unidadesNegocio = UnidadNegocio::model()->findAll();
$Griesgos = GrupoRiesgo::model()->findAll();
$riesgos = Riesgo::model()->findAllByAttributes(array('estado' => 1));
//arreglo  de riesgos
$arregloUnidadNegocio = [];
$arregloGRiesgos = [];
$arregloIDGRiesgos = [];
$arregloRiesgosToltips = [];
//select  unidades de negocio
for ($index1 = 0; $index1 < count($unidadesNegocio); $index1++) {
Example #2
0
                                        <td>
                                            <?php 
    echo $value->nombre;
    ?>
                
                                        </td>

                                        <td class="text-left">
                                            <?php 
    $unidadesNegocioProceso = UnidadNegocioProceso::model()->findAllByAttributes(array('id_unidad_negocio' => $value->id_unidad_negocio));
    ?>
                                            <ul>

                                                <?php 
    foreach ($unidadesNegocioProceso as $value1) {
        $proceso = Proceso::model()->findByPk($value1->id_proceso);
        ?>
  
                                                    <li><?php 
        echo $proceso->nombre . ": " . $value1->nombre_responsable;
        ?>
 </li>
                                                    <?php 
    }
    ?>
   

                                            </ul>

                                        </td>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Proceso the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Proceso::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }