using System; using System.Collections.Generic; using System.Threading.Tasks; using _0_Framework.Application; using _0_Framework.Domain; using CompanyManagment.App.Contracts.LeftWork; using CompanyManagment.App.Contracts.PersonnleCode; using CompanyManagment.App.Contracts.Workshop.DTOs; namespace Company.Domain.LeftWorkAgg; public interface ILeftWorkRepository : IRepository { EditLeftWork GetDetails(long id); string StartWork(long employeeId, long workshopId, string leftWork); List searchByWorkshopId(long workshopId); List search(LeftWorkSearchModel searchModel); LeftWorkViewModel CheckoutleftWorkCheck(DateTime contractStart, long workshopId, long employeeId); OperationResult RemoveLeftWork(long id); #region Mahan /// /// این متد با پارامتر های خواسته شده یک ترک کار را برمیگرداند /// /// آیدی کارگاه /// آیدی پرسنل /// تاریخی که بین شروع کار و ترک کار باشد /// یک کلاس از جنس اطلاعات ترک کار LeftWorkViewModel GetByDateAndWorkshopIdAndEmployeeId(long workshopId, long employeeId, DateTime dateTime); List GetAllEmployeeIdsInWorkshop(long workshopId); LeftWork GetLastLeftWorkByEmployeeIdAndWorkshopId(long workshopId, long employeeId); #endregion List GetLeftPersonelByWorkshopId(List workshopIds); OperationResult RemoveAllLeftWork(long workshopId, long employeeId); List SearchLeftWork(LeftWorkSearchModel searchModel); OperationResult CreateLeftWork(InformationLeftwork informationLeftwork); OperationResult CreateLeftWorkByLeftWorkGroups(string employeeFullName, long commandEmployeeId, List commandPersonnelCode, List leftWorkGroups); OperationResult CheckDeleteLeftWork(long workshopId, long employeeId, DateTime date, int type); OperationResult CheckEditLeftWork(long workshopId, long employeeId, DateTime date, int type); #region Pooya bool IsEmployeeWorkingInDates(long employeeId, long workshopId, List<(DateTime, DateTime)> dates); List GetByWorkshopIdInDates(long workshopId, DateTime startDateGr, DateTime endDateGr); LeftWorkViewModel GetByWorkshopIdEmployeeIdInDates(long workshopId, long employeeId, DateTime start, DateTime end); #endregion Task GetLastLeftWork(long employeeId, long workshopId); List SearchCreateContract(LeftWorkSearchModel searchModel); /// /// دریافت اطلاعات کارگاه و پرسنل برای ایجاد قرارداد /// /// /// AutoExtensionDto AutoExtentionEmployees(long workshopId); }