using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Threading; using System.Threading.Tasks; using GB5Shared.DTO.Framework.Criteria; using GB5Shared.DTO.Framework.Login; using PayRollDAL.DTO.OverTime; namespace PayRollDAL.CustomeCode.OverTime { public interface IOverTimeDAL { Task GetSelectListOverTime(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, bool IsCount = false); Task GetOverTimeDetailReport(int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, bool IsCount = false); // ── SaveOverTime ───────────────────────────────────────────────────────────── Task SaveOverTime(OverTimeDTO overTimeDTO, LoginDTO loginDTO, DbTransaction? transaction = null); Task UpdateOverTime(OverTimeDTO overTimeDTO, LoginDTO loginDTO, DbTransaction? transaction = null); Task SaveOverTimeDetail(OverTimeDetailDTO detailDTO, LoginDTO loginDTO, DbTransaction? transaction = null); Task DeleteOverTimeDetails(int overTimeId, LoginDTO loginDTO, DbTransaction? transaction = null); Task GetEmployeeReportingInfo(int employeeId, LoginDTO loginDTO, DbTransaction? transaction = null); /// /// Looks up Z_DEPTWISEOUWISEHEAD (addon table that may not exist in every /// deployment). Returns -1 when not found or the table does not exist — /// mirrors GB4's try/catch swallow-and-continue behaviour. /// Task GetOuWiseDepartmentWiseHeadId(int ouId, int departmentId, LoginDTO loginDTO, DbTransaction? transaction = null); Task<(DateTime FromDate, DateTime ToDate)?> GetPeriodRange(int periodId, LoginDTO loginDTO, DbTransaction? transaction = null); Task GetBizTransactionTypeNOGenerationType(int bizTransactionTypeId, LoginDTO loginDTO, DbTransaction? transaction = null); Task CheckDuplicateOverTimeEntry(int employeeId, DateTime forTheDate, LoginDTO loginDTO, DbTransaction? transaction = null); // ── Get / Delete ───────────────────────────────────────────────────────────── Task GetOverTime(int overTimeId, LoginDTO loginDTO); Task> GetOverTimeDetailsByHeader(int overTimeId, LoginDTO loginDTO); Task DeleteOverTime(int overTimeId, LoginDTO loginDTO, DbTransaction? transaction = null); // ── LoadOvertimeRecords ────────────────────────────────────────────────────── Task> LoadOvertimeRecords(CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, CancellationToken ct = default); // ── LoadDailyAttendanceDataToOverTime ──────────────────────────────────────── Task> LoadDailyAttendanceDataToOverTime( int FirstNumber, int MaxResult, CriteriaDTO CriteriaDTO, LoginDTO LoginDTO, CancellationToken ct = default); // ── PostAutoOverTime support ───────────────────────────────────────────────── Task GetBizTypeForOverTime(int ouId, int periodId, LoginDTO loginDTO, DbTransaction? transaction = null); Task> GetEmployeesWithOvertime(int ouId, DateTime attendanceDate, LoginDTO loginDTO, DbTransaction? transaction = null); Task DeleteAutoPostedOverTime(int ouId, int periodId, DateTime attendanceDate, LoginDTO loginDTO, DbTransaction? transaction = null); } }