Skip to content
Snippets Groups Projects
Commit e6768ac2 authored by Henrique Varella Ehrenfried's avatar Henrique Varella Ehrenfried :speech_balloon:
Browse files

Merge branch 'indigenas_territorial' into 'development'

Indigenas territorial

See merge request !44
parents 8cbee83d 30e29e18
Branches
No related tags found
2 merge requests!48Development,!44Indigenas territorial
Pipeline #24025 failed
......@@ -46,7 +46,7 @@ rqf.addField({
where: false
}).addValue({
name: 'year',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'ano',
resultField: 'ano_divulgacao',
where: {
......@@ -56,7 +56,7 @@ rqf.addField({
}
}).addValue({
name: 'local_name',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'nome_terra',
resultField: 'nome_terra_indigena',
where: {
......@@ -66,7 +66,7 @@ rqf.addField({
}
}).addValue({
name: 'ethnic_name',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'nome_etnia',
resultField: 'etnia_indigena',
where: {
......@@ -76,7 +76,7 @@ rqf.addField({
}
}).addValue({
name: 'uf',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'sigla_uf',
resultField: 'unidade_federativa',
where: {
......@@ -86,7 +86,7 @@ rqf.addField({
}
}).addValue({
name: 'area',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'tamanho_superficie',
resultField: 'superficie(ha)',
where: {
......@@ -96,7 +96,7 @@ rqf.addField({
}
}).addValue({
name: 'process_stage',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'fase_procedimento',
resultField: 'fase_do_procedimento',
where: {
......@@ -106,7 +106,7 @@ rqf.addField({
}
}).addValue({
name: 'modality',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'tipo_modalidade',
resultField: 'tipo_modalidade',
where: {
......@@ -116,7 +116,7 @@ rqf.addField({
}
}).addValue({
name: 'county',
table: 'terras_indigenas',
table: 'indigenas_territorial_ag',
tableField: 'nome_municipio',
resultField: 'nome_municipio',
where: {
......@@ -124,11 +124,21 @@ rqf.addField({
type: 'string',
field: 'nome_municipio'
}
}).addValue({
name: 'region',
table: 'indigenas_territorial_ag',
tableField: 'regiao',
resultField: 'nome_regiao',
where: {
relation: '=',
type: 'string',
field: 'nome_regiao'
}
});
indigenasTerritorialApp.get('/', rqf.parse(), rqf.build(), function (req, res, next) {
console.log(req.sql.toString());
req.sql.field('COUNT(*) AS Total').from('terras_indigenas');
req.sql.field('COUNT(*) AS Total').from('indigenas_territorial_ag');
next();
}, query, response('terras_ind'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment