using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using PayRollDAL.DTO.OverTime; namespace PayRollBLL.OverTime { public interface IOverTimeBLL { Task GetSelectListOverTime(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO); Task GetOverTimeDetailReport(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, bool IsCount = false); /// /// Saves or updates an OverTime record with its detail lines. /// mirrors GB4's SameTransaction parameter — /// when supplied, PostAutoOverTime batches every per-employee save into a single /// caller-owned transaction instead of opening one per call. /// Task SaveOverTime(OverTimeDTO overTimeDTO, LoginDTO loginDTO, DbTransaction? sameTransaction = null, CancellationToken ct = default); Task Get(int overTimeId, LoginDTO loginDTO); Task Delete(int overTimeId, LoginDTO loginDTO); Task> LoadOvertimeRecords(CriteriaDTO criteriaDTO, LoginDTO loginDTO, CancellationToken ct = default); Task> LoadDailyAttendanceDataToOverTime( int firstNumber, int maxResult, CriteriaDTO criteriaDTO, LoginDTO loginDTO, CancellationToken ct = default); /// /// Batch-posts OverTime entries from daily attendance for every OU (or a specific /// OUId) across every day in [FromDate, ToDate]. FromDate/ToDate == "NONE" or "" /// mean "use today's date"; both must be supplied together or neither. /// Implemented synchronously per GB4 SVC contract — see final migration report /// for the recommendation to move this to a background job. /// Task PostAutoOverTime(int ouId, string fromDate, string toDate, LoginDTO loginDTO, CancellationToken ct = default); } }