Skip to content
Snippets Groups Projects
Commit 3662081d authored by Fernando Gbur dos Santos's avatar Fernando Gbur dos Santos
Browse files

[FIX] Fixing instruction level convert and region filter

parent 554b3e4c
No related branches found
No related tags found
3 merge requests!391Hom -> Prod,!388development -> homologa,!387new_pnad -> development
......@@ -34,7 +34,7 @@ module.exports = function instructionLevel(id) {
return 'Superior incompleto ou equivalente';
case 7:
return 'Superior completo ou equivalente';
case 8:
case 99:
return 'Não se aplica - 17 anos ou menos';
}
};
......@@ -465,23 +465,17 @@ rqf.addField({
type: 'integer',
field: 'microrregiao_id'
}
}).addValueToField({
}).addValue({
name: 'region',
table: 'estado',
tableField: 'regiao_id',
resultField: 'region_id',
table: 'pnad_novo',
tableField: 'cod_regiao',
resultField: 'reg_code_id',
where: {
relation: '=',
type: 'integer',
field: 'regiao_id',
table: 'estado'
},
join: {
primary: 'id',
foreign: 'estado_id',
foreignTable: 'municipio'
field: 'cod_regiao',
}
}, 'filter');
});
PnadNovoApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.sql.from('pnad_novo')
......
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