using System.Collections.Generic; using System.Threading.Tasks; using _0_Framework.Application; using CompanyManagment.App.Contracts.Employee.DTO; using CompanyManagment.App.Contracts.EmployeeInsuranceRecord; namespace CompanyManagment.App.Contracts.Employee; public interface IEmployeeApplication { OperationResult Create(CreateEmployee command); OperationResult Edit(EditEmployee command); EditEmployee GetDetails(long id); OperationResult Active(long id); OperationResult DeActive(long id); Task> GetEmployeeToList(); List GetEmployee(); Task> Search(EmployeeSearchModel searchModel); List SearchInsuranceRecord(EmployeeInsuranceRecordSearchModel searchModel); OperationResult CreateEmployeeInsuranceRecord(CreateEmployeeInsuranceRecord command); OperationResult EditEmployeeInsuranceRecord(EditEmployeeInsuranceRecord command); void RemoveEmployeeInsuranceRecord(long Id); OperationResult ValidationEmployeeInsuranceRecord(EmployeeInsuranceRecordViewModel eir); OperationResult ValidationEmployeeInsuranceRecord(List eir_lst); OperationResult ValidationEmployeeCompleteItem(long employeeId); List GetEmployeeByTextSearch(string textSearch); List SearchForClient(EmployeeSearchModel searchModel); OperationResult Remove(long id); List GetEmployeeByTextSearchForClient(string textSearch, long workshopId); List GetEmployeeByTextSearchNationalCodeForClient(string textSearch, long workshopId); List GetEmployeeByTextSearchInsuranceCodeForClient(string textSearch, long workshopId); OperationResult CreateEmployeeForClient(CreateEmployee command); OperationResult EditEmployeeForClient(EditEmployee command); EditEmployee GetDetailsForClient(long id, long workshopId); #region NewByHeydari List SearchForMain(EmployeeSearchModel searchModel); #endregion #region Pooya List GetRangeByIds(IEnumerable employeeIds); EmployeeViewModel GetEmployeeByNationalCodeIfHasActiveLeftWork(string nationalCode, List workshopIds); List GetWorkingEmployeesByWorkshopId(long workshopId); EmployeeViewModel GetEmployeeByNationalCodeIfHasLeftWork(string nationalCode, List workshopIds); #endregion #region Mahan OperationResult CreateEmployeeByClient(CreateEmployeeByClient command); /// /// اطلاعات پرسنل با کد ملی در کارگاه. اگر در کارگاه کار نکرده باشه وجود نداشته باشه اطلاعات خالی داده میشه /// /// /// /// /// Task> ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(string nationalCode, string birthDate,bool authorizedCanceled, long workshopId); /// /// پرسنل هایی که در کارگاهی از سمت ادمین شروع به کار کرده اند /// /// /// Task> GetClientEmployeesStartWork(long workshopId); Task> GetEmployeesForLeftWorkTemp(long workshopId); Task GetEmployeeEditInEmployeeDocumentWorkFlow(long employeeId, long workshopId); Task EditEmployeeInEmployeeDocumentWorkFlow(EditEmployeeInEmployeeDocument command); Task> WorkedEmployeesInWorkshopSelectList(long workshopId); Task> GetEmployeeDataFromApi(string nationalCode, string birthDate); #endregion #region Api /// /// لیست پرسنل برای جستجو /// /// /// /// Task> GetSelectList(string searchText, long id); /// /// لیست کل پرسنل /// /// Task> GetList(GetEmployeeListSearchModel searchModel); /// /// لیست کل پرسنل کلاینت /// /// /// /// Task> GetClientEmployeeList(GetClientEmployeeListSearchModel searchModel, long workshopId); #endregion } public class GetClientEmployeeListSearchModel { } public class GetClientEmployeeListViewModel { public string FullName { get; set; } public long EmployeeId { get; set; } public long WorkshopId { get; set; } public long PersonnelCode { get; set; } public string MaritalStatus { get; set; } public string NationalCode { get; set; } public string IdNumber { get; set; } public string DateOfBirthFa { get; set; } public string FatherName { get; set; } public int ChildrenCount { get; set; } public string LastStartInsuranceWork { get; set; } public string LastLeftInsuranceWork { get; set; } public string LastStartContractWork { get; set; } public string LastLeftContractWork { get; set; } public bool HasContractLeftWork { get; set; } public bool HasInsuranceLeftWork { get; set; } public bool LeftWorkCompletely { get; set; } public bool PendingStartWork { get; set; } public bool PendingLeftWork { get; set; } }