diff --git a/src/libs/routes_v1/courseAggregate.js b/src/libs/routes_v1/courseAggregate.js index fdc6bd88cc69e04b2280cc8757c5b83e9c197b13..cf9a52f257d5c2cab340003438ab74240ccf9ccd 100644 --- a/src/libs/routes_v1/courseAggregate.js +++ b/src/libs/routes_v1/courseAggregate.js @@ -405,7 +405,6 @@ CourseAggregateApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { .where('curso_superior_agregado.tp_nivel_acad = 1 AND qtd_cursos = 1') .group('curso_superior_agregado.ano_censo') .order('curso_superior_agregado.ano_censo') - console.log(req.sql.toString()) next(); }, query, id2str.transform(false), response('course_aggregate')); diff --git a/src/libs/routes_v1/enrollmentAggregate.js b/src/libs/routes_v1/enrollmentAggregate.js index 31c421e1ba655ee890a0f35cebed1195bf0177c6..1611020891c5fa49553519c4d2c79c5d7b9090bc 100644 --- a/src/libs/routes_v1/enrollmentAggregate.js +++ b/src/libs/routes_v1/enrollmentAggregate.js @@ -19,6 +19,7 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>. */ const express = require('express'); + const { result } = require('lodash'); const enrollmentAggregateApp = express.Router(); diff --git a/src/libs/routes_v1/populationOutOfSchool.js b/src/libs/routes_v1/populationOutOfSchool.js index 99d991a521e5bb21f4750bd7cdce82c53ebd6e9d..d5686c239df8e90974a0e52de3a70b5628f2c431 100644 --- a/src/libs/routes_v1/populationOutOfSchool.js +++ b/src/libs/routes_v1/populationOutOfSchool.js @@ -445,14 +445,12 @@ function matchQueries(queryPartial, queryTotal) { if(objMatch) { newObj.denominator = result.total; newObj.pop_total = objMatch.total; - newObj.total = Math.round((objMatch.total / result.total) * 10000) / 100; + newObj.total = parseFloat(((objMatch.total / result.total) * 100).toFixed(1)); match.push(newObj); } } ) - console.log(match) - return match; } @@ -477,7 +475,6 @@ PopulationOutOfSchoolApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => .order('pnad_novo.ano_ref') .order('pnad_novo.faixa_etaria_pop_out') req.querySet.push(attends_school); - console.log(attends_school.toString()); // Then, the second object is created and stores the sum of all people without filters @@ -501,7 +498,6 @@ PopulationOutOfSchoolApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => // below is used let newObj = matchQueries(req.result[0], req.result[1]); req.result = newObj; - //console.log(attends_school.toString()); } else { res.status(400); next({ diff --git a/src/libs/routes_v1/rateSchool.js b/src/libs/routes_v1/rateSchool.js index a6a91b7be08919cc1ab12a304ee1832cfddfc84e..37e0b2836d4aa0c2cee304b720605fbbef7d2d88 100644 --- a/src/libs/routes_v1/rateSchool.js +++ b/src/libs/routes_v1/rateSchool.js @@ -257,8 +257,6 @@ function matchQueries(queryTotal, queryPartial) { keys.forEach((key) => { newObj[key] = result[key]; }); - // console.log('NEW OBJ'); - // console.log(newObj); let index = keys.indexOf('total'); if(index > -1) keys.splice(index, 1); let objMatch = null; @@ -280,7 +278,6 @@ function matchQueries(queryTotal, queryPartial) { } if(objMatch) { - // console.log(objMatch); newObj.denominator = result.total; newObj.partial = objMatch.total; newObj.total = (objMatch.total / result.total) * 100;