diff --git a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs index ef3c4184..0f84c302 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandRepository.cs @@ -1501,7 +1501,7 @@ namespace BMA.EHR.Application.Repositories.Commands //.Where(x => x.OrganizationPosition!.Organization!.Id == command.OwnerGovId) .Where(x => !otherCommandReceivers.Contains(x.CitizenId!)) .Where(x => x.Status.Trim().ToUpper() == "REPORT") - .Where(x => x.CommandType!.Id == command.CommandType!.Id) + //.Where(x => x.CommandType!.Id == command.CommandType!.Id) .Where(x => x.Profile.ProfileType == "employee") .OrderBy(x => x.CitizenId) .ToListAsync(); @@ -1697,6 +1697,9 @@ namespace BMA.EHR.Application.Repositories.Commands { // query placement Profile var placementProfile = await _dbContext.Set() + .Include(x => x.PlacementProfileDocs) + .ThenInclude(x => x.Document) + .Include(x => x.Prefix) .Include(x => x.FatherPrefix) .Include(x => x.MotherPrefix) @@ -1889,6 +1892,23 @@ namespace BMA.EHR.Application.Repositories.Commands }); } + // add profile document + foreach(var doc in placementProfile.PlacementProfileDocs) + { + profile.Papers.Add(new ProfilePaper + { + CategoryName = "Profile Documents", + Document = doc.Document, + Detail = doc.Document.FileName, + CreatedAt = DateTime.Now, + CreatedFullName = FullName ?? "System Administrator", + CreatedUserId = UserId ?? "", + LastUpdatedAt = DateTime.Now, + LastUpdateFullName = FullName ?? "System Administrator", + LastUpdateUserId = UserId ?? "", + }); + } + // add profile salary var oc = _dbContext.Set() @@ -2090,6 +2110,9 @@ namespace BMA.EHR.Application.Repositories.Commands foreach (var recv in command.Receivers) { var placementProfile = await _dbContext.Set() + .Include(x => x.PlacementProfileDocs) + .ThenInclude(x => x.Document) + .Include(x => x.Prefix) .Include(x => x.FatherPrefix) .Include(x => x.MotherPrefix) @@ -2337,6 +2360,10 @@ namespace BMA.EHR.Application.Repositories.Commands foreach (var recv in command.Receivers) { var placementProfile = await _dbContext.Set() + .Include(x => x.PlacementProfileDocs) + .ThenInclude(x => x.Document) + + .Include(x => x.Prefix) .Include(x => x.FatherPrefix) .Include(x => x.MotherPrefix) diff --git a/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp b/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp index 32330628..f04d1a0f 100644 Binary files a/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp and b/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp differ