diff --git a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs index 5296af96..77e8f057 100644 --- a/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs +++ b/BMA.EHR.Domain/Models/Placement/PlacementOfficer.cs @@ -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; } } } diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs index e6a77325..67a4149e 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs @@ -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(); } }