Skip to content
Snippets Groups Projects
Commit 82a9fe96 authored by João Kieras's avatar João Kieras
Browse files

Update school filter(2)

parent 49d521ab
No related branches found
No related tags found
4 merge requests!335Homologa,!334Dev,!331Issue 752 aee,!309Merge new updates into master
...@@ -118,7 +118,7 @@ rqf.addField({ ...@@ -118,7 +118,7 @@ rqf.addField({
foreignTable: 'numero_estudantes_aee' foreignTable: 'numero_estudantes_aee'
} }
}).addValueToField({ }).addValueToField({
name: 'school', name: 'school', // working
table: 'escola', table: 'escola',
tableField: ['nome_escola', 'id'], tableField: ['nome_escola', 'id'],
resultField: ['school_name', 'school_id'], resultField: ['school_name', 'school_id'],
...@@ -206,10 +206,10 @@ rqf.addField({ ...@@ -206,10 +206,10 @@ rqf.addField({
studentsAeeApp.get('/', rqf.parse(), (req, res, next) => { studentsAeeApp.get('/', rqf.parse(), (req, res, next) => {
req.sql.from('numero_estudantes_aee') req.sql.from('numero_estudantes_aee')
.field('ano_censo') .field('numero_estudantes_aee.ano_censo')
.field('COUNT(distinct id_aluno)', 'total') .field('COUNT(distinct numero_estudantes_aee.id_aluno)', 'total')
.group('ano_censo') .group('numero_estudantes_aee.ano_censo')
.order('ano_censo') .order('numero_estudantes_aee.ano_censo')
next(); next();
}, rqf.build(), (req, res, next) => { }, rqf.build(), (req, res, next) => {
console.log(req.sql.toString()); console.log(req.sql.toString());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment