54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
using _0_Framework.Application;
|
|
using CompanyManagment.App.Contracts.Employee;
|
|
using CompanyManagment.App.Contracts.Employee.DTO;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using ServiceHost.BaseControllers;
|
|
|
|
namespace ServiceHost.Areas.Client.Controllers;
|
|
|
|
public class EmployeeController:ClientBaseController
|
|
{
|
|
private readonly IEmployeeApplication _employeeApplication;
|
|
private readonly long _workshopId;
|
|
|
|
public EmployeeController(IEmployeeApplication employeeApplication,IAuthHelper authHelper)
|
|
{
|
|
_employeeApplication = employeeApplication;
|
|
_workshopId = authHelper.GetWorkshopId();
|
|
}
|
|
|
|
|
|
[HttpGet("select-list")]
|
|
public async Task<ActionResult<List<EmployeeSelectListViewModel>>> GetEmployeeSelectList()
|
|
{
|
|
var result = await _employeeApplication.GetWorkingEmployeesSelectList(_workshopId);
|
|
return result;
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// دریافت لیست پرسنل
|
|
/// </summary>
|
|
/// <param name="searchModel"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
public async Task<ActionResult<List<EmployeeListDto>>> GetList(EmployeeSearchModelDto searchModel)
|
|
{
|
|
var result = await _employeeApplication.ListOfAllEmployeesClient(searchModel, _workshopId);
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
/// پرینت تجمیعی پرسنل
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpGet("PrintAllEmployeesInfo")]
|
|
public async Task<ActionResult<List<PrintAllEmployeesInfoDtoClient>>> PrintAllEmployeesInfo()
|
|
{
|
|
var result = await _employeeApplication.PrintAllEmployeesInfoClient(_workshopId);
|
|
return result;
|
|
}
|
|
|
|
|
|
} |