mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
Merge branch 'feat/hpp-per-farm' into 'development'
Feat/hpp per farm See merge request mbugroup/lti-api!602
This commit is contained in:
@@ -480,6 +480,29 @@ func (c *RepportController) GetHppPerKandang(ctx *fiber.Ctx) error {
|
||||
return ctx.Status(fiber.StatusOK).JSON(resp)
|
||||
}
|
||||
|
||||
func (c *RepportController) GetHppPerFarm(ctx *fiber.Ctx) error {
|
||||
data, meta, err := c.RepportService.GetHppPerFarm(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
resp := struct {
|
||||
Code int `json:"code"`
|
||||
Status string `json:"status"`
|
||||
Message string `json:"message"`
|
||||
Meta dto.HppPerFarmMetaDTO `json:"meta"`
|
||||
Data dto.HppPerFarmResponseData `json:"data"`
|
||||
}{
|
||||
Code: fiber.StatusOK,
|
||||
Status: "success",
|
||||
Message: "Get HPP per farm successfully",
|
||||
Meta: *meta,
|
||||
Data: *data,
|
||||
}
|
||||
|
||||
return ctx.Status(fiber.StatusOK).JSON(resp)
|
||||
}
|
||||
|
||||
func (c *RepportController) GetCustomerPayment(ctx *fiber.Ctx) error {
|
||||
var customerIDs []uint
|
||||
if customerIDsStr := ctx.Query("customer_ids"); customerIDsStr != "" {
|
||||
|
||||
Reference in New Issue
Block a user