fix issue #858 : เลขที่คำสั่งไม่แสดง

This commit is contained in:
Bright 2024-12-13 16:01:17 +07:00
parent ef5ec7dd85
commit 4b8c059677
2 changed files with 10 additions and 1 deletions

View file

@ -94,5 +94,8 @@ namespace BMA.EHR.Domain.Models.Placement
public string Status { get; set; } = "WAITTING";
[Comment("สถานะการใช้งาน")]
public bool IsActive { get; set; } = true;
[Comment("เลขที่คำสั่ง")]
public string? commandNo { get; set; }
}
}

View file

@ -252,6 +252,7 @@ namespace BMA.EHR.Placement.Service.Controllers
p.Organization,
p.OrganizationPositionOld,
p.IsActive,
p.commandNo
})
.ToListAsync();
@ -697,7 +698,12 @@ namespace BMA.EHR.Placement.Service.Controllers
var _result = await _res.Content.ReadAsStringAsync();
if (_res.IsSuccessStatusCode)
{
data.ForEach(profile => profile.Status = "DONE");
//data.ForEach(profile => profile.Status = "DONE");
foreach (var profile in data)
{
profile.Status = "DONE";
profile.commandNo = resultData.Count > 0 ? resultData[0].refCommandNo : null;
}
await _context.SaveChangesAsync();
}
}