From 2aa66acfd095171b935d879e108332467dfe5935 Mon Sep 17 00:00:00 2001 From: harid Date: Wed, 1 Oct 2025 11:46:48 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A8=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2=E0=B8=93?= =?UTF-8?q?=20=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A8=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/RetirementController.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs index 0472cbdc..660d16ef 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementController.cs @@ -2118,18 +2118,19 @@ namespace BMA.EHR.Retirement.Service.Controllers { var retirePeriodOfficer = await _context.RetirementPeriods .Include(x => x.RetirementRawProfiles.Where(y => y.Remove != "REMOVE")) - .Where(x => x.Year == year && x.Type.Trim().ToUpper().Contains(type)) + .Where(x => x.Year == year && (x.Type ?? "").Trim().ToUpper().Contains(type) && x.Round == 1) .FirstOrDefaultAsync(); if (retirePeriodOfficer == null) return Error("ไม่พบรอบประกาศเกษียณอายุราชการ"); - var data = retirePeriodOfficer.RetirementRawProfiles - .Select(x => new - { - profileId = x.profileId - }) - .ToList(); + var data = new + { + signDate = retirePeriodOfficer.SignDate ?? null, + profiles = retirePeriodOfficer.RetirementRawProfiles + .Select(x => new { profileId = x.profileId }) + .ToList() + }; return Success(data); }