เปลี่ยนเส้น api สำหรับเก็บ logs
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m12s
Build & Deploy Discipline Service / build (push) Successful in 1m27s
Build & Deploy Insignia Service / build (push) Successful in 1m25s
Build & Deploy Placement Service / build (push) Successful in 1m17s
Build & Deploy Retirement Service / build (push) Successful in 1m23s

This commit is contained in:
harid 2026-01-28 13:27:25 +07:00
parent 839c357842
commit 02487d91ff
2 changed files with 6 additions and 4 deletions

View file

@ -483,7 +483,8 @@ namespace BMA.EHR.Domain.Middlewares
{ {
logType = logType, logType = logType,
ip = (string)contextData.RemoteIpAddress, ip = (string)contextData.RemoteIpAddress,
rootId = pf?.RootId, //rootId = pf?.RootId,
rootId = pf?.RootDnaId,
systemName = SystemName, systemName = SystemName,
startTimeStamp = startTime.ToString("o"), startTimeStamp = startTime.ToString("o"),
endTimeStamp = endTime.ToString("o"), endTimeStamp = endTime.ToString("o"),
@ -684,7 +685,8 @@ namespace BMA.EHR.Domain.Middlewares
{ {
try try
{ {
var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak/{keycloakId}"; //var apiPath = $"{_configuration["API"]}/org/dotnet/by-keycloak/{keycloakId}";
var apiPath = $"{_configuration["API"]}/org/dotnet/user-logs/{keycloakId}";
var apiKey = _configuration["API_KEY"]; var apiKey = _configuration["API_KEY"];
var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey); var apiResult = await GetExternalAPIAsync(apiPath, accessToken ?? "", apiKey);

View file

@ -1248,7 +1248,7 @@ namespace BMA.EHR.Leave.Service.Controllers
Type3 = "☐", Type3 = "☐",
approve = approveResult, approve = approveResult,
approverComment = !string.IsNullOrEmpty(data.LeaveDirectorComment) approverComment = !string.IsNullOrEmpty(data.LeaveDirectorComment)
? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim() ? data.LeaveDirectorComment.Replace("\r", "").Replace("\n", "").Trim().ToThaiNumber()
: "......................", : "......................",
approverUpdatedAt = data.LastUpdatedAt.HasValue approverUpdatedAt = data.LastUpdatedAt.HasValue
? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber() ? data.LastUpdatedAt.Value.ToThaiShortDate().ToThaiNumber()
@ -2924,7 +2924,7 @@ namespace BMA.EHR.Leave.Service.Controllers
? new[] { (x.PosExecutiveName.ToThaiNumber()), (isCommission == false ? x!.OrganizationName : x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.")).ToThaiNumber() } ? new[] { (x.PosExecutiveName.ToThaiNumber()), (isCommission == false ? x!.OrganizationName : x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.")).ToThaiNumber() }
: new[] { (isCommission == false ? x!.OrganizationName : x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.")).ToThaiNumber() }, : new[] { (isCommission == false ? x!.OrganizationName : x!.OrganizationName.Replace("สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", "สำนักงาน ก.ก.")).ToThaiNumber() },
positionSign = !string.IsNullOrEmpty(x.PositionSign) positionSign = !string.IsNullOrEmpty(x.PositionSign)
? x.PositionSign.Replace("\r", "").Replace("\n", " ") ? x.PositionSign.Replace("\r", "").Replace("\n", " ").ToThaiNumber()
: "............................................", : "............................................",
updatedAt = x.LastUpdatedAt.HasValue updatedAt = x.LastUpdatedAt.HasValue
? x.LastUpdatedAt.Value.Date.ToThaiShortDate().ToThaiNumber() ? x.LastUpdatedAt.Value.Date.ToThaiShortDate().ToThaiNumber()