Skip to content
Snippets Groups Projects
Commit e834d9f8 authored by Guiusepe's avatar Guiusepe
Browse files

added route to enter_situation

parent e9d423ef
No related branches found
No related tags found
3 merge requests!309Merge new updates into master,!279Homologa,!278Enrollment situation tmp
Pipeline #28119 failed
......@@ -736,9 +736,18 @@ universityEnrollmentApp.get('/', rqf.parse(), (req, res, next) => {
}
next()
}, response('universityEnrollment'));
universityEnrollmentApp.get('/enter_situation ', rqf.parse(), (req, res, next) => {
universityEnrollmentApp.get('/enter_situation ', rqf.parse(), (req, res, next) => {
req.sql.from('localoferta_ens_superior_matricula2')
.field('SUM(CASE WHEN cod_aluno_situacao=2 THEN 1 ELSE 0 END)', 'cursando')
.field('SUM(CASE WHEN cod_aluno_situacao=6 THEN 1 ELSE 0 END)', 'concluinte')
.field('SUM(CASE WHEN cod_aluno_situacao=4 OR cod_aluno_situacao=5 OR cod_aluno_situacao=7 THEN 1 ELSE 0 END)', 'evadido')
.field('SUM(CASE WHEN cod_aluno_situacao=3 THEN 1 ELSE 0 END)', 'trancado')
.field('COUNT(*)', 'total')
.where('ano_censo=2018')
.where('cod_nivel_academico=1')
.where('cod_grau_academico=2 OR cod_grau_academico=4')
.where('localoferta_cod_uf=41')
next()
}, rqf.build(), query, id2str.transform(), response('universityEnrollment'));
module.exports = universityEnrollmentApp;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment