mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
adjust take weight remaining
This commit is contained in:
@@ -1576,18 +1576,18 @@ func (s *repportService) GetHppPerKandang(ctx *fiber.Ctx) (*dto.HppPerKandangRes
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
eggMap, err := s.HppPerKandangRepo.GetWeightRemainingByProjectFlockKandangIDs(ctx.Context(), startOfDay, endOfDay, validPfkIDs)
|
// eggMap, err := s.HppPerKandangRepo.GetWeightRemainingByProjectFlockKandangIDs(ctx.Context(), startOfDay, endOfDay, validPfkIDs)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, nil, err
|
// return nil, nil, err
|
||||||
}
|
// }
|
||||||
for pfkID, egg := range eggMap {
|
// for pfkID, egg := range eggMap {
|
||||||
if rowIdx, ok := pfkIndex[pfkID]; ok {
|
// if rowIdx, ok := pfkIndex[pfkID]; ok {
|
||||||
repoRows[rowIdx].EggProductionWeightKgRemaining = egg.EggProductionWeightKgRemaining
|
// repoRows[rowIdx].EggProductionWeightKgRemaining = egg.EggProductionWeightKgRemaining
|
||||||
// repoRows[rowIdx].EggProductionPiecesRemaining = egg.EggProductionPiecesRemaining
|
// // repoRows[rowIdx].EggProductionPiecesRemaining = egg.EggProductionPiecesRemaining
|
||||||
// repoRows[rowIdx].EggProductionTotalWeightKg = egg.EggProductionTotalWeightKg
|
// // repoRows[rowIdx].EggProductionTotalWeightKg = egg.EggProductionTotalWeightKg
|
||||||
// repoRows[rowIdx].EggProductionTotalPieces = egg.EggProductionTotalPieces
|
// // repoRows[rowIdx].EggProductionTotalPieces = egg.EggProductionTotalPieces
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
costMap := make(map[uint]HppCostAggregate, len(costRows))
|
costMap := make(map[uint]HppCostAggregate, len(costRows))
|
||||||
@@ -1673,7 +1673,7 @@ func (s *repportService) GetHppPerKandang(ctx *fiber.Ctx) (*dto.HppPerKandangRes
|
|||||||
}
|
}
|
||||||
|
|
||||||
var eggPiecesFloatRemaining float64
|
var eggPiecesFloatRemaining float64
|
||||||
eggRemainingWeightFloatRemaining := row.EggProductionWeightKgRemaining
|
var eggRemainingWeightFloatRemaining float64
|
||||||
var eggTotalPiecesFloat float64
|
var eggTotalPiecesFloat float64
|
||||||
var eggWeightFloat float64
|
var eggWeightFloat float64
|
||||||
eggHpp := 0.0
|
eggHpp := 0.0
|
||||||
@@ -1683,7 +1683,7 @@ func (s *repportService) GetHppPerKandang(ctx *fiber.Ctx) (*dto.HppPerKandangRes
|
|||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
if hppCost != nil {
|
if hppCost != nil {
|
||||||
// eggRemainingWeightFloatRemaining = hppCost.Estimation.Kg - hppCost.Real.Kg
|
eggRemainingWeightFloatRemaining = hppCost.Estimation.Kg - hppCost.Real.Kg
|
||||||
eggPiecesFloatRemaining = hppCost.Estimation.Butir - hppCost.Real.Butir
|
eggPiecesFloatRemaining = hppCost.Estimation.Butir - hppCost.Real.Butir
|
||||||
eggHpp = hppCost.Estimation.HargaKg
|
eggHpp = hppCost.Estimation.HargaKg
|
||||||
eggTotalPiecesFloat = hppCost.Estimation.Butir
|
eggTotalPiecesFloat = hppCost.Estimation.Butir
|
||||||
|
|||||||
Reference in New Issue
Block a user