diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 5ad7eb00..9d5888a0 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -7487,6 +7487,8 @@ namespace BMA.EHR.Application.Repositories.Commands { PersonId = x.RefPlacementProfileId, Id = x.RefDisciplineId, + refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}", + templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}", }); var baseAPI = _configuration["API"]; @@ -7603,6 +7605,8 @@ namespace BMA.EHR.Application.Repositories.Commands { PersonId = x.RefPlacementProfileId, Id = x.RefDisciplineId, + refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}", + templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}", }); var baseAPI = _configuration["API"]; @@ -7719,6 +7723,8 @@ namespace BMA.EHR.Application.Repositories.Commands { PersonId = x.RefPlacementProfileId, Id = x.RefDisciplineId, + refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}", + templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}", }); var baseAPI = _configuration["API"]; @@ -7834,6 +7840,8 @@ namespace BMA.EHR.Application.Repositories.Commands { PersonId = x.RefPlacementProfileId, Id = x.RefDisciplineId, + refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}", + templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}", }); var baseAPI = _configuration["API"]; @@ -7950,6 +7958,8 @@ namespace BMA.EHR.Application.Repositories.Commands { PersonId = x.RefPlacementProfileId, Id = x.RefDisciplineId, + refCommandNo = $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()}", + templateDoc = "คำสั่งแต่งตั้งลูกจ้างประจำ(ปรับระดับชั้นงาน) คำสั่ง" + command.IssuerOrganizationName + "ที่ " + $"{command.CommandNo}/{command.CommandYear.ToInteger().ToThaiYear()} ลงวันที่ {command.CommandExcecuteDate!.Value.ToThaiFullDate3()}", }); var baseAPI = _configuration["API"]; @@ -9158,14 +9168,14 @@ namespace BMA.EHR.Application.Repositories.Commands var raw = JsonConvert.DeserializeObject(apiResult.Result); if (raw != null) { - if(raw.result!.rootId != null && raw.result!.root != null) + if (raw.result!.rootId != null && raw.result!.root != null) { ret.Add(new KeyValueItemResponse { Id = raw.result!.rootId ?? null, Name = raw.result!.root ?? null, }); - } + } } } // var rootOcId = await GetRootOcIdAsync(UserOrganizationId); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index 0a7bc6d6..abd375d3 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -1176,6 +1176,9 @@ namespace BMA.EHR.Placement.Service.Controllers profile.nodeId = null; profile.posmasterId = null; profile.positionId = null; + profile.Draft = false; + profile.typeCommand = null; + profile.PlacementStatus = "UN-CONTAIN"; _context.SaveChanges(); return Success();