using GB5Shared.DTO.Framework.Criteria;
using GB5Shared.DTO.Framework.Login;
namespace MMDAL.CustomCode.Allocation
{
///
/// Interface defining the Data Access Layer contract for Allocation operations.
///
public interface IAllocationDAL
{
///
/// Fetches a single allocation header record by its primary key.
///
Task GetAllocation(int AllocationId, LoginDTO LoginDTO);
///
/// Executes a paginated SQL Server query to load allocation picklist records.
/// Supports dynamic filtering by OU, item code/name, document header, biz transaction type,
/// item-wise grouping, and pending quantity rules.
///
/// Zero-based row offset for pagination.
/// Maximum rows to return.
/// Structured filter criteria from the UI.
/// User session and connection context.
/// JSON-serialized List<AllocationNewDTO>.
Task LoadFromAllocationPicklist(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO);
///
/// Oracle-specific path for loading pending allocation data.
/// Mirrors the logic of but targets Oracle's
/// trigger-based TPendingAllocation schema. Supports multi-head-type routing
/// (MM Document, Indent), biz transaction type filtering, item/party/OU filters,
/// and quantity-type pending checks (Good/Rejected/Rework/Other).
///
/// Structured filter criteria from the UI.
/// User session and Oracle connection context.
/// JSON-serialized List<AllocationNewDTO>.
Task GetPendingAllocationForOracle(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO);
///
/// GB4 Source: AllocationDAL.GetPendingNewListForProductionPlan ("production plan For Hilife").
/// GB4 route: /Allocation/PendingAllocationSelectList. Head-type/NeedAllTag branching
/// (MM Document compact/full, Indent) mirrors ;
/// the MM-Document compact branch additionally joins MLABEL/MGCM for warp-type/label
/// (fabric design) columns specific to this variant.
///
/// JSON-serialized List<AllocationNewDTO>.
Task GetPendingNewListForProductionPlan(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO);
}
}