|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace v1\controllers;
|
|
|
|
|
|
+use app\models\EventoResumen;
|
|
|
use app\models\EventoResumenDependencia;
|
|
|
use common\data\Respuesta;
|
|
|
use common\rest\JsonController;
|
|
|
@@ -34,4 +35,26 @@ class EventoResumenController extends JsonController {
|
|
|
|
|
|
return new Respuesta($query, $this->limite, $this->pagina, $this->ordenar);
|
|
|
}
|
|
|
+
|
|
|
+ public function actionConsulta() {
|
|
|
+ $clave = trim($this->req->get("clave", ""));
|
|
|
+
|
|
|
+
|
|
|
+ $modelo = EventoResumen::find()
|
|
|
+ ->andWhere(['clave' => $clave])
|
|
|
+ ->one();
|
|
|
+
|
|
|
+ if ($modelo === null) {
|
|
|
+ return (new Respuesta())
|
|
|
+ ->esError()
|
|
|
+ ->mensaje("Clave no válida");
|
|
|
+ }
|
|
|
+
|
|
|
+ $query = $this->queryInicial
|
|
|
+ ->andWhere([
|
|
|
+ 'idEventoResumen' => $modelo->idEventoResumen,
|
|
|
+ ]);
|
|
|
+
|
|
|
+ return new Respuesta($query, $this->limite, $this->pagina, $this->ordenar);
|
|
|
+ }
|
|
|
}
|