เพิ่มโหลดวันที่จ่ายเงินผู้สมัคร

This commit is contained in:
Kittapath 2023-06-08 12:26:54 +07:00
parent e8cb94c541
commit 1223720994
8 changed files with 3272 additions and 287 deletions

View file

@ -804,6 +804,34 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers
return Error(ex);
}
}
/// <summary>
/// โหลดผู้สมัครสอบ(รายละเอียดชำระเงิน)
/// </summary>
/// <param name="examId">รหัสรอบสมัคร</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านโหลดผู้สมัครสอบ(รายละเอียดชำระเงิน)สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("download/payment/{examId:length(36)}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> DownloadCandidatePaymentAllAsync(string examId)
{
try
{
var stream = await _periodExamService.DownloadCandidatePaymentAllAsync(examId);
string excelName = $"Candidate_Payment_{DateTime.Now.ToString("yyyyMMddHHmmssfff")}.xlsx";
return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", excelName);
// return Success();
}
catch (Exception ex)
{
return Error(ex);
}
}
#endregion
}
}