Skip to content
Snippets Groups Projects
Commit bb1b25e3 authored by Pietro Cavassin's avatar Pietro Cavassin
Browse files

hotfix add taxa_evasao

parent 28149f4c
No related branches found
No related tags found
2 merge requests!309Merge new updates into master,!279Homologa
......@@ -781,10 +781,12 @@ universityEnrollmentApp.get('/enter_situation', rqf.parse(), (req, res, next) =>
res.concluinte = Number(res.concluinte);
res.evadido = Number(res.evadido);
res.trancado = Number(res.trancado);
res.total = res.cursando + res.concluinte + res.evadido + res.trancado
res.taxa_evasao = Number(res.evadido/res.total)
}
next();
}, id2str.transform(), response('enterSituation'));
module.exports = universityEnrollmentApp;
universityEnrollmentApp.get('/enrollment_situation', rqf.parse(), (req, res, next) => {
req.sql.from('localoferta_ens_superior_matricula')
.field('SUM(CASE WHEN localoferta_ens_superior_matricula.cod_aluno_situacao=2 AND localoferta_ens_superior_matricula.ingressante=1 THEN 1 ELSE 0 END)', 'ingressante')
......@@ -808,3 +810,5 @@ universityEnrollmentApp.get('/enrollment_situation', rqf.parse(), (req, res, nex
next();
}, id2str.transform(), response('enrollmentSituation'));
module.exports = universityEnrollmentApp;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment