fixing report result by no

This commit is contained in:
Warunee Tamkoo 2025-01-21 13:31:54 +07:00
parent 92b1c01efc
commit 32c9812b83
2 changed files with 7 additions and 7 deletions

View file

@ -887,9 +887,9 @@ namespace BMA.EHR.Application.Repositories.Reports
#endregion #endregion
#region 18 ( ) #region 18 ( )
public async Task<object> GetEvaluateResultAssignAsync(Guid id, string token) public async Task<object> 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; EvaluateResultAssignResponse evaluate_assign;
using (var client = new HttpClient()) using (var client = new HttpClient())
{ {

View file

@ -31,7 +31,7 @@ namespace BMA.EHR.Report.Service.Controllers
public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration, ProbationReportRepository repository, GenericReportGenerator reportGenerator) public ProbationReportController(IWebHostEnvironment hostingEnvironment, IConfiguration configuration, ProbationReportRepository repository, GenericReportGenerator reportGenerator)
{ {
_hostingEnvironment = hostingEnvironment; _hostingEnvironment = hostingEnvironment;
_configuration = configuration; _configuration = configuration;
_repository = repository; _repository = repository;
@ -66,7 +66,7 @@ namespace BMA.EHR.Report.Service.Controllers
token = authorizationHeader.Substring("Bearer ".Length).Trim(); token = authorizationHeader.Substring("Bearer ".Length).Trim();
var probation = await _repository.GetProbationAssignAsync(id, token); var probation = await _repository.GetProbationAssignAsync(id, token);
if(probation != null) if (probation != null)
{ {
var mimeType = ""; var mimeType = "";
switch (exportType.Trim().ToLower()) switch (exportType.Trim().ToLower())
@ -1064,8 +1064,8 @@ namespace BMA.EHR.Report.Service.Controllers
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response> /// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response> /// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response> /// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("18/{exportType}/{id}")] [HttpGet("18/{exportType}/{id}/{no}")]
public async Task<ActionResult<ResponseObject>> GetProbation19ConvertReportAsync(Guid id, string exportType = "pdf") public async Task<ActionResult<ResponseObject>> GetProbation19ConvertReportAsync(Guid id, int no, string exportType = "pdf")
{ {
try try
{ {
@ -1075,7 +1075,7 @@ namespace BMA.EHR.Report.Service.Controllers
if (!string.IsNullOrEmpty(authorizationHeader) && authorizationHeader.StartsWith("Bearer ")) if (!string.IsNullOrEmpty(authorizationHeader) && authorizationHeader.StartsWith("Bearer "))
{ {
token = authorizationHeader.Substring("Bearer ".Length).Trim(); token = authorizationHeader.Substring("Bearer ".Length).Trim();
var evaluateAssign = await _repository.GetEvaluateResultAssignAsync(id, token); var evaluateAssign = await _repository.GetEvaluateResultAssignAsync(id, no, token);
if (evaluateAssign != null) if (evaluateAssign != null)
{ {