Commit bd3b8eb3e17719dc18f921510023d9ffa8351e1d

Authored by Caroline Salib
1 parent ccb6c435
Exists in master

Ajustad busca de matrícula;

portabilis/ieducar#167
ieducar/modules/Api/Views/MatriculaController.php
@@ -66,7 +66,7 @@ class MatriculaController extends ApiCoreController @@ -66,7 +66,7 @@ class MatriculaController extends ApiCoreController
66 pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and 66 pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and
67 pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and 67 pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and
68 matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and 68 matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and
69 - (matricula.cod_matricula like $1||'%' or matricula.ref_cod_aluno like $1||'%') and 69 + (matricula.cod_matricula::varchar like $1||'%' or matricula.ref_cod_aluno::varchar like $1||'%') and
70 (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and 70 (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and
71 (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15"; 71 (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15";
72 } 72 }
@@ -79,7 +79,7 @@ class MatriculaController extends ApiCoreController @@ -79,7 +79,7 @@ class MatriculaController extends ApiCoreController
79 pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and 79 pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and
80 pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and 80 pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and
81 matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and 81 matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and
82 - lower(to_ascii(pessoa.nome)) like lower(to_ascii($1))||'%' and 82 + lower(pessoa.nome) like lower($1)||'%' and
83 (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and 83 (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and
84 (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15"; 84 (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15";
85 } 85 }
@@ -198,7 +198,7 @@ class MatriculaController extends ApiCoreController @@ -198,7 +198,7 @@ class MatriculaController extends ApiCoreController
198 $objBanco = new clsBanco(); 198 $objBanco = new clsBanco();
199 $frequencia = $objBanco->unicoCampo(" SELECT modules.frequencia_da_matricula({$cod_matricula}); "); 199 $frequencia = $objBanco->unicoCampo(" SELECT modules.frequencia_da_matricula({$cod_matricula}); ");
200 return array('frequencia' => $frequencia); 200 return array('frequencia' => $frequencia);
201 - } 201 + }
202 202
203 protected function deleteAbandono() { 203 protected function deleteAbandono() {
204 if ($this->canDeleteAbandono()) { 204 if ($this->canDeleteAbandono()) {