From 200e8eb5f65fe593f99dbe52d737efe2b772a7bb Mon Sep 17 00:00:00 2001 From: Suphonchai Phoonsawat Date: Fri, 25 Aug 2023 13:46:18 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B9=89=E0=B8=81=20put=20=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=84=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88?= =?UTF-8?q?=E0=B8=87=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=20com?= =?UTF-8?q?mand=20type=20code=20=E0=B9=84=E0=B8=9B=E0=B8=97=E0=B8=B5?= =?UTF-8?q?=E0=B9=88=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Commands/CommandRepository.cs | 5 +++-- BMA.EHR.Command.Service/Controllers/OrderController.cs | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 382726ec..26f85397 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -272,7 +272,7 @@ namespace BMA.EHR.Application.Repositories.Commands PositionEmployeeLevelId = placementProfile.PositionLevel!.Id, PositionLineId = placementProfile.PositionLine == null ? Guid.Empty : placementProfile.PositionLine.Id, PositionLine = placementProfile.PositionLine == null ? "" : placementProfile.PositionLine.Name, - PosNo = placementProfile.OrganizationPosition!.PositionNumber, + PosNo = placementProfile.OrganizationPosition!.PositionNumber, IsVerified = true, IsProbation = true, @@ -553,7 +553,8 @@ namespace BMA.EHR.Application.Repositories.Commands // attatch _dbContext.Attatch(entity.CommandStatus); _dbContext.Attatch(entity.CommandType); - _dbContext.Attatch(entity.Placement); + if (entity.Placement != null) + _dbContext.Attatch(entity.Placement); return await base.UpdateAsync(entity); } diff --git a/BMA.EHR.Command.Service/Controllers/OrderController.cs b/BMA.EHR.Command.Service/Controllers/OrderController.cs index e77d2419..c34bb266 100644 --- a/BMA.EHR.Command.Service/Controllers/OrderController.cs +++ b/BMA.EHR.Command.Service/Controllers/OrderController.cs @@ -341,6 +341,7 @@ namespace BMA.EHR.Command.Service.Controllers { orderId = orderId, orderTypeValue = data.CommandTypeId, + orderTypeCode = data.CommandType.CommandCode.ToLower(), orderTitle = data.CommandSubject, orderNo = data.CommandNo, orderYear = data.CommandYear, @@ -354,6 +355,7 @@ namespace BMA.EHR.Command.Service.Controllers conclusionRegisterDate = data.ConclusionRegisterDate, conclusionResultNo = data.ConclusionResultNo, conclusionResultDate = data.ConclusionResultDate, + }; return Success(result);