mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-22 14:25:45 +00:00
base example counting sapronak
This commit is contained in:
@@ -74,3 +74,24 @@ func (u *ClosingController) GetOne(c *fiber.Ctx) error {
|
||||
Data: dto.ToClosingListDTO(*result),
|
||||
})
|
||||
}
|
||||
|
||||
func (u *ClosingController) GetSapronakReport(c *fiber.Ctx) error {
|
||||
query := &validation.SapronakQuery{
|
||||
ProjectFlockID: uint(c.QueryInt("project_flock_id", 0)),
|
||||
KandangID: uint(c.QueryInt("kandang_id", 0)),
|
||||
Status: c.Query("status"),
|
||||
}
|
||||
|
||||
result, err := u.ClosingService.GetSapronakReport(c, query)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Status(fiber.StatusOK).
|
||||
JSON(response.Success{
|
||||
Code: fiber.StatusOK,
|
||||
Status: "success",
|
||||
Message: "Get sapronak report successfully",
|
||||
Data: result,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user