Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adicionando gratificacao natalina #576

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,9 @@ const docTemplate = `{
"auxilio_alimentacao": {
"type": "number"
},
"gratificacao_natalina": {
"type": "number"
},
"indenizacao_de_ferias": {
"type": "number"
},
Expand Down Expand Up @@ -1391,6 +1394,9 @@ const docTemplate = `{
"auxilio_alimentacao": {
"type": "number"
},
"gratificacao_natalina": {
"type": "number"
},
"indenizacao_de_ferias": {
"type": "number"
},
Expand Down
6 changes: 6 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,9 @@
"auxilio_alimentacao": {
"type": "number"
},
"gratificacao_natalina": {
"type": "number"
},
"indenizacao_de_ferias": {
"type": "number"
},
Expand Down Expand Up @@ -1382,6 +1385,9 @@
"auxilio_alimentacao": {
"type": "number"
},
"gratificacao_natalina": {
"type": "number"
},
"indenizacao_de_ferias": {
"type": "number"
},
Expand Down
4 changes: 4 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ definitions:
properties:
auxilio_alimentacao:
type: number
gratificacao_natalina:
type: number
indenizacao_de_ferias:
type: number
licenca_premio:
Expand Down Expand Up @@ -418,6 +420,8 @@ definitions:
properties:
auxilio_alimentacao:
type: number
gratificacao_natalina:
type: number
indenizacao_de_ferias:
type: number
licenca_premio:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.18

require (
github.com/dadosjusbr/proto v0.0.0-20221212025627-91c60aa3cd12
github.com/dadosjusbr/storage v0.0.0-20240205184937-b9805fd9200e
github.com/dadosjusbr/storage v0.0.0-20240215133808-01101e0b3766
github.com/gocarina/gocsv v0.0.0-20220712153207-8b2118da4570
github.com/golang/mock v1.6.0
github.com/joho/godotenv v1.4.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ github.com/dadosjusbr/storage v0.0.0-20240122222419-3472161adddb h1:yCHr4P7e8kBC
github.com/dadosjusbr/storage v0.0.0-20240122222419-3472161adddb/go.mod h1:PszGy6CDoG3kNLjIsCmwD3MAWED7xL7U/OWj7ajsiHc=
github.com/dadosjusbr/storage v0.0.0-20240205184937-b9805fd9200e h1:3cH5bjKv7JDuGSAU+7WCdtM/ov0pv/6XzTWhTMbyUgc=
github.com/dadosjusbr/storage v0.0.0-20240205184937-b9805fd9200e/go.mod h1:PszGy6CDoG3kNLjIsCmwD3MAWED7xL7U/OWj7ajsiHc=
github.com/dadosjusbr/storage v0.0.0-20240215133808-01101e0b3766 h1:u5Qem0JR196gPjsreNPaa1HTZI8/FExL0+XR+pMx+h4=
github.com/dadosjusbr/storage v0.0.0-20240215133808-01101e0b3766/go.mod h1:PszGy6CDoG3kNLjIsCmwD3MAWED7xL7U/OWj7ajsiHc=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down
5 changes: 4 additions & 1 deletion papi/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ func (h handler) V2GetMonthlyInfo(c echo.Context) error {
FoodAllowance: monthlyInfo.Summary.ItemSummary.FoodAllowance,
BonusLicense: monthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: monthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: monthlyInfo.Summary.ItemSummary.ChristmasBonus,
Others: monthlyInfo.Summary.ItemSummary.Others,
},
},
Expand Down Expand Up @@ -462,6 +463,7 @@ func (h handler) GetMonthlyInfosByYear(c echo.Context) error {
FoodAllowance: mi.Summary.ItemSummary.FoodAllowance,
BonusLicense: mi.Summary.ItemSummary.BonusLicense,
VacationCompensation: mi.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: mi.Summary.ItemSummary.ChristmasBonus,
Others: mi.Summary.ItemSummary.Others,
},
},
Expand Down Expand Up @@ -676,7 +678,7 @@ func (h handler) V2GetAggregateIndexesWithParams(c echo.Context) error {
// @Produce json
// @Success 200 {object} []aggregateIndexesByGroup "Requisição bem sucedida."
// @Failure 500 {string} string "Erro interno do servidor."
// @Router /v2/indice [get]
// @Router /v2/indice [get]
func (h handler) V2GetAggregateIndexes(c echo.Context) error {
agregado := c.QueryParam("agregado")
detalhe := c.QueryParam("detalhe")
Expand Down Expand Up @@ -843,6 +845,7 @@ func (h handler) V2GetAllAgencyInformation(c echo.Context) error {
FoodAllowance: c.Summary.ItemSummary.FoodAllowance,
BonusLicense: c.Summary.ItemSummary.BonusLicense,
VacationCompensation: c.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: c.Summary.ItemSummary.ChristmasBonus,
Others: c.Summary.ItemSummary.Others,
},
},
Expand Down
1 change: 1 addition & 0 deletions papi/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type itemSummary struct {
FoodAllowance float64 `json:"auxilio_alimentacao"`
BonusLicense float64 `json:"licenca_premio"`
VacationCompensation float64 `json:"indenizacao_de_ferias"`
ChristmasBonus float64 `json:"gratificacao_natalina"`
Others float64 `json:"outras"` // valor agregado de outras rubricas não identificadas
}

Expand Down
4 changes: 4 additions & 0 deletions uiapi/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (h handler) V2GetSummaryOfAgency(c echo.Context) error {
FoodAllowance: agencyMonthlyInfo.Summary.ItemSummary.FoodAllowance,
BonusLicense: agencyMonthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: agencyMonthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: agencyMonthlyInfo.Summary.ItemSummary.ChristmasBonus,
Others: agencyMonthlyInfo.Summary.ItemSummary.Others,
},
}
Expand Down Expand Up @@ -344,6 +345,7 @@ func (h handler) V2GetTotalsOfAgencyYear(c echo.Context) error {
FoodAllowance: agencyMonthlyInfo.Summary.ItemSummary.FoodAllowance,
BonusLicense: agencyMonthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: agencyMonthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: agencyMonthlyInfo.Summary.ItemSummary.ChristmasBonus,
Others: agencyMonthlyInfo.Summary.ItemSummary.Others,
},
}
Expand Down Expand Up @@ -602,6 +604,7 @@ func (h handler) V2GetGeneralRemunerationFromYear(c echo.Context) error {
FoodAllowance: d.ItemSummary.FoodAllowance,
BonusLicense: d.ItemSummary.BonusLicense,
VacationCompensation: d.ItemSummary.VacationCompensation,
ChristmasBonus: d.ItemSummary.ChristmasBonus,
Others: d.ItemSummary.Others,
},
})
Expand Down Expand Up @@ -819,6 +822,7 @@ func (h handler) GetAnnualSummary(c echo.Context) error {
FoodAllowance: s.ItemSummary.FoodAllowance,
BonusLicense: s.ItemSummary.BonusLicense,
VacationCompensation: s.ItemSummary.VacationCompensation,
ChristmasBonus: s.ItemSummary.ChristmasBonus,
Others: s.ItemSummary.Others,
}
annualData = append(annualData, annualSummaryData{
Expand Down
1 change: 1 addition & 0 deletions uiapi/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ type itemSummary struct {
FoodAllowance float64 `json:"auxilio_alimentacao"`
BonusLicense float64 `json:"licenca_premio"`
VacationCompensation float64 `json:"indenizacao_de_ferias"`
ChristmasBonus float64 `json:"gratificacao_natalina"`
Others float64 `json:"outras"` // valor agregado de outras rubricas não identificadas
}

Expand Down
8 changes: 8 additions & 0 deletions uiapi/uiapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (g getSummaryOfAgency) testWhenDataExists(t *testing.T) {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 120,
"outras": 200
}
}
Expand Down Expand Up @@ -959,6 +960,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
FoodAllowance: 100,
BonusLicense: 150,
VacationCompensation: 125,
ChristmasBonus: 175,
Others: 200,
},
},
Expand Down Expand Up @@ -1010,6 +1012,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"indenizacao_de_ferias": 125,
"gratificacao_natalina": 175,
"outras": 200
}
},
Expand All @@ -1024,6 +1027,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
"auxilio_alimentacao": 100,
"licenca_premio": 0,
"indenizacao_de_ferias": 0,
"gratificacao_natalina": 0,
"outras": 200
}
}
Expand Down Expand Up @@ -1182,6 +1186,7 @@ func (g getTotalsOfAgencyYear) testWhenDataExists(t *testing.T) {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 120,
"outras": 200
}
}
Expand Down Expand Up @@ -1331,6 +1336,7 @@ func (g getAnnualSummary) testWhenDataExists(t *testing.T) {
FoodAllowance: 100,
BonusLicense: 150,
VacationCompensation: 130,
ChristmasBonus: 170,
Others: 200,
},
},
Expand Down Expand Up @@ -1397,6 +1403,7 @@ func (g getAnnualSummary) testWhenDataExists(t *testing.T) {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 170,
"outras": 200
}
}
Expand Down Expand Up @@ -1584,6 +1591,7 @@ func agencyMonthlyInfos() []models.AgencyMonthlyInfo {
FoodAllowance: 100,
BonusLicense: 150,
VacationCompensation: 130,
ChristmasBonus: 120,
Others: 200,
},
},
Expand Down
Loading