ส่งคัวกลับ
Some checks failed
release-dev / release-dev (push) Failing after 10s

This commit is contained in:
moss 2025-03-28 23:45:36 +07:00
parent 34b8562ffe
commit 18d93995aa
4 changed files with 108 additions and 97 deletions

View file

@ -221,10 +221,18 @@ namespace BMA.EHR.Placement.Service.Controllers
[HttpPost()]
public async Task<ActionResult<ResponseObject>> Post([FromForm] PlacementAddProfileRequest req)
{
var placementOfficer = await _context.PlacementOfficers
.Where(x => x.Id == (req.OfficerId ?? Guid.Parse("00000000-0000-0000-0000-000000000000")))
.FirstOrDefaultAsync();
if (placementOfficer == null)
return Error("ไม่พบรายการช่วยราชการ", 404);
var placementRepatriation = new PlacementRepatriation
{
Organization = Request.Form.ContainsKey("Organization") ? Request.Form["Organization"] : "",
Reason = Request.Form.ContainsKey("Reason") ? Request.Form["Reason"] : "",
Organization = placementOfficer.Organization,
// Reason = placementOfficer.Reason,
Date = placementOfficer.DateStart,
DateRepatriation = placementOfficer.DateEnd,
Status = "WAITTING",
CreatedFullName = FullName ?? "System Administrator",
CreatedUserId = UserId ?? "",
@ -507,6 +515,7 @@ namespace BMA.EHR.Placement.Service.Controllers
on p.Id.ToString() equals r.refId
select new
{
refId = p.Id,
profileId = p.profileId,
amount = r.amount,
amountSpecial = r.amountSpecial,