apiคนพิการ
This commit is contained in:
parent
be27aa4d33
commit
1d4043a50e
37 changed files with 9794 additions and 298 deletions
|
|
@ -670,6 +670,34 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// โหลดผู้สมัครสอบ(รายละเอียด)
|
||||
/// </summary>
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านโหลดผู้สมัครสอบ(รายละเอียด)สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("download/detail/{examId:length(36)}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> DownloadCandidateAllAsync(string examId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var stream = await _periodExamService.DownloadCandidateAllAsync(examId);
|
||||
|
||||
string excelName = $"Candidate_{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xlsx";
|
||||
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", excelName);
|
||||
// return Success();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Error(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ข้อมูลตำแหน่งสมัครสอบ
|
||||
/// <param name="examId">รหัสรอบสมัคร</param>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue