Skip to content
Snippets Groups Projects
Commit fefa0dfa authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Merge branch 'hotfix_v1.3.1' into development

Conflicts:
	src/libs/routes/api.js
parents e1882e94 dec47a22
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. ...@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## 1.3.1 - 2018-06-19
### Changed
- Fixed bug with Federal District and missing cities in classroom count
## 1.3.0 - 2018-06-18
### Added
- Daily charge amount route
## 1.2.3 - 2018-06-14 ## 1.2.3 - 2018-06-14
### Changed ### Changed
- Fixed roundig error in classroom count route - Fixed roundig error in classroom count route
......
...@@ -246,6 +246,7 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => { ...@@ -246,6 +246,7 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
let result = []; let result = [];
let hashSet = new Set(); let hashSet = new Set();
let enrollments = [...req.enrollment]; let enrollments = [...req.enrollment];
let leftovers = [];
while (i < req.classroom.length) { while (i < req.classroom.length) {
let classroom = req.classroom[i]; let classroom = req.classroom[i];
// Cria hash única para cada espacialidade, dado um ano // Cria hash única para cada espacialidade, dado um ano
...@@ -305,7 +306,12 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => { ...@@ -305,7 +306,12 @@ classroomCountApp.post('/', rqf.parse(), (req, res, next) => {
enrollmentMatch = false; enrollmentMatch = false;
continue; continue;
} else if(classroom.city_name > enrollment.city_name) { } else if(classroom.city_name > enrollment.city_name) {
++j; let enrollmentHash = '' + enrollment.year + enrollment.state_id + enrollment.city_id;
if(hashSet.has(enrollmentHash)) {
leftovers.push(enrollments.splice(j, 1)); // Para inspeção, adiciona os que "sobram" no array de sobras
} else {
++j;
}
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment