add ListPrint

This commit is contained in:
SamSys
2025-12-27 12:06:02 +03:30
parent a638913172
commit 54c67fe8f7
2 changed files with 85 additions and 2 deletions

View File

@@ -0,0 +1,71 @@
using System.Collections.Generic;
namespace CompanyManagment.App.Contracts.Leave;
public class LeavePrintListDto
{
/// <summary>
/// نام کامل پرسنل
/// </summary>
public string EmployeeFullName { get; set; }
/// <summary>
/// لیست مرخصی
/// </summary>
public List<LeavePrintListItemsDto> LeavePrintListItemsDto { get; set; }
/// <summary>
/// مجموع مرخصی پرسنل
/// </summary>
public string? SumOfEmployeeleaves { get; set; }
}
public class LeavePrintListItemsDto
{
/// <summary>
/// سال مرخصی
/// </summary>
public string YearStr { get; set; }
/// <summary>
/// ماه مرخصی
/// </summary>
public string MonthStr { get; set; }
/// <summary>
/// نوع مرخصی، استحقاقی/استعلاجی
/// </summary>
public string LeaveType { get; set; }
/// <summary>
/// تاریخ شروع مرخصی
/// </summary>
public string StartLeave { get; set; }
/// <summary>
/// تاریخ پایان مرخصی
/// </summary>
public string EndLeave { get; set; }
/// <summary>
/// زمان مرخصی
/// بازه مرخصی ساعتی
/// </summary>
public string HourlyInterval { get; set; }
/// <summary>
/// مدت مرخصی
/// </summary>
public string LeaveDuration { get; set; }
/// <summary>
/// موافقت/عدم موافقت کارفرما
/// </summary>
public bool IsAccepted { get; set; }
}

View File

@@ -104,10 +104,22 @@ public class LeaveController : ClientBaseController
/// <param name="ids"></param>
/// <returns></returns>
[HttpGet("print")]
public async Task<ActionResult<List<LeavePrintResponseViewModel>>> PrintAllAsync([FromQuery] List<long> ids)
public async Task<ActionResult<List<LeavePrintResponseViewModel>>> PrintAllAsync([FromQuery] List<long> ids, LeaveListSearchModel searchModel)
{
var leavePrints = await _leaveApplication.PrintAllAsync(ids, _workshopId);
return Ok(leavePrints);
}
/// <summary>
/// پرینت گروهی
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpGet("ListPrint")]
public async Task<OperationResult<LeavePrintListDto>> ListPrint([FromQuery] List<long> ids,)
{
var leavePrints = await _leaveApplication.PrintAllAsync(ids, _workshopId);
return Ok(leavePrints);
}
}