diff --git a/src/libs/convert/educationLevelModAgg.js b/src/libs/convert/educationLevelModAgg.js index c55a7e8fc3e2f9e2549fff244f61fc57a63ba143..6ebfa6274210a5f8956aebfe937aabae6faf07ea 100644 --- a/src/libs/convert/educationLevelModAgg.js +++ b/src/libs/convert/educationLevelModAgg.js @@ -40,6 +40,8 @@ module.exports = function educationLevelMod(id) { return 'EJA - EF e EM Integrado - tecnico'; case 10: return 'Educacao Profissional - concomitante e subsequente'; + case 11: + return 'suporte_total' default: return 'Não classificada'; } diff --git a/src/libs/middlewares/aggregateData.js b/src/libs/middlewares/aggregateData.js index 5acac9248580af983a586114c7196c4d9614940a..eed373ddbbfd98c4a30fc4615823bb5d91a01fc4 100644 --- a/src/libs/middlewares/aggregateData.js +++ b/src/libs/middlewares/aggregateData.js @@ -62,7 +62,6 @@ function aggregateData(req, res, next) { 'age_range_entity', 'post_graduation_entity', 'contract_type_entity', - 'total_doc', 'education_degree_entity' ] let id; diff --git a/src/libs/routes_v1/employeesAggregate.js b/src/libs/routes_v1/employeesAggregate.js index 9fc52918f559b719e57ac088fe5e064eccec01d8..ab5102ceb21e8e2d5297035cd4afa90ebbc191b4 100644 --- a/src/libs/routes_v1/employeesAggregate.js +++ b/src/libs/routes_v1/employeesAggregate.js @@ -302,14 +302,6 @@ employeesAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { .order('escola.ano_censo') .where('escola.situacao_funcionamento_pareada = 1 and (escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)'); } - else if (req.query.dims && req.query.dims.includes('total_doc')) { - req.sql.from('escola') - .field('SUM(escola.qt_doc_bas)', 'total_doc_bas') - .field('escola.ano_censo', 'year') - .group('escola.ano_censo') - .order('escola.ano_censo') - .where('escola.situacao_funcionamento_pareada = 1 and (escola.ensino_regular = 1 or escola.ensino_eja = 1 or escola.educacao_profissional = 1)'); - } else { req.sql.from('escola') .field('SUM(escola.qt_doc_bas)', 'total') diff --git a/src/libs/routes_v1/enrollmentAggregate.js b/src/libs/routes_v1/enrollmentAggregate.js index bb4ef2bf84827af062262f3167a4fe68622d5fbc..7e8cd3faece61c7999d16db913c50938de4e51fb 100644 --- a/src/libs/routes_v1/enrollmentAggregate.js +++ b/src/libs/routes_v1/enrollmentAggregate.js @@ -493,10 +493,9 @@ rqf.addField({ tableField: 'localizacao_diferenciada_par', resultField: 'diff_location_id', where: { - relation: 'is not null', + relation: '=', type: 'integer', field: 'localizacao_diferenciada_par', - value: 'null' } }).addValue({ name: 'government_agreement', @@ -563,6 +562,7 @@ enrollmentAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { .field('SUM(escola.qt_mat_eja_med_agg)', 'total_eja_med') .field('SUM(escola.qt_mat_eja_fund_fic + escola.qt_mat_eja_med_fic + escola.qt_mat_eja_med_tec)', 'total_tec') .field('SUM(escola.qt_mat_prof_agg)', 'total_prof') + .field('SUM(escola.qt_mat_bas)', 'total_total') .field('escola.ano_censo', 'year') .group('escola.ano_censo') .order('escola.ano_censo')