From e40927751855df65969860609dfe28db35c7584a Mon Sep 17 00:00:00 2001 From: Bright Date: Wed, 18 Dec 2024 18:39:05 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B9=83?= =?UTF-8?q?=E0=B8=AB=E0=B9=89=E0=B9=80=E0=B8=A3=E0=B8=B5=E0=B8=A2=E0=B8=87?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=81=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=A5?= =?UTF-8?q?=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DisciplineComplaintController.cs | 3 ++- .../Controllers/DisciplineDisciplinaryController.cs | 3 ++- .../Controllers/DisciplineInvestigateController.cs | 3 ++- .../Controllers/DisciplineResultController.cs | 3 ++- .../Controllers/DisciplineSuspendController.cs | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs index 39657c53..74792193 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineComplaintController.cs @@ -172,7 +172,8 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers Id = x.Id,//id ข้อมูลเรื่องร้องเรียน RespondentType = x.RespondentType,//ผู้ถูกร้องเรียน Persons = x.DisciplineComplaint_Profiles - .OrderByDescending(p => p.CreatedAt) + .OrderByDescending(p => p.profileType) + .ThenByDescending(p => p.CreatedAt) .Select(p => new { Id = p.Id, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs index 7cf98db6..fafa806a 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineDisciplinaryController.cs @@ -481,7 +481,8 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers }).ToList(), RespondentType = x.RespondentType,//ผู้ถูกสืบสวน Persons = x.DisciplineDisciplinary_ProfileComplaintInvestigates - .OrderByDescending(p => p.CreatedAt) + .OrderByDescending(p => p.profileType) + .ThenByDescending(p => p.CreatedAt) .Select(p => new { Id = p.Id, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs index 3b19b4f1..f4e58d19 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineInvestigateController.cs @@ -314,7 +314,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers }).ToList(), RespondentType = x.RespondentType,//ผู้ถูกสืบสวน Persons = x.DisciplineInvestigate_ProfileComplaints - .OrderByDescending(p => p.CreatedAt) + .OrderByDescending(p => p.profileType) + .ThenByDescending(p => p.CreatedAt) .Select(p => new { Id = p.Id, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs index 741a7eb4..ecbb2e6a 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs @@ -148,7 +148,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers IdComplaint = x.DisciplineInvestigate.DisciplineComplaint.Id,//id ข้อมูลเรื่องร้องเรียน RespondentType = x.RespondentType,//ผู้ถูกสืบสวน Persons = x.DisciplineDisciplinary_ProfileComplaintInvestigates.Where(x => x.IsReport == "NEW") - .OrderByDescending(p => p.CreatedAt) + .OrderByDescending(p => p.profileType) + .ThenByDescending(p => p.CreatedAt) .Select(p => new { Id = p.Id, diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs index 716d434d..1b32f6d5 100644 --- a/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs +++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineSuspendController.cs @@ -131,7 +131,8 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers profileType = x.profileType, CreatedAt = x.CreatedAt, }) - .OrderByDescending(x => x.CreatedAt) + .OrderByDescending(x => x.profileType == "OFFICER") + .ThenByDescending(x => x.CreatedAt) .ThenByDescending(x => x.CitizenId) .Skip((page - 1) * pageSize) .Take(pageSize)