Skip to content

Commit

Permalink
Merge pull request #574 from dadosjusbr/retornando-rubricas-zeradas
Browse files Browse the repository at this point in the history
retornando rubricas zeradas
  • Loading branch information
joellensilva authored Jan 24, 2024
2 parents a40c36c + 0c635de commit 3c44da1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
6 changes: 3 additions & 3 deletions papi/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ type summary struct {
}

type itemSummary struct {
FoodAllowance float64 `json:"auxilio_alimentacao,omitempty"`
BonusLicense float64 `json:"licenca_premio,omitempty"`
Others float64 `json:"outras,omitempty"` // valor agregado de outras rubricas não identificadas
FoodAllowance float64 `json:"auxilio_alimentacao"`
BonusLicense float64 `json:"licenca_premio"`
Others float64 `json:"outras"` // valor agregado de outras rubricas não identificadas
}

type summaries struct {
Expand Down
6 changes: 3 additions & 3 deletions uiapi/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ type annualSummaryData struct {
}

type itemSummary struct {
FoodAllowance float64 `json:"auxilio_alimentacao,omitempty"`
BonusLicense float64 `json:"licenca_premio,omitempty"`
Others float64 `json:"outras,omitempty"` // valor agregado de outras rubricas não identificadas
FoodAllowance float64 `json:"auxilio_alimentacao"`
BonusLicense float64 `json:"licenca_premio"`
Others float64 `json:"outras"` // valor agregado de outras rubricas não identificadas
}

type mensalRemuneration struct {
Expand Down
18 changes: 16 additions & 2 deletions uiapi/uiapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ func (g getSummaryOfAgency) testWhenDataExists(t *testing.T) {
"total_remuneracao": 7.099024400000013e+06,
"tem_proximo": true,
"tem_anterior": true,
"resumo_rubricas": {}
"resumo_rubricas": {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"outras": 200
}
}
`

Expand Down Expand Up @@ -1015,6 +1019,7 @@ func (g getGenerealRemunerationFromYear) testWhenDataExists(t *testing.T) {
"remuneracoes": 21000,
"resumo_rubricas": {
"auxilio_alimentacao": 100,
"licenca_premio": 0,
"outras": 200
}
}
Expand Down Expand Up @@ -1169,7 +1174,11 @@ func (g getTotalsOfAgencyYear) testWhenDataExists(t *testing.T) {
"nanos": 1
},
"total_membros": 214,
"resumo_rubricas": {}
"resumo_rubricas": {
"auxilio_alimentacao": 100,
"licenca_premio": 150,
"outras": 200
}
}
],
"package": {
Expand Down Expand Up @@ -1564,6 +1573,11 @@ func agencyMonthlyInfos() []models.AgencyMonthlyInfo {
40000: 210,
50000: 0,
},
ItemSummary: models.ItemSummary{
FoodAllowance: 100,
BonusLicense: 150,
Others: 200,
},
},
CrawlerVersion: "unspecified",
CrawlerRepo: "https://github.com/dadosjusbr/coletor-cnj",
Expand Down

0 comments on commit 3c44da1

Please sign in to comment.