Skip to content
Snippets Groups Projects
Commit 1f3efb19 authored by Victor Picussa's avatar Victor Picussa
Browse files

Merge branch 'school_fix' into development

parents 992d7f78 f3974d2c
No related branches found
No related tags found
No related merge requests found
Pipeline #18068 failed
...@@ -60,6 +60,18 @@ schoolApp.get('/location', cache('15 day'), (req, res, next) => { ...@@ -60,6 +60,18 @@ schoolApp.get('/location', cache('15 day'), (req, res, next) => {
next(); next();
}, response('location')); }, response('location'));
schoolApp.get('/rural_location', cache('15 day'), (req, res, next) => {
req.result = [
{id: 1, name: "Urbana"},
{id: 2, name: "Rural"},
{id: 3, name: "Rural - Área de assentamento"},
{id: 4, name: "Rural - Terra indígena"},
{id: 5, name: "Rural - Área remanescente de quilombos"},
{id: 6, name: "Rural - Unidade de uso sustentável"}
];
next();
}, response('rural_location'));
schoolApp.get('/adm_dependency', (req, res, next) => { schoolApp.get('/adm_dependency', (req, res, next) => {
req.result = []; req.result = [];
for(let i = 1; i <= 4; ++i) { for(let i = 1; i <= 4; ++i) {
...@@ -359,6 +371,16 @@ rqfCount.addField({ ...@@ -359,6 +371,16 @@ rqfCount.addField({
type: 'integer', type: 'integer',
field: 'cod_localizacao' field: 'cod_localizacao'
} }
}).addValue({
name: 'rural_location',
table: 'escola',
tableField: 'localidade_area_rural',
resultField: 'rural_location_id',
where: {
relation: '=',
type: 'integer',
field: 'localidade_area_rural'
}
}).addValue({ }).addValue({
name: 'adm_dependency', name: 'adm_dependency',
table: 'escola', table: 'escola',
...@@ -402,52 +424,52 @@ rqfCount.addField({ ...@@ -402,52 +424,52 @@ rqfCount.addField({
}).addValue({ }).addValue({
name: 'education_day_care_child', name: 'education_day_care_child',
table: 'escola', table: 'escola',
tableField: 'reg_infantil_creche', tableField: 'reg_infantil_creche_t1',
resultField: 'education_day_care_child_id', resultField: 'education_day_care_child_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
field: 'reg_infantil_creche' field: 'reg_infantil_creche_t1'
} }
}).addValue({ }).addValue({
name: 'education_preschool_child', name: 'education_preschool_child',
table: 'escola', table: 'escola',
tableField: 'reg_infantil_preescola', tableField: 'reg_infantil_preescola_t1',
resultField: 'education_preschool_child_id', resultField: 'education_preschool_child_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
field: 'reg_infantil_preescola' field: 'reg_infantil_preescola_t1'
} }
}).addValue({ }).addValue({
name: 'education_begin_elementary_school', name: 'education_begin_elementary_school',
table: 'escola', table: 'escola',
tableField: 'reg_fund_ai', tableField: 'reg_fund_ai_t1',
resultField: 'education_begin_elementary_school_id', resultField: 'education_begin_elementary_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
field: 'reg_fund_ai' field: 'reg_fund_ai_t1'
} }
}).addValue({ }).addValue({
name: 'education_end_elementary_school', name: 'education_end_elementary_school',
table: 'escola', table: 'escola',
tableField: 'reg_fund_af', tableField: 'reg_fund_af_t1',
resultField: 'education_end_elementary_school_id', resultField: 'education_end_elementary_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
field: 'reg_fund_af' field: 'reg_fund_af_t1'
} }
}).addValue({ }).addValue({
name: 'education_middle_school', name: 'education_middle_school',
table: 'escola', table: 'escola',
tableField: 'reg_medio_medio', tableField: 'reg_medio_medio_t1',
resultField: 'education_middle_school_id', resultField: 'education_middle_school_id',
where: { where: {
relation: '=', relation: '=',
type: 'boolean', type: 'boolean',
field: 'reg_medio_medio' field: 'reg_medio_medio_t1'
} }
}).addValue({ }).addValue({
name: 'education_professional', name: 'education_professional',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment