Skip to content
Snippets Groups Projects
Commit 7e13849a authored by Leon A. Okida Gonçalves's avatar Leon A. Okida Gonçalves
Browse files

Add dims to second report and enrollment diagnosis routes

parent 31a83105
No related branches found
No related tags found
4 merge requests!377prd_version of simcaq,!368update filter in v2 school,!354Development,!353V2 aggregated routes
......@@ -46,6 +46,10 @@ rqf.addField({
name: 'filter',
field: false,
where: true
}).addField({
name: 'dims',
field: true,
where: false
}).addValue({
name: 'year',
table: 'simcaq_diagnostico_de_matricula',
......@@ -57,32 +61,47 @@ rqf.addField({
}
}).addValue({
name: 'city',
table: 'simcaq_diagnostico_de_matricula',
tableField: 'municipio_id',
table: 'municipio',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'municipio_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'municipio_id',
foreignTable: 'simcaq_diagnostico_de_matricula'
}
}).addValue({
}, 'dims').addValue({
name: 'state',
table: 'simcaq_diagnostico_de_matricula',
tableField: 'estado_id',
table: 'estado',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'estado_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'estado_id',
foreignTable: 'simcaq_diagnostico_de_matricula'
}
}).addValue({
}, 'dims').addValue({
name: 'school',
table: 'simcaq_diagnostico_de_matricula',
tableField: 'escola_id',
table: 'escola_agregada',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'escola_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'escola_id',
foreignTable: 'simcaq_diagnostico_de_matricula'
}
}).addValue({
}, 'dims').addValue({
name: 'education_level_short_id',
table: 'simcaq_diagnostico_de_matricula',
tableField: 'etapa',
......
......@@ -46,6 +46,10 @@ rqf.addField({
name: 'filter',
field: false,
where: true
}).addField({
name: 'dims',
field: true,
where: false
}).addValue({
name: 'year',
table: 'simcaq_relatorio_2',
......@@ -56,40 +60,55 @@ rqf.addField({
field: 'ano_censo'
}
}).addValue({
name: 'school',
table: 'simcaq_relatorio_2',
tableField: 'escola_id',
name: 'city',
table: 'municipio',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'escola_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'municipio_id',
foreignTable: 'simcaq_relatorio_2'
}
}).addValue({
name: 'city',
table:'simcaq_relatorio_2',
tableField: 'municipio_id',
}, 'dims').addValue({
name: 'state',
table: 'estado',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'municipio_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'estado_id',
foreignTable: 'simcaq_relatorio_2'
}
}).addValue({
name: 'adm_dependency',
table: 'simcaq_relatorio_2',
tableField: 'dependencia_adm_id',
}, 'dims').addValue({
name: 'school',
table: 'escola_agregada',
tableField: 'id',
where: {
relation: '=',
type: 'integer',
field: 'dependencia_adm_id'
field: 'id'
},
join: {
primary: 'id',
foreign: 'escola_id',
foreignTable: 'simcaq_relatorio_2'
}
}).addValue({
name: 'state',
}, 'dims').addValue({
name: 'adm_dependency',
table: 'simcaq_relatorio_2',
tableField: 'estado_id',
tableField: 'dependencia_adm_id',
where: {
relation: '=',
type: 'integer',
field: 'estado_id'
field: 'dependencia_adm_id'
}
});
......
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