Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • #974-receita-potencial
  • 935-taxa-ajustada-frequencia-liquida
  • 978-docentes-federativo-superior
  • aggregate_enrollment
  • attendance_rate
  • courseAggregate
  • db-conn
  • development
  • docentes-federativo-978
  • docentes-ies-ente-federativo
  • enrollment_rate
  • es23-docentes-por-ente-federativo
  • es23-superior-enrollment
  • fix_matriculas_superior_2
  • fulltime_enrollment
  • homologa
  • hotfix-enrollment-aggregate
  • instruction_level_fix2
  • instruction_level_fixes
  • instruction_number
  • issue_935
  • issue_953
  • issue_958
  • issue_995
  • issues_indicadores_agregados
  • master
  • msh22-development-patch-10494
  • msh22-development-patch-86970
  • new-indicators
  • nova-correcao-funcionarios-2024
  • receita-potencial
  • revert-222fa403
  • teachers-ies
  • years-of-study-mean
  • v0.1.0
  • v1.0.0
  • v1.0.1
  • v1.0.2
  • v1.0.3
  • v1.1.0
  • v1.1.1
  • v1.14
  • v1.14.0
  • v1.14.1
  • v1.14.2
  • v1.15.1
  • v1.16.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
67 results

Target

Select target project
  • simcaq/simcaq-node
  • SMPPIR/SMPPIR-Node
2 results
Select Git revision
  • #974-receita-potencial
  • 935-taxa-ajustada-frequencia-liquida
  • 978-docentes-federativo-superior
  • aggregate_enrollment
  • attendance_rate
  • courseAggregate
  • db-conn
  • development
  • docentes-federativo-978
  • docentes-ies-ente-federativo
  • enrollment_rate
  • es23-docentes-por-ente-federativo
  • es23-superior-enrollment
  • fix_matriculas_superior_2
  • fulltime_enrollment
  • homologa
  • hotfix-enrollment-aggregate
  • instruction_level_fix2
  • instruction_level_fixes
  • instruction_number
  • issue_935
  • issue_953
  • issue_958
  • issue_995
  • issues_indicadores_agregados
  • master
  • msh22-development-patch-10494
  • msh22-development-patch-86970
  • new-indicators
  • nova-correcao-funcionarios-2024
  • receita-potencial
  • revert-222fa403
  • teachers-ies
  • years-of-study-mean
  • v0.1.0
  • v1.0.0
  • v1.0.1
  • v1.0.2
  • v1.0.3
  • v1.1.0
  • v1.1.1
  • v1.14
  • v1.14.0
  • v1.14.1
  • v1.14.2
  • v1.15.1
  • v1.16.0
  • v1.2.0
  • v1.2.1
  • v1.2.2
  • v1.2.3
  • v1.3.0
  • v1.3.1
  • v1.3.2
  • v1.3.3
  • v1.4.0
  • v1.4.1
  • v1.4.2
  • v1.5.0
  • v1.6.0
  • v1.6.1
  • v1.7.0
  • v1.8.0
  • v1.8.1
  • v1.8.2
  • v1.8.3
  • v1.9.0
67 results
Show changes

Commits on Source 20

...@@ -126,13 +126,13 @@ ExpensesApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { ...@@ -126,13 +126,13 @@ ExpensesApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
.field('despesas.ano_censo', 'year') .field('despesas.ano_censo', 'year')
.field('despesas.ano_censo', 'total_ano') .field('despesas.ano_censo', 'total_ano')
.field('despesas.nome_ente', 'total_nome_ente') .field('despesas.nome_ente', 'total_nome_ente')
.field('despesas.despesas', 'total_despesas') .field('round(despesas.despesas,2)', 'total_despesas')
.field('matriculas_publica', 'total_matriculas_publica') .field('matriculas_publica', 'total_matriculas_publica')
.field('matriculas_publicas_mais_conveniada', 'total_matriculas_publicas_mais_conveniada') .field('matriculas_publicas_mais_conveniada', 'total_matriculas_publicas_mais_conveniada')
.field('gasto_aluno_ano_publica', 'total_gasto_aluno_ano_publica') .field('round(gasto_aluno_ano_publica,2)', 'total_gasto_aluno_ano_publica')
.field('gasto_aluno_mes_publica', 'total_gasto_aluno_mes_publica') .field('round(gasto_aluno_mes_publica,2)', 'total_gasto_aluno_mes_publica')
.field('gasto_aluno_ano_publica_mais_conveniada', 'total_gasto_aluno_ano_publica_mais_conveniada') .field('round(gasto_aluno_ano_publica_mais_conveniada,2)', 'total_gasto_aluno_ano_publica_mais_conveniada')
.field('gasto_aluno_mes_publica_mais_conveniada', 'total_gasto_aluno_mes_publica_mais_conveniada') .field('round(gasto_aluno_mes_publica_mais_conveniada,2)', 'total_gasto_aluno_mes_publica_mais_conveniada')
.where(`${whereCondition}`) .where(`${whereCondition}`)
.order('despesas.ano_censo') .order('despesas.ano_censo')
} }
......
...@@ -291,7 +291,6 @@ NivelInstrucao.get('/', rqf.parse(), rqf.build(), (req, res, next) => { ...@@ -291,7 +291,6 @@ NivelInstrucao.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
.field('nivel_de_instrucao', 'nivel') .field('nivel_de_instrucao', 'nivel')
.field('round(sum(peso_domicilio_pessoas_com_cal), 0)', 'total') .field('round(sum(peso_domicilio_pessoas_com_cal), 0)', 'total')
.field('ano_ref', 'year') .field('ano_ref', 'year')
.where('nivel_de_instrucao <> 99')
.where('faixa_etaria <> 99') .where('faixa_etaria <> 99')
.group('pnad_novo.ano_ref') .group('pnad_novo.ano_ref')
.group('pnad_novo.nivel_de_instrucao') .group('pnad_novo.nivel_de_instrucao')
......
...@@ -242,7 +242,7 @@ studentsReceivingAidTaxApp.get('/state', (req, res, next) => { ...@@ -242,7 +242,7 @@ studentsReceivingAidTaxApp.get('/state', (req, res, next) => {
next(); next();
}, response('state')); }, response('state'));
studentsReceivingAidTaxApp.get('/age_range', (req, res, next) => { studentsReceivingAidTaxApp.get('/age_range_all', (req, res, next) => {
req.result = [] req.result = []
for (let i = 1; i < 12; i++) { for (let i = 1; i < 12; i++) {
req.result.push({ req.result.push({
...@@ -251,7 +251,7 @@ studentsReceivingAidTaxApp.get('/age_range', (req, res, next) => { ...@@ -251,7 +251,7 @@ studentsReceivingAidTaxApp.get('/age_range', (req, res, next) => {
} }
next(); next();
}, response('age_range')); }, response('age_range_all'));
studentsReceivingAidTaxApp.get('/location', (req, res, next) => { studentsReceivingAidTaxApp.get('/location', (req, res, next) => {
req.result = [] req.result = []
...@@ -578,8 +578,21 @@ function matchQueries(queryPartial, queryTotal) { ...@@ -578,8 +578,21 @@ function matchQueries(queryPartial, queryTotal) {
return match; return match;
} }
function whereCondition(req) {
let where = "";
const dims = req.query.dims;
if (dims && dims.includes("income_range")){
where += `pnad_novo.faixa_rendimento_aux_tx is not null`;
}
return where;
}
studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
req.querySet = []; req.querySet = [];
let where = whereCondition(req);
// Subquery para total_pop_maior_25 com filtros dinâmicos // Subquery para total_pop_maior_25 com filtros dinâmicos
let totalEstudantesQueRecebemAuxilio = req.sql.clone(); let totalEstudantesQueRecebemAuxilio = req.sql.clone();
...@@ -587,6 +600,7 @@ studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) = ...@@ -587,6 +600,7 @@ studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) =
.field("ano_ref", "year") .field("ano_ref", "year")
.field("SUM(peso_domicilio_pessoas_com_cal)", "total") .field("SUM(peso_domicilio_pessoas_com_cal)", "total")
.where("recebeu_rendimentos_de_programa_bolsa_familia = 1") .where("recebeu_rendimentos_de_programa_bolsa_familia = 1")
.where(`${where}`)
.where("frequenta_escola = 1") .where("frequenta_escola = 1")
.where("ano_ref >= 2019") .where("ano_ref >= 2019")
.group("ano_ref") .group("ano_ref")
...@@ -598,11 +612,12 @@ studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) = ...@@ -598,11 +612,12 @@ studentsReceivingAidTaxApp.get('/', rqf.parse(), rqf.build(), (req, res, next) =
totalEstudantes.from("pnad_novo") totalEstudantes.from("pnad_novo")
.field("ano_ref", "year") .field("ano_ref", "year")
.field("SUM(peso_domicilio_pessoas_com_cal)", "total") .field("SUM(peso_domicilio_pessoas_com_cal)", "total")
.where(`${where}`)
.where("frequenta_escola = 1") .where("frequenta_escola = 1")
.where("ano_ref >= 2019")
.group("ano_ref") .group("ano_ref")
.order("ano_ref"); .order("ano_ref");
req.querySet.push(totalEstudantesQueRecebemAuxilio); req.querySet.push(totalEstudantesQueRecebemAuxilio);
req.querySet.push(totalEstudantes); req.querySet.push(totalEstudantes);
......