Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
707b072b
Commit
707b072b
authored
6 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Plain Diff
Merge branch 'classroom_count' into hotfix_v1.3.1
parents
94918fc6
347ef998
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/libs/routes/classroomCount.js
+7
-1
7 additions, 1 deletion
src/libs/routes/classroomCount.js
with
7 additions
and
1 deletion
src/libs/routes/classroomCount.js
+
7
−
1
View file @
707b072b
...
@@ -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
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment