diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs index aa12e16..21883db 100644 --- a/Controllers/DisableController.cs +++ b/Controllers/DisableController.cs @@ -1594,21 +1594,21 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers // ใช้ dictionary lookup แทน query DB ทีละรอบ if (!string.IsNullOrEmpty(r.ExamId) && recruitsDict.TryGetValue(r.ExamId, out var recruit)) { - var apiUrl = $"{_configuration["API"]}/org/find/head/officer"; - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); - client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); - var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); - var _res = await client.SendAsync(_req); - var _result = await _res.Content.ReadAsStringAsync(); - if (_res.IsSuccessStatusCode) - { - var org = JsonConvert.DeserializeObject(_result); - recruit.AuthName = org.result.name == null ? "" : org.result.name; - recruit.AuthPosition = org.result.position == null ? "" : org.result.position; - } - } + // var apiUrl = $"{_configuration["API"]}/org/find/head/officer"; + // using (var client = new HttpClient()) + // { + // client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.Replace("Bearer ", "")); + // client.DefaultRequestHeaders.Add("api_key", _configuration["API_KEY"]); + // var _req = new HttpRequestMessage(HttpMethod.Get, apiUrl); + // var _res = await client.SendAsync(_req); + // var _result = await _res.Content.ReadAsStringAsync(); + // if (_res.IsSuccessStatusCode) + // { + // var org = JsonConvert.DeserializeObject(_result); + // recruit.AuthName = org.result.name == null ? "" : org.result.name; + // recruit.AuthPosition = org.result.position == null ? "" : org.result.position; + // } + // } r.CitizenId = workSheet?.Cells[row, 3]?.GetValue();