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();