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
Harbor Registry
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
676b29b8
Commit
676b29b8
authored
6 years ago
by
Fernando Erd
Browse files
Options
Downloads
Plain Diff
Merge branch 'uptade_enrollment_to_master' into v1.6.0
parents
230225d2
61288b10
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!145
v1.6.0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/middlewares/id2str.js
+9
-2
9 additions, 2 deletions
src/libs/middlewares/id2str.js
src/libs/routes/enrollment.js
+47
-0
47 additions, 0 deletions
src/libs/routes/enrollment.js
with
56 additions
and
2 deletions
src/libs/middlewares/id2str.js
+
9
−
2
View file @
676b29b8
...
@@ -20,6 +20,7 @@ const stateName = require(`${libs}/convert/stateName`);
...
@@ -20,6 +20,7 @@ const stateName = require(`${libs}/convert/stateName`);
const
contractType
=
require
(
`
${
libs
}
/convert/contractType`
);
const
contractType
=
require
(
`
${
libs
}
/convert/contractType`
);
const
ethnicGroupPnad
=
require
(
`
${
libs
}
/convert/ethnicGroupPnad`
);
const
ethnicGroupPnad
=
require
(
`
${
libs
}
/convert/ethnicGroupPnad`
);
const
ageRange
=
require
(
`
${
libs
}
/convert/ageRange`
);
const
ageRange
=
require
(
`
${
libs
}
/convert/ageRange`
);
const
ageRangeAll
=
require
(
`
${
libs
}
/convert/ageRangeAll`
);
const
fullAgeRange
=
require
(
`
${
libs
}
/convert/fullAgeRange`
);
const
fullAgeRange
=
require
(
`
${
libs
}
/convert/fullAgeRange`
);
const
genderPnad
=
require
(
`
${
libs
}
/convert/genderPnad`
);
const
genderPnad
=
require
(
`
${
libs
}
/convert/genderPnad`
);
const
fifthHouseholdIncome
=
require
(
`
${
libs
}
/convert/fifthHouseholdIncome`
);
const
fifthHouseholdIncome
=
require
(
`
${
libs
}
/convert/fifthHouseholdIncome`
);
...
@@ -28,6 +29,8 @@ const educationLevelBasic = require(`${libs}/convert/educationLevelBasic`);
...
@@ -28,6 +29,8 @@ const educationLevelBasic = require(`${libs}/convert/educationLevelBasic`);
const
useTransport
=
require
(
`
${
libs
}
/convert/booleanVariable`
);
const
useTransport
=
require
(
`
${
libs
}
/convert/booleanVariable`
);
const
useTransportPublic
=
require
(
`
${
libs
}
/convert/booleanVariable`
);
const
useTransportPublic
=
require
(
`
${
libs
}
/convert/booleanVariable`
);
const
transportationManager
=
require
(
`
${
libs
}
/convert/transportationManager`
);
const
transportationManager
=
require
(
`
${
libs
}
/convert/transportationManager`
);
const
specialClass
=
require
(
`
${
libs
}
/convert/booleanVariable`
);
const
ids
=
{
const
ids
=
{
gender_id
:
gender
,
gender_id
:
gender
,
...
@@ -61,13 +64,15 @@ const ids = {
...
@@ -61,13 +64,15 @@ const ids = {
contract_type_id
:
contractType
,
contract_type_id
:
contractType
,
ethnic_group_pnad_id
:
ethnicGroupPnad
,
ethnic_group_pnad_id
:
ethnicGroupPnad
,
age_range_id
:
ageRange
,
age_range_id
:
ageRange
,
age_range_all_id
:
ageRangeAll
,
full_age_range_id
:
fullAgeRange
,
full_age_range_id
:
fullAgeRange
,
gender_pnad_id
:
genderPnad
,
gender_pnad_id
:
genderPnad
,
fifth_household_income_id
:
fifthHouseholdIncome
,
fifth_household_income_id
:
fifthHouseholdIncome
,
extremes_household_income_id
:
extremesHouseholdIncome
,
extremes_household_income_id
:
extremesHouseholdIncome
,
use_transport_id
:
useTransport
,
use_transport_id
:
useTransport
,
use_transport_public_id
:
useTransportPublic
,
use_transport_public_id
:
useTransportPublic
,
transportation_manager_id
:
transportationManager
transportation_manager_id
:
transportationManager
,
special_class_id
:
specialClass
};
};
function
transform
(
removeId
=
false
)
{
function
transform
(
removeId
=
false
)
{
...
@@ -130,10 +135,12 @@ module.exports = {
...
@@ -130,10 +135,12 @@ module.exports = {
contractType
,
contractType
,
ethnicGroupPnad
,
ethnicGroupPnad
,
ageRange
,
ageRange
,
ageRangeAll
,
fullAgeRange
,
fullAgeRange
,
genderPnad
,
genderPnad
,
fifthHouseholdIncome
,
fifthHouseholdIncome
,
extremesHouseholdIncome
,
extremesHouseholdIncome
,
useTransport
,
useTransport
,
transportationManager
transportationManager
,
specialClass
};
};
This diff is collapsed.
Click to expand it.
src/libs/routes/enrollment.js
+
47
−
0
View file @
676b29b8
...
@@ -214,6 +214,33 @@ enrollmentApp.get('/integral_time', (req, res, next) => {
...
@@ -214,6 +214,33 @@ enrollmentApp.get('/integral_time', (req, res, next) => {
next
();
next
();
},
response
(
'
integral_time
'
));
},
response
(
'
integral_time
'
));
enrollmentApp
.
get
(
'
/special_class
'
,
(
req
,
res
,
next
)
=>
{
req
.
result
=
[
{
id
:
null
,
name
:
'
Não Declarado
'
},
{
id
:
0
,
name
:
'
Não
'
},
{
id
:
1
,
name
:
'
Sim
'
}
];
next
();
},
response
(
'
special_class
'
));
enrollmentApp
.
get
(
'
/age_range_all
'
,
(
req
,
res
,
next
)
=>
{
req
.
result
=
[
{
id
:
1
,
name
:
'
0 a 3 anos
'
},
{
id
:
2
,
name
:
'
4 a 5 anos
'
},
{
id
:
3
,
name
:
'
6 a 10 anos
'
},
{
id
:
4
,
name
:
'
11 a 14 anos
'
},
{
id
:
5
,
name
:
'
15 a 17 anos
'
},
{
id
:
6
,
name
:
'
18 a 24 anos
'
},
{
id
:
7
,
name
:
'
25 a 29 anos
'
},
{
id
:
8
,
name
:
'
30 a 40 anos
'
},
{
id
:
9
,
name
:
'
41 a 50 anos
'
},
{
id
:
10
,
name
:
'
51 a 64 anos
'
},
{
id
:
11
,
name
:
'
Mais que 64 anos
'
}
];
next
();
},
response
(
'
age_range_all
'
));
rqf
.
addField
({
rqf
.
addField
({
name
:
'
filter
'
,
name
:
'
filter
'
,
field
:
false
,
field
:
false
,
...
@@ -452,6 +479,26 @@ rqf.addField({
...
@@ -452,6 +479,26 @@ rqf.addField({
type
:
'
boolean
'
,
type
:
'
boolean
'
,
field
:
'
tempo_integral
'
field
:
'
tempo_integral
'
}
}
}).
addValue
({
name
:
'
age_range_all
'
,
table
:
'
matricula
'
,
tableField
:
'
faixa_etaria_31_03
'
,
resultField
:
'
age_range_all_id
'
,
where
:
{
relation
:
'
=
'
,
type
:
'
integer
'
,
field
:
'
faixa_etaria_31_03
'
}
}).
addValue
({
name
:
'
special_class
'
,
table
:
'
matricula
'
,
tableField
:
'
exclusiva_especial
'
,
resultField
:
'
special_class_id
'
,
where
:
{
relation
:
'
=
'
,
type
:
'
boolean
'
,
field
:
'
exclusiva_especial
'
}
});
});
enrollmentApp
.
get
(
'
/
'
,
rqf
.
parse
(),
rqf
.
build
(),
(
req
,
res
,
next
)
=>
{
enrollmentApp
.
get
(
'
/
'
,
rqf
.
parse
(),
rqf
.
build
(),
(
req
,
res
,
next
)
=>
{
...
...
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