From eb8352e8fcfe51de8ada41776100ac5a62e14a60 Mon Sep 17 00:00:00 2001 From: mahan Date: Wed, 14 Jan 2026 09:37:55 +0330 Subject: [PATCH] add rollcall download excel controller. --- .../Controllers/RollCall/CaseHistoryController.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs b/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs index cb2e3ff5..1e709fa0 100644 --- a/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs +++ b/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs @@ -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 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)