change excel download api controller

This commit is contained in:
2026-01-14 10:20:58 +03:30
parent eb8352e8fc
commit 90fa0ac8f8

View File

@@ -52,9 +52,10 @@ public class CaseHistoryController : ClientBaseController
}
[HttpGet("excel")]
public async Task<IActionResult> GetDownload()
public async Task<IActionResult> GetDownload(string titleId,RollCallCaseHistorySearchModel searchModel)
{
byte[] excelBytes = RollCallExcelGenerator.CaseHistoryExcelForOneDay(caseHistoryRollCallExcelForOneDay);
var data = await _rollCallApplication.GetCaseHistoryDetails(_workshopId, titleId, searchModel);
byte[] excelBytes = RollCallExcelGenerator.CaseHistoryExcelForOneDay(data);
return File(excelBytes,
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
$"{workshopFullName} - {caseHistoryRollCallExcelForOneDay.DayOfWeekFa}،{caseHistoryRollCallExcelForOneDay.DateFa}.xlsx");