ประกาศเกษียณ ส่งวันที่ประกาศเพิ่ม
Some checks failed
release-dev / release-dev (push) Failing after 10s

This commit is contained in:
harid 2025-10-01 11:46:48 +07:00
parent e51ca439f9
commit 2aa66acfd0

View file

@ -2118,18 +2118,19 @@ namespace BMA.EHR.Retirement.Service.Controllers
{ {
var retirePeriodOfficer = await _context.RetirementPeriods var retirePeriodOfficer = await _context.RetirementPeriods
.Include(x => x.RetirementRawProfiles.Where(y => y.Remove != "REMOVE")) .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(); .FirstOrDefaultAsync();
if (retirePeriodOfficer == null) if (retirePeriodOfficer == null)
return Error("ไม่พบรอบประกาศเกษียณอายุราชการ"); return Error("ไม่พบรอบประกาศเกษียณอายุราชการ");
var data = retirePeriodOfficer.RetirementRawProfiles var data = new
.Select(x => new {
{ signDate = retirePeriodOfficer.SignDate ?? null,
profileId = x.profileId profiles = retirePeriodOfficer.RetirementRawProfiles
}) .Select(x => new { profileId = x.profileId })
.ToList(); .ToList()
};
return Success(data); return Success(data);
} }