ประกาศเกษียณ ส่งวันที่ประกาศเพิ่ม
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
.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);
}