mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
adjust response get one general information closing
This commit is contained in:
@@ -28,19 +28,19 @@ type ClosingDetailDTO struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ClosingSummaryDTO struct {
|
type ClosingSummaryDTO struct {
|
||||||
LocationID uint `json:"location_id"`
|
FlockID uint `json:"flock_id"`
|
||||||
Periode int `json:"periode"`
|
Period int `json:"period"`
|
||||||
JenisProduk string `json:"jenis_produk"`
|
// JenisProduk string `json:"jenis_produk"`
|
||||||
LabelPopulasi string `json:"label_populasi"`
|
// LabelPopulasi string `json:"label_populasi"`
|
||||||
JumlahPopulasi int `json:"jumlah_populasi"`
|
Population int `json:"population"`
|
||||||
JumlahPopulasiFormatted string `json:"jumlah_populasi_formatted"`
|
PopulationFormatted string `json:"population_formatted"`
|
||||||
JenisProject string `json:"jenis_project"`
|
ProjectType string `json:"project_type"`
|
||||||
KandangAktif int `json:"kandang_aktif"`
|
ActiveHouseCount int `json:"active_house_count"`
|
||||||
KandangAktifFormatted string `json:"kandang_aktif_formatted"`
|
ActiveHouseLabel string `json:"active_house_label"`
|
||||||
StatusPembayaranPenjualan string `json:"status_pembayaran_penjualan"`
|
SalesPaymentStatus string `json:"sales_payment_status"`
|
||||||
StatusPembayaranMitra string `json:"status_pembayaran_mitra"`
|
// StatusPembayaranMitra string `json:"status_pembayaran_mitra"`
|
||||||
StatusProject string `json:"status_project"`
|
StatusProject string `json:"project_status"`
|
||||||
StatusClosing string `json:"status_closing"`
|
StatusClosing string `json:"closing_status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToClosingSummaryDTO(project entity.ProjectFlock, statusProject, statusClosing string) ClosingSummaryDTO {
|
func ToClosingSummaryDTO(project entity.ProjectFlock, statusProject, statusClosing string) ClosingSummaryDTO {
|
||||||
@@ -52,19 +52,19 @@ func ToClosingSummaryDTO(project entity.ProjectFlock, statusProject, statusClosi
|
|||||||
populationInt := int(population)
|
populationInt := int(population)
|
||||||
|
|
||||||
return ClosingSummaryDTO{
|
return ClosingSummaryDTO{
|
||||||
LocationID: project.LocationId,
|
FlockID: project.Id,
|
||||||
Periode: period,
|
Period: period,
|
||||||
JenisProduk: project.Category,
|
// JenisProduk: project.Category,
|
||||||
LabelPopulasi: "",
|
// LabelPopulasi: "",
|
||||||
JumlahPopulasi: populationInt,
|
Population: populationInt,
|
||||||
JumlahPopulasiFormatted: fmt.Sprintf("%d Ekor", populationInt),
|
PopulationFormatted: fmt.Sprintf("%d Ekor", populationInt),
|
||||||
JenisProject: "",
|
ProjectType: project.Category,
|
||||||
KandangAktif: kandangCount,
|
ActiveHouseCount: kandangCount,
|
||||||
KandangAktifFormatted: fmt.Sprintf("%d Kandang", kandangCount),
|
ActiveHouseLabel: fmt.Sprintf("%d Kandang", kandangCount),
|
||||||
StatusPembayaranPenjualan: "Tempo",
|
SalesPaymentStatus: "Tempo",
|
||||||
StatusPembayaranMitra: "",
|
// StatusPembayaranMitra: "",
|
||||||
StatusProject: statusProject,
|
StatusProject: statusProject,
|
||||||
StatusClosing: statusClosing,
|
StatusClosing: statusClosing,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user