From e160e1e552d137863a1361c4903e0d2e93b45a08 Mon Sep 17 00:00:00 2001 From: moss <> Date: Tue, 1 Apr 2025 12:08:05 +0700 Subject: [PATCH] report retirement --- .../Repositories/Reports/RetireReportRepository.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs index 49b4dceb..12379e65 100644 --- a/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/RetireReportRepository.cs @@ -163,9 +163,9 @@ namespace BMA.EHR.Application.Repositories.Reports if (profiles.Count > 0) { mapProfiles = profiles - // .OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) - // .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) - // .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) + // .OrderBy(x => rootOrder.ToObject>().IndexOf(x.root)) + // .ThenBy(x => posTypeNameOrder.ToObject>().IndexOf(x.posTypeName ?? "")) + // .ThenBy(x => posLevelNameOrder.ToObject>().IndexOf(x.posLevelName ?? "")) .Select((profile, index) => { // bool isDuplicateRoot = profile.root == previousRoot; @@ -176,7 +176,7 @@ namespace BMA.EHR.Application.Repositories.Reports // previousPosLevelName = profile.posLevelName; return new ProfileRetireJsonRequest { - order = $"{ (index + 1).ToString().ToThaiNumber() }. ลำดับที่ { (profile.order).ToString().ToThaiNumber() }", + order = retireHistorys.TypeReport == null ? (index + 1).ToString().ToThaiNumber() : $"{(index + 1).ToString().ToThaiNumber()}. ลำดับที่ {(profile.order).ToString().ToThaiNumber()}", fullName = $"{profile.prefix}{profile.firstName} {profile.lastName}", root = "", child = (profile.posExecutiveName == null ? "" : profile.posExecutiveName + "\n") + @@ -305,7 +305,7 @@ namespace BMA.EHR.Application.Repositories.Reports previousPosLevelName = profile.posLevelName; return new ProfileRetireJsonRequest { - order = (index + 1).ToString().ToThaiNumber(), + order = retire.TypeReport == null ? (index + 1).ToString().ToThaiNumber() : $"{(index + 1).ToString().ToThaiNumber()}. ลำดับที่ {(profile.order).ToString().ToThaiNumber()}", fullName = $"{profile.prefix}{profile.firstName} {profile.lastName}", root = (isDuplicateRoot ? "" : profile.root + "\n") + (isDuplicateHospital || !hospital.ToObject>().Contains(profile.child1) ? "" : profile.child1 + "\n") +