Add Report V2 เพื่อทดสอบการสสร้างตัว generate report ด้วย dotnet 6

This commit is contained in:
Suphonchai Phoonsawat 2023-08-23 18:22:41 +07:00
parent c179b14839
commit 63403121ae
220 changed files with 3105 additions and 483 deletions

View file

@ -466,20 +466,23 @@ namespace BMA.EHR.Command.Service.Controllers
/// <summary>
/// PM7-24 : dropdown รอบการสอบ หน้ารายละเอียดการออกคำสั่ง
/// </summary>
/// <param name="commandCode">Code ของประเภทคำสั่ง</param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("detail/exam-round")]
[HttpGet("detail/exam-round/{commandCode}")]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<ActionResult<ResponseObject>> GetExamRoundAsync()
public async Task<ActionResult<ResponseObject>> GetExamRoundAsync(string commandCode)
{
try
{
var data = (await _placementRepository.GetAllAsync())
.Select(x => new
var rawData = commandCode.Trim().ToUpper() == "C-PM-01" ? await _placementRepository.GetCompetitivePlacementAsync() : await _placementRepository.GetQualifyingPlacementAsync();
var data = rawData.Select(x => new
{
examRoundValue = x.Id,
examRoundName = $"{x.Name} ครั้งที่ {x.Round}/{x.Year.ToThaiYear()}"