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

retornando licenca compensatoria #577

Merged
merged 1 commit into from
Mar 8, 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 @@ -1052,6 +1052,9 @@ const docTemplate = `{
"indenizacao_de_ferias": {
"type": "number"
},
"licenca_compensatoria": {
"type": "number"
},
"licenca_premio": {
"type": "number"
},
Expand Down Expand Up @@ -1400,6 +1403,9 @@ const docTemplate = `{
"indenizacao_de_ferias": {
"type": "number"
},
"licenca_compensatoria": {
"type": "number"
},
"licenca_premio": {
"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 @@ -1043,6 +1043,9 @@
"indenizacao_de_ferias": {
"type": "number"
},
"licenca_compensatoria": {
"type": "number"
},
"licenca_premio": {
"type": "number"
},
Expand Down Expand Up @@ -1391,6 +1394,9 @@
"indenizacao_de_ferias": {
"type": "number"
},
"licenca_compensatoria": {
"type": "number"
},
"licenca_premio": {
"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 @@ -191,6 +191,8 @@ definitions:
type: number
indenizacao_de_ferias:
type: number
licenca_compensatoria:
type: number
licenca_premio:
type: number
outras:
Expand Down Expand Up @@ -424,6 +426,8 @@ definitions:
type: number
indenizacao_de_ferias:
type: number
licenca_compensatoria:
type: number
licenca_premio:
type: number
outras:
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-20240215133808-01101e0b3766
github.com/dadosjusbr/storage v0.0.0-20240307002251-d7ccaca9cd29
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 @@ -46,6 +46,8 @@ github.com/dadosjusbr/storage v0.0.0-20240205184937-b9805fd9200e h1:3cH5bjKv7JDu
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/dadosjusbr/storage v0.0.0-20240307002251-d7ccaca9cd29 h1:PoZPA1Nt+HDFNbR2cAciWffdcoK+Bxc5Emh1kkOJNXk=
github.com/dadosjusbr/storage v0.0.0-20240307002251-d7ccaca9cd29/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 @@ -337,6 +337,7 @@ func (h handler) V2GetMonthlyInfo(c echo.Context) error {
BonusLicense: monthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: monthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: monthlyInfo.Summary.ItemSummary.ChristmasBonus,
CompensatoryLicense: monthlyInfo.Summary.ItemSummary.CompensatoryLicense,
Others: monthlyInfo.Summary.ItemSummary.Others,
},
},
Expand Down Expand Up @@ -464,6 +465,7 @@ func (h handler) GetMonthlyInfosByYear(c echo.Context) error {
BonusLicense: mi.Summary.ItemSummary.BonusLicense,
VacationCompensation: mi.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: mi.Summary.ItemSummary.ChristmasBonus,
CompensatoryLicense: mi.Summary.ItemSummary.CompensatoryLicense,
Others: mi.Summary.ItemSummary.Others,
},
},
Expand Down Expand Up @@ -678,7 +680,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 @@ -846,6 +848,7 @@ func (h handler) V2GetAllAgencyInformation(c echo.Context) error {
BonusLicense: c.Summary.ItemSummary.BonusLicense,
VacationCompensation: c.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: c.Summary.ItemSummary.ChristmasBonus,
CompensatoryLicense: c.Summary.ItemSummary.CompensatoryLicense,
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 @@ -27,6 +27,7 @@ type itemSummary struct {
BonusLicense float64 `json:"licenca_premio"`
VacationCompensation float64 `json:"indenizacao_de_ferias"`
ChristmasBonus float64 `json:"gratificacao_natalina"`
CompensatoryLicense float64 `json:"licenca_compensatoria"`
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 @@ -127,6 +127,7 @@ func (h handler) V2GetSummaryOfAgency(c echo.Context) error {
BonusLicense: agencyMonthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: agencyMonthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: agencyMonthlyInfo.Summary.ItemSummary.ChristmasBonus,
CompensatoryLicense: agencyMonthlyInfo.Summary.ItemSummary.CompensatoryLicense,
Others: agencyMonthlyInfo.Summary.ItemSummary.Others,
},
}
Expand Down Expand Up @@ -346,6 +347,7 @@ func (h handler) V2GetTotalsOfAgencyYear(c echo.Context) error {
BonusLicense: agencyMonthlyInfo.Summary.ItemSummary.BonusLicense,
VacationCompensation: agencyMonthlyInfo.Summary.ItemSummary.VacationCompensation,
ChristmasBonus: agencyMonthlyInfo.Summary.ItemSummary.ChristmasBonus,
CompensatoryLicense: agencyMonthlyInfo.Summary.ItemSummary.CompensatoryLicense,
Others: agencyMonthlyInfo.Summary.ItemSummary.Others,
},
}
Expand Down Expand Up @@ -605,6 +607,7 @@ func (h handler) V2GetGeneralRemunerationFromYear(c echo.Context) error {
BonusLicense: d.ItemSummary.BonusLicense,
VacationCompensation: d.ItemSummary.VacationCompensation,
ChristmasBonus: d.ItemSummary.ChristmasBonus,
CompensatoryLicense: d.ItemSummary.CompensatoryLicense,
Others: d.ItemSummary.Others,
},
})
Expand Down Expand Up @@ -823,6 +826,7 @@ func (h handler) GetAnnualSummary(c echo.Context) error {
BonusLicense: s.ItemSummary.BonusLicense,
VacationCompensation: s.ItemSummary.VacationCompensation,
ChristmasBonus: s.ItemSummary.ChristmasBonus,
CompensatoryLicense: s.ItemSummary.CompensatoryLicense,
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 @@ -277,6 +277,7 @@ type itemSummary struct {
BonusLicense float64 `json:"licenca_premio"`
VacationCompensation float64 `json:"indenizacao_de_ferias"`
ChristmasBonus float64 `json:"gratificacao_natalina"`
CompensatoryLicense float64 `json:"licenca_compensatoria"`
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 @@ -104,6 +104,7 @@ func (g getSummaryOfAgency) testWhenDataExists(t *testing.T) {
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 120,
"licenca_compensatoria": 120,
"outras": 200
}
}
Expand Down Expand Up @@ -961,6 +962,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
BonusLicense: 150,
VacationCompensation: 125,
ChristmasBonus: 175,
CompensatoryLicense: 120,
Others: 200,
},
},
Expand Down Expand Up @@ -1013,6 +1015,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
"licenca_premio": 150,
"indenizacao_de_ferias": 125,
"gratificacao_natalina": 175,
"licenca_compensatoria": 120,
"outras": 200
}
},
Expand All @@ -1028,6 +1031,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
"licenca_premio": 0,
"indenizacao_de_ferias": 0,
"gratificacao_natalina": 0,
"licenca_compensatoria": 0,
"outras": 200
}
}
Expand Down Expand Up @@ -1187,6 +1191,7 @@ func (g getTotalsOfAgencyYear) testWhenDataExists(t *testing.T) {
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 120,
"licenca_compensatoria": 120,
"outras": 200
}
}
Expand Down Expand Up @@ -1337,6 +1342,7 @@ func (g getAnnualSummary) testWhenDataExists(t *testing.T) {
BonusLicense: 150,
VacationCompensation: 130,
ChristmasBonus: 170,
CompensatoryLicense: 120,
Others: 200,
},
},
Expand Down Expand Up @@ -1404,6 +1410,7 @@ func (g getAnnualSummary) testWhenDataExists(t *testing.T) {
"licenca_premio": 150,
"indenizacao_de_ferias": 130,
"gratificacao_natalina": 170,
"licenca_compensatoria": 120,
"outras": 200
}
}
Expand Down Expand Up @@ -1592,6 +1599,7 @@ func agencyMonthlyInfos() []models.AgencyMonthlyInfo {
BonusLicense: 150,
VacationCompensation: 130,
ChristmasBonus: 120,
CompensatoryLicense: 120,
Others: 200,
},
},
Expand Down
Loading