Skip to content
Snippets Groups Projects
Commit 47e5d250 authored by jpko19's avatar jpko19
Browse files

Fix pee_por_categoria(4)

parent 48441f1f
No related branches found
No related tags found
3 merge requests!329Update enrollment - new filters,!324Dev,!309Merge new updates into master
......@@ -767,11 +767,22 @@ rqf.addField({
type: 'boolean',
field: 'possui_necessidade_especial'
}
}).addValueToField({
name: 'pee_por_categoria',
table: 'matricula',
tableField: '',
resultField: 'pee_por_categoria',
where: {
relation: '=',
type: 'boolean',
field: ''
}
});
enrollmentApp.get('/', rqf.parse(), (req, res, next) => {
console.log(req.dims)
if('pee_por_categoria' in req.dims){
delete req.dims.pee_por_categoria
req.sql.field('SUM(CASE WHEN cegueira = true THEN 1 ELSE 0)', 'total_cegueira')
.field('SUM(CASE WHEN baixa_visao = true THEN 1 ELSE 0)', 'total_baixa_visao')
.field('SUM(CASE WHEN surdez = true THEN 1 ELSE 0)', 'total_surdez')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment