mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-23 14:55:42 +00:00
feat: Refactor closing services and add ClosingKeuanganService
- Updated ClosingRoutes to include ClosingKeuanganService. - Removed GetClosingKeuangan method from ClosingService interface and its implementation. - Introduced new ClosingKeuanganService with GetClosingKeuangan method to handle financial logic. - Implemented detailed logging and error handling in the new service. - Added GetTotalWeightProducedFromUniformityByProjectFlockID method in RecordingRepository to support weight calculations. - Enhanced the logic for fetching and classifying product usage data by flags. - Built comprehensive DTO responses for HPP and Profit Loss sections.
This commit is contained in:
@@ -14,14 +14,16 @@ import (
|
||||
)
|
||||
|
||||
type ClosingController struct {
|
||||
ClosingService service.ClosingService
|
||||
SapronakService service.SapronakService
|
||||
ClosingService service.ClosingService
|
||||
SapronakService service.SapronakService
|
||||
ClosingKeuanganService service.ClosingKeuanganService
|
||||
}
|
||||
|
||||
func NewClosingController(closingService service.ClosingService, sapronakService service.SapronakService) *ClosingController {
|
||||
func NewClosingController(closingService service.ClosingService, sapronakService service.SapronakService, closingKeuanganService service.ClosingKeuanganService) *ClosingController {
|
||||
return &ClosingController{
|
||||
ClosingService: closingService,
|
||||
SapronakService: sapronakService,
|
||||
ClosingService: closingService,
|
||||
SapronakService: sapronakService,
|
||||
ClosingKeuanganService: closingKeuanganService,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +340,7 @@ func (u *ClosingController) GetClosingKeuangan(c *fiber.Ctx) error {
|
||||
return fiber.NewError(fiber.StatusBadRequest, "Invalid Project Flock Id")
|
||||
}
|
||||
|
||||
result, err := u.ClosingService.GetClosingKeuangan(c, uint(projectFlockID))
|
||||
result, err := u.ClosingKeuanganService.GetClosingKeuangan(c, uint(projectFlockID))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user