Second upload

This commit is contained in:
qi_0527 2024-11-15 00:44:35 +08:00
parent 25340124f9
commit f11f8cdd33

View File

@ -56,7 +56,7 @@ namespace WebApi_data_value.Controllers
return Ok(parkingLog); return Ok(parkingLog);
} }
// 下載即時車位 Excel 檔 #region Excel
[HttpGet("DownloadCurrentStatusExcel")] [HttpGet("DownloadCurrentStatusExcel")]
public async Task<IActionResult> DownloadCurrentStatusExcel() public async Task<IActionResult> DownloadCurrentStatusExcel()
{ {
@ -117,9 +117,9 @@ namespace WebApi_data_value.Controllers
} }
} }
} }
#endregion
#region Excel
// 下載 Excel 檔案
[HttpGet("DownloadExcel")] [HttpGet("DownloadExcel")]
public async Task<IActionResult> DownloadExcel(DateTime startDate, DateTime endDate, string interval) public async Task<IActionResult> DownloadExcel(DateTime startDate, DateTime endDate, string interval)
{ {
@ -192,10 +192,12 @@ namespace WebApi_data_value.Controllers
return File(content, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName); return File(content, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName);
} }
} }
} }
#endregion
// 自動下載 Excel 檔 #region Excel
[HttpGet("AutoDownloadExcel")] [HttpGet("AutoDownloadExcel")]
public async Task<IActionResult> AutoDownloadExcel() public async Task<IActionResult> AutoDownloadExcel()
{ {
@ -263,17 +265,12 @@ namespace WebApi_data_value.Controllers
string fileName = $"停車紀錄-{currentDate}-{weekDay}.xlsx"; string fileName = $"停車紀錄-{currentDate}-{weekDay}.xlsx";
return File(content, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName); return File(content, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", fileName);
} }
} }
} }
#endregion
#region
// 獲取停車紀錄
private async Task<IActionResult> GetParkingLogs(DateTime startDate, DateTime endDate, int pageNumber, int pageSize) private async Task<IActionResult> GetParkingLogs(DateTime startDate, DateTime endDate, int pageNumber, int pageSize)
{ {
@ -398,6 +395,7 @@ namespace WebApi_data_value.Controllers
}); });
} }
} }
#endregion
} }
} }