From 6614e3a2fb5327fdc887d8302dfd42317eceac30 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Mon, 8 Jul 2024 08:55:52 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=A7=E0=B8=B4=E0=B8=99=E0=B8=B1=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Commands/CommandRepository.cs | 14 ++++++++++++-- .../Controllers/PlacementController.cs | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) 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();