From aafc3dc3115bfa506c70b059e0b3c3e679abc32f Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 15 Sep 2023 15:30:02 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B6?= =?UTF-8?q?=E0=B8=81=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=95=E0=B8=AD=E0=B8=99=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Repositories/Commands/CommandRepository.cs | 15 ++++++++++++++- .../Controllers/RetirementDeceasedController.cs | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index 97b884c3..ae4fe0c8 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -5732,13 +5732,26 @@ namespace BMA.EHR.Application.Repositories.Commands .Include(x => x.Profile) .ThenInclude(x => x.Salaries) .ThenInclude(x => x.PositionLevel) - + .Include(x => x.OrgEmployee) + .ThenInclude(x => x.Organization) + .Include(x => x.OrgEmployee) + .ThenInclude(x => x.PositionEmployeePosition) + .Include(x => x.OrgEmployee) + .ThenInclude(x => x.PositionEmployeeLine) .FirstOrDefaultAsync(x => x.Id == recv.RefPlacementProfileId); if (data == null) throw new Exception(GlobalMessages.DataNotFound); data.Profile.EmployeeClass = "perm"; // ลจ ประจำ + data.Profile.OcId = data.OrgEmployee.Organization == null ? null : data.OrgEmployee.Organization.Id; + // data.Profile.Oc = "xxx"; + data.Profile.PosNoEmployee = data.OrgEmployee.PosNo; + data.Profile.PositionEmployeePosition = data.OrgEmployee.PositionEmployeePosition; + // data.Profile.PositionEmployeePositionSide = data.OrgEmployee.OrganizationPositionEmployeePositionSides; + // data.Profile.PositionEmployeeLevel = data.OrgEmployee.OrganizationPositionEmployeeLevels; + // data.Profile.PositionEmployeeGroup = data.OrgEmployee.employee; + data.Profile.PositionEmployeeLine = data.OrgEmployee.PositionEmployeeLine; var lastSarary = data.Profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault(); var order = 1; diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs index f46490f4..0abd5553 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementDeceasedController.cs @@ -543,8 +543,8 @@ namespace BMA.EHR.Retirement.Service.Controllers .FirstOrDefaultAsync(); if (retirementDeceased == null) return Error(GlobalMessages.RetirementDeceasedNotFound, 404); - if (retirementDeceased.DocumentForward == null) - return Error(GlobalMessages.NoFileToUpload, 404); + // if (retirementDeceased.DocumentForward == null) + // return Error(GlobalMessages.NoFileToUpload, 404); // create command payload var payload_attach = new List();