Skip to content
Snippets Groups Projects

V1.8.0

Merged Fernando Erd requested to merge v1.8.0 into master
2 files
+ 33
10
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 32
10
@@ -60,6 +60,18 @@ schoolApp.get('/location', cache('15 day'), (req, res, next) => {
next();
}, 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) => {
req.result = [];
for(let i = 1; i <= 4; ++i) {
@@ -359,6 +371,16 @@ rqfCount.addField({
type: 'integer',
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({
name: 'adm_dependency',
table: 'escola',
@@ -402,52 +424,52 @@ rqfCount.addField({
}).addValue({
name: 'education_day_care_child',
table: 'escola',
tableField: 'reg_infantil_creche',
tableField: 'reg_infantil_creche_t1',
resultField: 'education_day_care_child_id',
where: {
relation: '=',
type: 'boolean',
field: 'reg_infantil_creche'
field: 'reg_infantil_creche_t1'
}
}).addValue({
name: 'education_preschool_child',
table: 'escola',
tableField: 'reg_infantil_preescola',
tableField: 'reg_infantil_preescola_t1',
resultField: 'education_preschool_child_id',
where: {
relation: '=',
type: 'boolean',
field: 'reg_infantil_preescola'
field: 'reg_infantil_preescola_t1'
}
}).addValue({
name: 'education_begin_elementary_school',
table: 'escola',
tableField: 'reg_fund_ai',
tableField: 'reg_fund_ai_t1',
resultField: 'education_begin_elementary_school_id',
where: {
relation: '=',
type: 'boolean',
field: 'reg_fund_ai'
field: 'reg_fund_ai_t1'
}
}).addValue({
name: 'education_end_elementary_school',
table: 'escola',
tableField: 'reg_fund_af',
tableField: 'reg_fund_af_t1',
resultField: 'education_end_elementary_school_id',
where: {
relation: '=',
type: 'boolean',
field: 'reg_fund_af'
field: 'reg_fund_af_t1'
}
}).addValue({
name: 'education_middle_school',
table: 'escola',
tableField: 'reg_medio_medio',
tableField: 'reg_medio_medio_t1',
resultField: 'education_middle_school_id',
where: {
relation: '=',
type: 'boolean',
field: 'reg_medio_medio'
field: 'reg_medio_medio_t1'
}
}).addValue({
name: 'education_professional',
Loading