57 lines
3.0 KiB
C#
57 lines
3.0 KiB
C#
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<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);
|
|
LeftWork GetLastLeftWorkByEmployeeIdAndWorkshopId(long workshopId, long employeeId);
|
|
|
|
|
|
#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
|
|
|
|
Task<LeftWork> GetLastLeftWork(long employeeId, long workshopId);
|
|
List<LeftWorkViewModel> SearchCreateContract(LeftWorkSearchModel searchModel);
|
|
|
|
/// <summary>
|
|
/// دریافت اطلاعات کارگاه و پرسنل برای ایجاد قرارداد
|
|
/// </summary>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
AutoExtensionDto AutoExtentionEmployees(long workshopId);
|
|
} |