add rollcall download excel controller.

This commit is contained in:
2026-01-14 09:37:55 +03:30
parent 4c7599b568
commit eb8352e8fc

View File

@@ -1,4 +1,5 @@
using _0_Framework.Application;
using CompanyManagement.Infrastructure.Excel.RollCall;
using CompanyManagment.App.Contracts.RollCall;
using Microsoft.AspNetCore.Mvc;
using ServiceHost.BaseControllers;
@@ -49,6 +50,16 @@ public class CaseHistoryController : ClientBaseController
{
return await _rollCallApplication.GetCaseHistoryDetails(_workshopId, titleId, searchModel);
}
[HttpGet("excel")]
public async Task<IActionResult> GetDownload()
{
byte[] excelBytes = RollCallExcelGenerator.CaseHistoryExcelForOneDay(caseHistoryRollCallExcelForOneDay);
return File(excelBytes,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
$"{workshopFullName} - {caseHistoryRollCallExcelForOneDay.DayOfWeekFa}،{caseHistoryRollCallExcelForOneDay.DateFa}.xlsx");
}
// [HttpGet("edit")]
// public ActionResult<> GetEditDetails(string date,long employeeId)