|
@@ -58,4 +58,33 @@ class EventoResumenController extends JsonController {
|
|
|
|
|
|
|
|
return new Respuesta($query, $this->limite, $this->pagina, $this->ordenar);
|
|
return new Respuesta($query, $this->limite, $this->pagina, $this->ordenar);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function actionConsulta() {
|
|
|
|
|
+ $c = $this->req->get("c", "");
|
|
|
|
|
+ $d = $this->req->get("d", "");
|
|
|
|
|
+
|
|
|
|
|
+ $modelo = null;
|
|
|
|
|
+ if ($d !== "") {
|
|
|
|
|
+ $temp = EventoResumenDependencia::find()
|
|
|
|
|
+ ->andWhere(['clave' => $d])
|
|
|
|
|
+ ->one();
|
|
|
|
|
+ if ($temp !== null) {
|
|
|
|
|
+ $modelo = $temp->eventoResumen;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($c !== "") {
|
|
|
|
|
+ $modelo = EventoResumen::find()
|
|
|
|
|
+ ->andWhere(['uuid' => $c])
|
|
|
|
|
+ ->one();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($modelo === null) {
|
|
|
|
|
+ return (new Respuesta())
|
|
|
|
|
+ ->esError()
|
|
|
|
|
+ ->mensaje("ID no válida");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return new Respuesta($modelo);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|