mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
initial refactori trasnfer to laying, and depretitation to 25 week
This commit is contained in:
@@ -312,10 +312,10 @@ func (u *ProjectflockController) LookupProjectFlockKandang(c *fiber.Ctx) error {
|
||||
mapped := warehouseDTO.ToWarehouseRelationDTO(*warehouse)
|
||||
dtoResult.Warehouse = &mapped
|
||||
}
|
||||
if _, isLaying, serr := u.ProjectflockService.GetProjectFlockKandangTransferStateAtDate(c, result.Id, recordDate); serr != nil {
|
||||
if isTransition, isLaying, serr := u.ProjectflockService.GetProjectFlockKandangTransferStateAtDate(c, result.Id, recordDate); serr != nil {
|
||||
return serr
|
||||
} else {
|
||||
dtoResult.IsTransition = false
|
||||
dtoResult.IsTransition = isTransition
|
||||
dtoResult.IsLaying = isLaying
|
||||
}
|
||||
applyCutOverLayingLookupOverride(&dtoResult)
|
||||
@@ -346,7 +346,7 @@ func (u *ProjectflockController) LookupProjectFlockKandang(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
func applyCutOverLayingLookupOverride(result *dto.ProjectFlockKandangDTO) {
|
||||
if result == nil || result.ProjectFlock == nil || result.IsLaying || result.ChickInDate == nil {
|
||||
if result == nil || result.ProjectFlock == nil || result.IsLaying || result.IsTransition || result.ChickInDate == nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user