Files
Backend-Api/ServiceHost/Areas/Client/Controllers/RollCallController.cs

35 lines
1.3 KiB
C#

using _0_Framework.Application;
using Company.Domain.CheckoutAgg;
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.RollCall;
using Microsoft.AspNetCore.Mvc;
using ServiceHost.BaseControllers;
namespace ServiceHost.Areas.Client.Controllers;
public class RollCallController:ClientBaseController
{
private long _workshopId;
private readonly IRollCallApplication _rollCallApplication;
private readonly IEmployeeApplication _employeeApplication;
public RollCallController(IRollCallApplication rollCallApplication,IAuthHelper authHelper, IEmployeeApplication employeeApplication)
{
_rollCallApplication = rollCallApplication;
_employeeApplication = employeeApplication;
_workshopId = authHelper.GetWorkshopId();
}
[HttpGet("current-day")]
public ActionResult<CurrentDayRollCall> GetCurrentDay(WorkshopCurrentDayRollCallSearchModel searchModel)
{
var res = _rollCallApplication.GetWorkshopCurrentDayRollCalls(_workshopId, searchModel);
return res;
}
[HttpGet("employee-select-list")]
public async Task<ActionResult<List<EmployeeSelectListViewModel>>> GetEmployeeSelectList()
{
var res = await _employeeApplication.GetWorkingEmployeesSelectList(_workshopId);
return res;
}
}