From 122f02ac97bd6ce64beea10211bcbea86a29bc88 Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Mon, 20 Jul 2026 12:31:03 +0700 Subject: [PATCH 1/4] =?UTF-8?q?check=20=E0=B8=81=E0=B8=B2=E0=B8=A3=20repro?= =?UTF-8?q?cess=20=E0=B8=96=E0=B9=89=E0=B8=B2=20task=20=E0=B8=99=E0=B8=B1?= =?UTF-8?q?=E0=B9=89=E0=B8=99=E0=B9=84=E0=B8=A1=E0=B9=88=E0=B9=84=E0=B8=94?= =?UTF-8?q?=E0=B9=89=20pedning=20=E0=B9=81=E0=B8=A5=E0=B9=89=E0=B8=A7?= =?UTF-8?q?=E0=B9=83=E0=B8=AB=E0=B9=89=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A1?= =?UTF-8?q?=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B8=99=E0=B8=B1=E0=B9=89=E0=B8=99?= =?UTF-8?q?=E0=B9=84=E0=B8=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Leave/Controllers/LeaveController.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/BMA.EHR.Leave/Controllers/LeaveController.cs b/BMA.EHR.Leave/Controllers/LeaveController.cs index 1480affd..cfef0c83 100644 --- a/BMA.EHR.Leave/Controllers/LeaveController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveController.cs @@ -30,6 +30,7 @@ using RabbitMQ.Client.Events; using Swashbuckle.AspNetCore.Annotations; using System.ComponentModel.DataAnnotations; using System.Diagnostics; +using System.Reflection.Metadata.Ecma335; using System.Security.Claims; using System.Text; using System.Threading.Tasks; @@ -779,6 +780,16 @@ namespace BMA.EHR.Leave.Service.Controllers { try { + // var get current status + var task = await _checkInJobStatusRepository.GetByTaskIdAsync(job.TaskId); + + // return if stask status != "PENDING" + if (task is not null) + { + if (task.Status != "PENDING") + continue; + } + // อ่านข้อมูลเดิมจาก AdditionalData if (string.IsNullOrEmpty(job.AdditionalData)) { @@ -1075,6 +1086,9 @@ namespace BMA.EHR.Leave.Service.Controllers try { + + + // อัปเดตสถานะเป็น PROCESSING if (taskId != Guid.Empty) { From 9c9576692a1dee659963e5326a569c45d232555d Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Mon, 20 Jul 2026 13:47:40 +0700 Subject: [PATCH 2/4] fix niti api url --- BMA.EHR.Leave/Services/NotificationService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Leave/Services/NotificationService.cs b/BMA.EHR.Leave/Services/NotificationService.cs index 3ada008e..7ea4837c 100644 --- a/BMA.EHR.Leave/Services/NotificationService.cs +++ b/BMA.EHR.Leave/Services/NotificationService.cs @@ -11,15 +11,22 @@ public class NotificationService private readonly ILogger _logger; private readonly IConfiguration _configuration; - private const string NotifyEndpoint = "https://hrmsbkk.case-collection.com/api/v1/org/through-socket/notify-from-token"; + private string _notifyEndpoint; public NotificationService(IHttpClientFactory httpClientFactory, ILogger logger, IConfiguration configuration) { _httpClientFactory = httpClientFactory; _logger = logger; _configuration = configuration; + _notifyEndpoint = $"{_configuration["API"]}/org/through-socket/notify-from-token"; } + /// + /// SendNotificationAsync + /// + /// + /// + /// public async Task SendNotificationAsync(string? token, bool error, string message) { if (string.IsNullOrEmpty(token)) @@ -42,7 +49,7 @@ public class NotificationService var json = JsonConvert.SerializeObject(payload); var content = new StringContent(json, Encoding.UTF8, "application/json"); - var response = await client.PostAsync(NotifyEndpoint, content); + var response = await client.PostAsync(_notifyEndpoint, content); if (!response.IsSuccessStatusCode) { From fe40df025f2abb854301b82ceed91e583c153992 Mon Sep 17 00:00:00 2001 From: harid Date: Mon, 20 Jul 2026 14:20:20 +0700 Subject: [PATCH 3/4] =?UTF-8?q?=E0=B9=81=E0=B8=A2=E0=B8=81=20Hangfire=20Ta?= =?UTF-8?q?blesPrefix=20=E0=B8=A3=E0=B8=B0=E0=B8=AB=E0=B8=A7=E0=B9=88?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Discipline.Service/Program.cs | 2 +- BMA.EHR.Placement.Service/Program.cs | 2 +- BMA.EHR.Retirement.Service/Program.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/BMA.EHR.Discipline.Service/Program.cs b/BMA.EHR.Discipline.Service/Program.cs index 5a1f99c4..b1f821ed 100644 --- a/BMA.EHR.Discipline.Service/Program.cs +++ b/BMA.EHR.Discipline.Service/Program.cs @@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args); DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire" + TablesPrefix = "Hangfire_Discipline" }))); builder.Services.AddHangfireServer(); } diff --git a/BMA.EHR.Placement.Service/Program.cs b/BMA.EHR.Placement.Service/Program.cs index 897d16ca..5db2aa84 100644 --- a/BMA.EHR.Placement.Service/Program.cs +++ b/BMA.EHR.Placement.Service/Program.cs @@ -121,7 +121,7 @@ var builder = WebApplication.CreateBuilder(args); PrepareSchemaIfNecessary = true, DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), - TablesPrefix = "Hangfire" + TablesPrefix = "Hangfire_Placement" }))); builder.Services.AddHangfireServer(); } diff --git a/BMA.EHR.Retirement.Service/Program.cs b/BMA.EHR.Retirement.Service/Program.cs index a55f9674..6f7a6352 100644 --- a/BMA.EHR.Retirement.Service/Program.cs +++ b/BMA.EHR.Retirement.Service/Program.cs @@ -130,7 +130,7 @@ var builder = WebApplication.CreateBuilder(args); DashboardJobListLimit = 50000, TransactionTimeout = TimeSpan.FromMinutes(1), InvisibilityTimeout = TimeSpan.FromHours(3), - TablesPrefix = "Hangfire" + TablesPrefix = "Hangfire_Retirement" }))); builder.Services.AddHealthChecks(); } From 8425c62c6babcf87cd51ef2a1b18c67aae28ad70 Mon Sep 17 00:00:00 2001 From: harid Date: Thu, 23 Jul 2026 13:40:47 +0700 Subject: [PATCH 4/4] =?UTF-8?q?fix=20bug=20=E0=B8=A3=E0=B8=B0=E0=B8=9A?= =?UTF-8?q?=E0=B8=9A=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2=20?= =?UTF-8?q?=E0=B9=80=E0=B8=A1=E0=B8=99=E0=B8=B9=E0=B8=AA=E0=B8=AD=E0=B8=9A?= =?UTF-8?q?=E0=B8=AA=E0=B8=A7=E0=B8=99-=E0=B8=AA=E0=B8=A3=E0=B8=B8?= =?UTF-8?q?=E0=B8=9B=E0=B8=9C=E0=B8=A5=20=E0=B9=84=E0=B8=A1=E0=B9=88?= =?UTF-8?q?=E0=B9=84=E0=B8=94=E0=B9=89=E0=B8=81=E0=B8=A3=E0=B8=AD=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=B4=E0=B8=97=E0=B8=98=E0=B8=B4=E0=B9=8C=20#7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineInvestigateController.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs index 21be29f0..2bdbc8ea 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs @@ -889,6 +889,10 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers RespondentType = data.RespondentType.Trim().ToUpper(), Organization = data.Organization, RootDnaId = data.RootDnaId, + Child1DnaId = data.Child1DnaId, + Child2DnaId = data.Child2DnaId, + Child3DnaId = data.Child3DnaId, + Child4DnaId = data.Child4DnaId, ConsideredAgency = data.ConsideredAgency, OrganizationId = data.OrganizationId, ConsideredAgencyId = data.ConsideredAgencyId,