From 87332cdcf4d3447588575a9aaff08f3891152fe3 Mon Sep 17 00:00:00 2001 From: Pietro <ppc19@inf.ufpr.br> Date: Mon, 11 Apr 2022 09:46:17 -0300 Subject: [PATCH] edit base consult filters --- src/libs/routes/auxiliar.js | 2 +- src/libs/routes/teacher.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/routes/auxiliar.js b/src/libs/routes/auxiliar.js index 5a4198d3..08a910e5 100644 --- a/src/libs/routes/auxiliar.js +++ b/src/libs/routes/auxiliar.js @@ -370,7 +370,7 @@ auxiliarApp.get('/', rqf.parse(), (req, res, next) => { .where('(docente.tipo_docente = 2) AND \ ((docente.tipo_turma_id >= 0 AND docente.tipo_turma_id <= 3 AND docente.tipo_turma_atendimento_id is NULL) \ OR ((docente.tipo_turma_atendimento_id = 1 OR docente.tipo_turma_atendimento_id = 2) AND docente.tipo_turma_id is NULL)) \ - AND (docente.ano_censo <> 2009 or docente.escola_estado_id <> 42)'); // não devemos trazer SC em 2009. + AND (docente.ano_censo <> 2009 or (docente.escola_estado_id <> 42 AND docente.escola_estado_id <> 43))'); // não devemos trazer SC em 2009. next(); }, rqf.build(), query, addMissing(rqf), id2str.transform(), response('auxiliar')); diff --git a/src/libs/routes/teacher.js b/src/libs/routes/teacher.js index 2ce66328..05f31222 100644 --- a/src/libs/routes/teacher.js +++ b/src/libs/routes/teacher.js @@ -532,7 +532,7 @@ teacherApp.get('/', rqf.parse(), (req, res, next) => { .where('(docente.tipo_docente = 1 OR docente.tipo_docente = 5) AND \ ((docente.tipo_turma_id >= 0 AND docente.tipo_turma_id <= 3 AND docente.tipo_turma_atendimento_id is NULL) \ OR ((docente.tipo_turma_atendimento_id = 1 OR docente.tipo_turma_atendimento_id = 2) AND docente.tipo_turma_id is NULL)) \ - AND (docente.ano_censo <> 2009 or docente.escola_estado_id <> 42)'); // não devemos trazer SC em 2009. + AND (docente.ano_censo <> 2009 or (docente.escola_estado_id <> 42 and docente.escola_estado_id <> 43) )'); // não devemos trazer SC em 2009. // if("education_level_mod" in req.dims) { // req.hadEducationLevelMod = true; -- GitLab