diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index f2c6a86f..5ad7eb00 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -9158,11 +9158,14 @@ namespace BMA.EHR.Application.Repositories.Commands var raw = JsonConvert.DeserializeObject(apiResult.Result); if (raw != null) { - ret.Add(new KeyValueItemResponse + if(raw.result!.rootId != null && raw.result!.root != null) { - Id = raw.result!.rootId ?? null, - Name = raw.result!.root ?? null, - }); + ret.Add(new KeyValueItemResponse + { + Id = raw.result!.rootId ?? null, + Name = raw.result!.root ?? null, + }); + } } } // var rootOcId = await GetRootOcIdAsync(UserOrganizationId); diff --git a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs index 6b3ca3d7..2126178b 100644 --- a/BMA.EHR.Report.Service/Controllers/RetireReportController.cs +++ b/BMA.EHR.Report.Service/Controllers/RetireReportController.cs @@ -118,25 +118,33 @@ namespace BMA.EHR.Report.Service.Controllers { _count++; } + string position = profile.GetType().GetProperty("position").GetValue(profile); + position = position != string.Empty && position != null ? position : "-"; string thaiOrder = profile.GetType().GetProperty("order").GetValue(profile).ToString(); thaiOrder = $"ลำดับที่ {thaiOrder.ToThaiNumber()}"; + string thaiPosNo = profile.GetType().GetProperty("posNo").GetValue(profile); + thaiPosNo = thaiPosNo != null ? $"(ตำแหน่งเลขที่ {thaiPosNo.ToThaiNumber()})" : $"(ตำแหน่งเลขที่ - )"; + string organizationOrganization = (profile.GetType().GetProperty("child4").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child4").GetValue(profile) + "/") + + (profile.GetType().GetProperty("child3").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child3").GetValue(profile) + "/") + + (profile.GetType().GetProperty("child2").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child2").GetValue(profile) + "/") + + (profile.GetType().GetProperty("child1").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child1").GetValue(profile) + "/") + + (profile.GetType().GetProperty("root").GetValue(profile) == null ? "" : profile.GetType().GetProperty("root").GetValue(profile)); + string reason = profile.GetType().GetProperty("reason").GetValue(profile); + organizationOrganization = organizationOrganization != string.Empty ? organizationOrganization : reason != string.Empty ? reason : string.Empty ; + reason = organizationOrganization == reason ? string.Empty : reason; _profileList.Add(new { count = $"{_count.ToString().ToThaiNumber()}.", no = $"{(_profileList.Count() + 1).ToString().ToThaiNumber()}.", order = thaiOrder, - organizationOrganization = (profile.GetType().GetProperty("child4").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child4").GetValue(profile) + "/") + - (profile.GetType().GetProperty("child3").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child3").GetValue(profile) + "/") + - (profile.GetType().GetProperty("child2").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child2").GetValue(profile) + "/") + - (profile.GetType().GetProperty("child1").GetValue(profile) == null ? "" : profile.GetType().GetProperty("child1").GetValue(profile) + "/") + - (profile.GetType().GetProperty("root").GetValue(profile) == null ? "" : profile.GetType().GetProperty("root").GetValue(profile)), + organizationOrganization = organizationOrganization, fullName = $"{profile.GetType().GetProperty("prefix").GetValue(profile)}{profile.GetType().GetProperty("firstName").GetValue(profile)} {profile.GetType().GetProperty("lastName").GetValue(profile)}", - position = profile.GetType().GetProperty("position").GetValue(profile), - posNo = profile.GetType().GetProperty("posMasterNo").GetValue(profile), + position = position, + posNo = thaiPosNo, oc = profile.GetType().GetProperty("root").GetValue(profile), positionEmployeePosition = profile.GetType().GetProperty("position").GetValue(profile), posNoEmployee = profile.GetType().GetProperty("posMasterNo").GetValue(profile), - reason = profile.GetType().GetProperty("reason").GetValue(profile), + reason = reason, }); } diff --git a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp index 6cda9c7f..cf9b3a60 100644 Binary files a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp and b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-1.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-2.trdp b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-2.trdp index 50d2c150..2f54370d 100644 Binary files a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-2.trdp and b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-2.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-3.trdp b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-3.trdp index f95594e5..30f912dd 100644 Binary files a/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-3.trdp and b/BMA.EHR.Report.Service/Reports/31-ประกาศเกษียณข้าราชการ-3.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-1.trdp b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-1.trdp index 255a0435..e8459016 100644 Binary files a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-1.trdp and b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-1.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-2.trdp b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-2.trdp index 277ae39d..04da3d35 100644 Binary files a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-2.trdp and b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-2.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-3.trdp b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-3.trdp index 29cc65c5..f06d1c1a 100644 Binary files a/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-3.trdp and b/BMA.EHR.Report.Service/Reports/32-ประกาศเกษียณลูกจ้างประจำ-3.trdp differ