From bacd2f71dbdcf0b075a3b5e6c5d99db07049eb5a Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 11 Oct 2023 14:19:54 +0700 Subject: [PATCH] =?UTF-8?q?x=E0=B8=9B=E0=B8=A3=E0=B9=80=E0=B8=A0=E0=B8=97/?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=94=E0=B8=B1=E0=B8=9A=E0=B9=80=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Commands/CommandReportRepository.cs | 2 +- BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs index e94eb692..440ca883 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs @@ -754,7 +754,7 @@ namespace BMA.EHR.Application.Repositories.Commands Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", - PositionName = p.OrganizationPositionOld, + PositionName = p.OrganizationPositionOld == null ? "" : p.OrganizationPositionOld, // PositionName = p.Profile.Position == null ? "" : p.Profile.Position.Name, Organization = p.Organization == null ? "" : p.Organization, StartDate = p.DateStart == null ? "" : p.DateStart.Value.ToThaiShortDate2().ToThaiNumber(), diff --git a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs index a0dfdc6f..3bb279c2 100644 --- a/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs +++ b/BMA.EHR.Application/Repositories/InsigniaPeriodsRepository.cs @@ -5847,7 +5847,7 @@ namespace BMA.EHR.Application.Repositories FullName = $"{h.Profile.Prefix?.Name}{h.Profile.FirstName} {h.Profile.LastName}", Position = h.Profile.ProfileType == "officer" ? h.Profile.Position?.Name : h.Profile.PositionEmployeePosition?.Name, PosNo = h.Profile.ProfileType == "officer" ? h.Profile.PosNo?.Name : h.Profile.PosNoEmployee, - Rank = h.Profile.ProfileType == "officer" ? $"{h.Profile.PositionType?.Name}/{h.Profile.PositionLevel?.Name}" : $"-", + Rank = h.Profile.ProfileType == "officer" && (h.Profile.PositionType != null && h.Profile.PositionLevel != null) ? $"{h.Profile.PositionType?.Name}/{h.Profile.PositionLevel?.Name}" : $"-", Salary = h.Salary.ToString(), LastInsignia = h.Profile.Insignias.Count == 0 ? "" : h.Profile.Insignias.OrderByDescending(x => x.Year).FirstOrDefault().Insignia.Name, RequestInsignia = h.RequestInsignia.Name,