Skip to content
Snippets Groups Projects
Commit e9274d38 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Merge branch 'hotfix_school_code'

parents a17985f5 f8e600ad
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -325,7 +325,22 @@ rqfCount.addField({ ...@@ -325,7 +325,22 @@ rqfCount.addField({
type: 'boolean', type: 'boolean',
field: 'tempo_integral' field: 'tempo_integral'
} }
}).addValue({ }).addValueToField({
name: 'school',
table: 'escola',
tableField: ['nome_escola', 'id'],
resultField: ['school_name', 'school_id'],
where: {
relation: '=',
type: 'integer',
field: 'id'
},
join: {
primary: ['id', 'ano_censo'],
foreign: ['escola_id', 'ano_censo'],
foreignTable: 'turma'
}
}, 'dims').addValueToField({
name: 'school', name: 'school',
table: 'escola', table: 'escola',
tableField: 'nome_escola', tableField: 'nome_escola',
...@@ -340,7 +355,7 @@ rqfCount.addField({ ...@@ -340,7 +355,7 @@ rqfCount.addField({
foreign: ['escola_id', 'ano_censo'], foreign: ['escola_id', 'ano_censo'],
foreignTable: 'turma' foreignTable: 'turma'
} }
}); }, 'filter');
classApp.get('/', rqfCount.parse(), rqfCount.build(), (req, res, next) => { classApp.get('/', rqfCount.parse(), rqfCount.build(), (req, res, next) => {
......
...@@ -296,7 +296,22 @@ rqf.addField({ ...@@ -296,7 +296,22 @@ rqf.addField({
foreign: 'escola_municipio_id', foreign: 'escola_municipio_id',
foreignTable: 'docente' foreignTable: 'docente'
} }
}, 'filter').addValue({ }, 'filter').addValueToField({
name: 'school',
table: 'escola',
tableField: ['nome_escola', 'id'],
resultField: ['school_name', 'school_id'],
where: {
relation: '=',
type: 'integer',
field: 'id'
},
join: {
primary: ['id', 'ano_censo'],
foreign: ['escola_id', 'ano_censo'],
foreignTable: 'docente'
}
}, 'dims').addValueToField({
name: 'school', name: 'school',
table: 'escola', table: 'escola',
tableField: 'nome_escola', tableField: 'nome_escola',
...@@ -311,7 +326,7 @@ rqf.addField({ ...@@ -311,7 +326,7 @@ rqf.addField({
foreign: ['escola_id', 'ano_censo'], foreign: ['escola_id', 'ano_censo'],
foreignTable: 'docente' foreignTable: 'docente'
} }
}).addValue({ }, 'filter').addValue({
name: 'location', name: 'location',
table: 'docente', table: 'docente',
tableField: 'cod_localizacao', tableField: 'cod_localizacao',
......
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