create levave api and get rotating shift api
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using CompanyManagment.App.Contracts.Leave;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -47,14 +48,61 @@ public class LeaveController : ClientBaseController
|
||||
return Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// چک کردن تاریخ شروع مرخصی
|
||||
/// </summary>
|
||||
/// <param name="startLeaveDate"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("CheckIsInvalidLeave")]
|
||||
public async Task<OperationResult<CheckIsInvalidLeaveDto>> CheckIsInvalidLeave(string startLeaveDate)
|
||||
{
|
||||
return await _leaveApplication.CheckIsInvalidLeave(startLeaveDate, _workshopId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد مرخصی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("CreateLeave")]
|
||||
public async Task<ActionResult<OperationResult>> CreateLeave([FromBody] CreateLeaveDto command)
|
||||
{
|
||||
command.WorkshopId = _workshopId;
|
||||
|
||||
var result = await _leaveApplication.CreateLeave(command);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت شیفت گردشی اگر داشت
|
||||
/// </summary>
|
||||
/// <param name="startLeaveDate"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetRotatingShift")]
|
||||
public async Task<OperationResult<RotatingShiftDto>> GetRotatingShift(long employeeId, string startLeaveDate)
|
||||
{
|
||||
|
||||
return await _leaveApplication.HasRotatingShift(_workshopId, employeeId, startLeaveDate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// پرینت تکی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("print/{id}")]
|
||||
public async Task<ActionResult<LeavePrintResponseViewModel>> PrintOneAsync(long id)
|
||||
{
|
||||
var leavePrint = await _leaveApplication.PrintOneAsync(id, _workshopId);
|
||||
return leavePrint;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// پرینت گروهی
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("print")]
|
||||
public async Task<ActionResult<List<LeavePrintResponseViewModel>>> PrintAllAsync([FromQuery] List<long> ids)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user