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
3e04cddc
There was a problem fetching the pipeline summary.
Commit
3e04cddc
authored
6 years ago
by
Fernando Erd
Browse files
Options
Downloads
Plain Diff
Fix conflicts
parents
5221bcaa
e1ba546f
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-1
1 addition, 1 deletion
CHANGELOG.md
src/libs/routes/liquidEnrollmentRatio.js
+14
-8
14 additions, 8 deletions
src/libs/routes/liquidEnrollmentRatio.js
with
15 additions
and
9 deletions
CHANGELOG.md
+
1
−
1
View file @
3e04cddc
...
...
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on
[
Keep a Changelog
](
http://keepachangelog.com/
)
and this project adheres to
[
Semantic Versioning
](
http://semver.org/
)
.
## 1.1.0
## 1.1.0
- 2018-05-02
### Added
-
Out of school population indicator
-
Liquid enrollment ratio indicator
...
...
This diff is collapsed.
Click to expand it.
src/libs/routes/liquidEnrollmentRatio.js
+
14
−
8
View file @
3e04cddc
...
...
@@ -303,15 +303,15 @@ liquidEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
function
ConvertMatricula
(
result
)
{
if
(
result
==
1
)
{
return
'
matricula.faixa_etaria_31_03 = 1
'
return
'
(
matricula.faixa_etaria_31_03 = 1
AND matricula.etapas_mod_ensino_segmento_id = 1)
'
}
else
if
(
result
==
2
)
{
return
'
matricula.faixa_etaria_31_03 = 2
'
return
'
(
matricula.faixa_etaria_31_03 = 2
AND matricula.etapas_mod_ensino_segmento_id = 2)
'
}
else
if
(
result
==
4
)
{
return
'
matricula.faixa_etaria_31_03 = 3
'
return
'
(
matricula.faixa_etaria_31_03 = 3
AND matricula.etapas_mod_ensino_segmento_id = 4)
'
}
else
if
(
result
==
5
)
{
return
'
matricula.faixa_etaria_31_03 = 4
'
return
'
(
matricula.faixa_etaria_31_03 = 4
AND matricula.etapas_mod_ensino_segmento_id = 5)
'
}
else
if
(
result
==
6
)
{
return
'
matricula.faixa_etaria_31_03 = 5
'
return
'
(
matricula.faixa_etaria_31_03 = 5
AND matricula.etapas_mod_ensino_segmento_id = 6)
'
}
}
if
(
"
education_level_basic
"
in
req
.
filter
)
{
...
...
@@ -319,9 +319,13 @@ liquidEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
var
string_query_enrollment
=
''
;
for
(
let
i
=
0
;
i
<
req
.
filter
.
education_level_basic
.
length
-
1
;
i
++
)
{
string_query_enrollment
=
string_query_enrollment
+
ConvertMatricula
(
req
.
filter
.
education_level_basic
[
i
])
+
'
OR
'
;
}
string_query_enrollment
=
string_query_enrollment
+
ConvertMatricula
(
req
.
filter
.
education_level_basic
[
req
.
filter
.
education_level_basic
.
length
-
1
]);
req
.
sql
.
where
(
string_query_enrollment
);
}
string_query_enrollment
=
string_query_enrollment
+
ConvertMatricula
(
req
.
filter
.
education_level_basic
[
req
.
filter
.
education_level_basic
.
length
-
1
]);
delete
req
.
filter
.
education_level_basic
;
req
.
sql
.
where
(
string_query_enrollment
);
req
.
sql
.
field
(
'
matricula.faixa_etaria_31_03
'
,
'
age_range
'
)
req
.
sql
.
group
(
'
matricula.faixa_etaria_31_03
'
,
'
age_range
'
);
}
}
else
if
(
"
education_level_basic
"
in
req
.
dims
)
{
req
.
sql
.
field
(
'
matricula.faixa_etaria_31_03
'
,
'
age_range
'
)
...
...
@@ -369,6 +373,8 @@ liquidEnrollmentRatioApp.get('/', rqf.parse(),(req, res, next) => {
string_query
=
string_query
+
convertPnad
(
req
.
filter
.
education_level_basic
[
req
.
filter
.
education_level_basic
.
length
-
1
]);
req
.
sql
.
where
(
string_query
);
}
req
.
sql
.
field
(
'
pnad.faixa_etaria_31_03
'
,
'
age_range
'
)
req
.
sql
.
group
(
'
pnad.faixa_etaria_31_03
'
,
'
age_range
'
);
}
else
if
(
"
education_level_basic
"
in
req
.
dims
)
{
req
.
sql
.
field
(
'
pnad.faixa_etaria_31_03
'
,
'
age_range
'
)
req
.
sql
.
where
(
'
pnad.faixa_etaria_31_03 = 1 OR pnad.faixa_etaria_31_03 = 2 OR pnad.faixa_etaria_31_03 = 3 OR pnad.faixa_etaria_31_03 = 4 OR pnad.faixa_etaria_31_03 = 5
'
)
...
...
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