เพิ่มapi list ตำแหน่งที่เลือกไปแล้ว

This commit is contained in:
Kittapath 2023-07-13 15:56:53 +07:00
parent 94b1e3b848
commit c301296605

View file

@ -316,6 +316,7 @@ namespace BMA.EHR.Placement.Service.Controllers
ExamRound = x.ExamRound, ExamRound = x.ExamRound,
Pass = x.Pass, Pass = x.Pass,
IsProperty = x.IsProperty == null ? null : Newtonsoft.Json.JsonConvert.DeserializeObject<List<PersonPropertyRequest>>(x.IsProperty), IsProperty = x.IsProperty == null ? null : Newtonsoft.Json.JsonConvert.DeserializeObject<List<PersonPropertyRequest>>(x.IsProperty),
BmaOfficer = _documentService.CheckBmaOfficer(x.CitizenId),
}).FirstOrDefaultAsync(x => x.PersonalId == personalId); }).FirstOrDefaultAsync(x => x.PersonalId == personalId);
return Success(data); return Success(data);
@ -869,5 +870,16 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success(); return Success();
} }
[HttpGet("position/use")]
public async Task<ActionResult<ResponseObject>> GetPositionUse()
{
var position = await _context.PlacementProfiles
.Where(x => x.PositionNumber != null)
.Select(x => x.PositionNumber.Id)
.ToListAsync();
return Success(position);
}
} }
} }