Files
Backend-Api/Company.Domain/LeftWorkAgg/ILeftWorkRepository.cs
2025-03-02 20:48:09 +03:30

43 lines
2.4 KiB
C#

using System;
using System.Collections.Generic;
using _0_Framework.Application;
using _0_Framework.Domain;
using CompanyManagment.App.Contracts.LeftWork;
using CompanyManagment.App.Contracts.PersonnleCode;
namespace Company.Domain.LeftWorkAgg;
public interface ILeftWorkRepository : IRepository<long, LeftWork>
{
EditLeftWork GetDetails(long id);
string StartWork(long employeeId, long workshopId, string leftWork);
List<LeftWorkViewModel> searchByWorkshopId(long workshopId);
List<LeftWorkViewModel> search(LeftWorkSearchModel searchModel);
LeftWorkViewModel CheckoutleftWorkCheck(DateTime contractStart, long workshopId, long employeeId);
OperationResult RemoveLeftWork(long id);
#region Mahan
/// <summary>
/// این متد با پارامتر های خواسته شده یک ترک کار را برمیگرداند
/// </summary>
/// <param name="workshopId">آیدی کارگاه</param>
/// <param name="employeeId">آیدی پرسنل</param>
/// <param name="dateTime">تاریخی که بین شروع کار و ترک کار باشد</param>
/// <returns>یک کلاس از جنس اطلاعات ترک کار</returns>
LeftWorkViewModel GetByDateAndWorkshopIdAndEmployeeId(long workshopId, long employeeId, DateTime dateTime);
List<long> GetAllEmployeeIdsInWorkshop(long workshopId);
#endregion
List<LeftWorkViewModel> GetLeftPersonelByWorkshopId(List<long> workshopIds);
OperationResult RemoveAllLeftWork(long workshopId, long employeeId);
List<LeftWorkViewModel> SearchLeftWork(LeftWorkSearchModel searchModel);
OperationResult CreateLeftWork(InformationLeftwork informationLeftwork);
OperationResult CreateLeftWorkByLeftWorkGroups(string employeeFullName, long commandEmployeeId, List<PersonnelCodeViewModel> commandPersonnelCode, List<LeftWorkGroup> 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<LeftWorkViewModel> GetByWorkshopIdInDates(long workshopId, DateTime startDateGr, DateTime endDateGr);
LeftWorkViewModel GetByWorkshopIdEmployeeIdInDates(long workshopId, long employeeId, DateTime start, DateTime end);
#endregion
}