feat[BE-378]:Create API Get All HPP Harian Kandang

This commit is contained in:
MacBook Air M1
2025-12-28 18:41:46 +07:00
parent 824eb5905f
commit 10f42ed9c4
7 changed files with 977 additions and 1 deletions
@@ -164,3 +164,26 @@ func (c *RepportController) GetPurchaseSupplier(ctx *fiber.Ctx) error {
Data: result,
})
}
func (c *RepportController) GetHppPerKandang(ctx *fiber.Ctx) error {
data, meta, err := c.RepportService.GetHppPerKandang(ctx)
if err != nil {
return err
}
resp := struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Meta dto.HppPerKandangMetaDTO `json:"meta"`
Data dto.HppPerKandangResponseData `json:"data"`
}{
Code: fiber.StatusOK,
Status: "success",
Message: "Get HPP harian kandang layer successfully",
Meta: *meta,
Data: *data,
}
return ctx.Status(fiber.StatusOK).JSON(resp)
}