From 5380dad68ee740c2f5b177d629e0bab35e6cb373 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 21 Jan 2025 13:31:54 +0700 Subject: [PATCH] fixing report result by no --- .../Repositories/Reports/ProbationReportRepository.cs | 4 ++-- .../Controllers/ProbationReportController.cs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs index 9c99690c..46433515 100644 --- a/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/ProbationReportRepository.cs @@ -887,9 +887,9 @@ namespace BMA.EHR.Application.Repositories.Reports #endregion #region 18 แบบรายงานการประเมินผล (สำหรับประธาน และ กรณีขยายเวลา) - public async Task GetEvaluateResultAssignAsync(Guid id, string token) + public async Task GetEvaluateResultAssignAsync(Guid id, int no, string token) { - var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}"; + var api_url = $"{_configuration["APIPROBATION"]}/evaluate-result?assign_id={id}&evaluate_no={no}"; EvaluateResultAssignResponse evaluate_assign; using (var client = new HttpClient()) { diff --git a/BMA.EHR.Report.Service/Controllers/ProbationReportController.cs b/BMA.EHR.Report.Service/Controllers/ProbationReportController.cs index fdba84fb..de66404d 100644 --- a/BMA.EHR.Report.Service/Controllers/ProbationReportController.cs +++ b/BMA.EHR.Report.Service/Controllers/ProbationReportController.cs @@ -31,7 +31,7 @@ namespace BMA.EHR.Report.Service.Controllers public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration, ProbationReportRepository repository, GenericReportGenerator reportGenerator) { - + _hostingEnvironment = hostingEnvironment; _configuration = configuration; _repository = repository; @@ -66,7 +66,7 @@ namespace BMA.EHR.Report.Service.Controllers token = authorizationHeader.Substring("Bearer ".Length).Trim(); var probation = await _repository.GetProbationAssignAsync(id, token); - if(probation != null) + if (probation != null) { var mimeType = ""; switch (exportType.Trim().ToLower()) @@ -1064,8 +1064,8 @@ namespace BMA.EHR.Report.Service.Controllers /// เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ /// ไม่ได้ Login เข้าระบบ /// เมื่อเกิดข้อผิดพลาดในการทำงาน - [HttpGet("18/{exportType}/{id}")] - public async Task> GetProbation19ConvertReportAsync(Guid id, string exportType = "pdf") + [HttpGet("18/{exportType}/{id}/{no}")] + public async Task> GetProbation19ConvertReportAsync(Guid id, int no, string exportType = "pdf") { try { @@ -1075,7 +1075,7 @@ namespace BMA.EHR.Report.Service.Controllers if (!string.IsNullOrEmpty(authorizationHeader) && authorizationHeader.StartsWith("Bearer ")) { token = authorizationHeader.Substring("Bearer ".Length).Trim(); - var evaluateAssign = await _repository.GetEvaluateResultAssignAsync(id, token); + var evaluateAssign = await _repository.GetEvaluateResultAssignAsync(id, no, token); if (evaluateAssign != null) {