164 lines
6.8 KiB
C#
164 lines
6.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.Employee.DTO;
|
|
using CompanyManagment.App.Contracts.EmployeeInsuranceRecord;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
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<List<EmployeeSelectListViewModel>> GetEmployeeToList();
|
|
List<EmployeeViewModel> GetEmployee();
|
|
Task<List<EmployeeViewModel>> Search(EmployeeSearchModel searchModel);
|
|
|
|
List<EmployeeInsuranceRecordViewModel> SearchInsuranceRecord(EmployeeInsuranceRecordSearchModel searchModel);
|
|
OperationResult CreateEmployeeInsuranceRecord(CreateEmployeeInsuranceRecord command);
|
|
OperationResult EditEmployeeInsuranceRecord(EditEmployeeInsuranceRecord command);
|
|
void RemoveEmployeeInsuranceRecord(long Id);
|
|
OperationResult ValidationEmployeeInsuranceRecord(EmployeeInsuranceRecordViewModel eir);
|
|
OperationResult ValidationEmployeeInsuranceRecord(List<CreateEmployeeInsuranceRecord> eir_lst);
|
|
OperationResult ValidationEmployeeCompleteItem(long employeeId);
|
|
|
|
List<EmployeeViewModel> GetEmployeeByTextSearch(string textSearch);
|
|
List<EmployeeViewModel> SearchForClient(EmployeeSearchModel searchModel);
|
|
OperationResult Remove(long id);
|
|
List<EmployeeViewModel> GetEmployeeByTextSearchForClient(string textSearch, long workshopId);
|
|
List<EmployeeViewModel> GetEmployeeByTextSearchNationalCodeForClient(string textSearch, long workshopId);
|
|
List<EmployeeViewModel> GetEmployeeByTextSearchInsuranceCodeForClient(string textSearch, long workshopId);
|
|
OperationResult CreateEmployeeForClient(CreateEmployee command);
|
|
OperationResult EditEmployeeForClient(EditEmployee command);
|
|
EditEmployee GetDetailsForClient(long id, long workshopId);
|
|
|
|
#region NewByHeydari
|
|
List<EmployeeViewModel> SearchForMain(EmployeeSearchModel searchModel);
|
|
#endregion
|
|
#region Pooya
|
|
|
|
List<EmployeeViewModel> GetRangeByIds(IEnumerable<long> employeeIds);
|
|
EmployeeViewModel GetEmployeeByNationalCodeIfHasActiveLeftWork(string nationalCode, List<long> workshopIds);
|
|
List<EmployeeViewModel> GetWorkingEmployeesByWorkshopId(long workshopId);
|
|
|
|
|
|
EmployeeViewModel GetEmployeeByNationalCodeIfHasLeftWork(string nationalCode, List<long> workshopIds);
|
|
#endregion
|
|
|
|
#region Mahan
|
|
OperationResult CreateEmployeeByClient(CreateEmployeeByClient command);
|
|
|
|
/// <summary>
|
|
/// اطلاعات پرسنل با کد ملی در کارگاه. اگر در کارگاه کار نکرده باشه وجود نداشته باشه اطلاعات خالی داده میشه
|
|
/// </summary>
|
|
/// <param name="nationalCode"></param>
|
|
/// <param name="birthDate"></param>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<OperationResult<EmployeeByNationalCodeInWorkshopViewModel>>
|
|
ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(string nationalCode,
|
|
string birthDate,bool authorizedCanceled, long workshopId);
|
|
|
|
/// <summary>
|
|
/// پرسنل هایی که در کارگاهی از سمت ادمین شروع به کار کرده اند
|
|
/// </summary>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<ICollection<ClientStartedWorkEmployeesDto>> GetClientEmployeesStartWork(long workshopId);
|
|
Task<ICollection<ClientLeftWorkWorkEmployeesDto>> GetEmployeesForLeftWorkTemp(long workshopId);
|
|
Task<GetEditEmployeeInEmployeeDocumentViewModel> GetEmployeeEditInEmployeeDocumentWorkFlow(long employeeId,
|
|
long workshopId);
|
|
Task<OperationResult> EditEmployeeInEmployeeDocumentWorkFlow(EditEmployeeInEmployeeDocument command);
|
|
|
|
[Obsolete("این متد منسوخ شده است و از متد WorkedEmployeesInWorkshopSelectList استفاده کنید")]
|
|
Task<List<EmployeeSelectListViewModel>> WorkedEmployeesInWorkshopSelectList(long workshopId);
|
|
|
|
Task<OperationResult<EmployeeDataFromApiViewModel>> GetEmployeeDataFromApi(string nationalCode, string birthDate);
|
|
|
|
|
|
#endregion
|
|
|
|
#region Api
|
|
|
|
/// <summary>
|
|
/// لیست پرسنل برای جستجو
|
|
/// </summary>
|
|
/// <param name="searchText"></param>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
Task<List<EmployeeSelectListViewModel>> GetSelectList(string searchText, long id);
|
|
|
|
/// <summary>
|
|
/// لیست کل پرسنل
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task<List<GetEmployeeListViewModel>> GetList(GetEmployeeListSearchModel searchModel);
|
|
|
|
/// <summary>
|
|
/// لیست کل پرسنل کلاینت
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<List<GetClientEmployeeListViewModel>> GetClientEmployeeList(GetClientEmployeeListSearchModel searchModel, long workshopId);
|
|
|
|
|
|
/// <summary>
|
|
/// دریافت لیست پرسنل کلاینت
|
|
/// api
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<List<EmployeeListDto>> ListOfAllEmployeesClient(EmployeeSearchModelDto searchModel, long workshopId);
|
|
|
|
/// <summary>
|
|
/// پرینت تجمیعی پرسنل کلاینت
|
|
/// api
|
|
/// </summary>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<List<PrintAllEmployeesInfoDtoClient>> PrintAllEmployeesInfoClient(long workshopId);
|
|
|
|
/// <summary>
|
|
/// سلکت لیست پرسنل های کارگاه کلاینت
|
|
/// </summary>
|
|
/// <param name="workshopId"></param>
|
|
/// <returns></returns>
|
|
Task<List<EmployeeSelectListViewModel>> GetWorkingEmployeesSelectList(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; }
|
|
} |