diff --git a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs index 7aad88f7..aa6f5fbd 100644 --- a/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Commands/CommandReportRepository.cs @@ -70,6 +70,7 @@ namespace BMA.EHR.Application.Repositories.Commands var report_data = (from r in raw_data join p in _dbContext.Set() + .Include(x => x.PlacementEducations) .Include(x => x.Placement) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) @@ -81,6 +82,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType01Response { + Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : + p.PlacementEducations.FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -119,6 +122,7 @@ namespace BMA.EHR.Application.Repositories.Commands var report_data = (from r in raw_data join p in _dbContext.Set() + .Include(x => x.PlacementEducations) .Include(x => x.Placement) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) @@ -130,6 +134,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType01Response { + Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : + p.PlacementEducations.FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -167,6 +173,7 @@ namespace BMA.EHR.Application.Repositories.Commands var report_data = (from r in raw_data join p in _dbContext.Set() + .Include(x => x.PlacementEducations) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) .Include(x => x.PositionPath) @@ -184,6 +191,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType03Response { + Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : + p.PlacementEducations.FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -226,6 +235,7 @@ namespace BMA.EHR.Application.Repositories.Commands var report_data = (from r in raw_data join p in _dbContext.Set() + .Include(x => x.PlacementEducations) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) .Include(x => x.PositionPath) @@ -243,6 +253,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType03Response { + Education = p.PlacementEducations == null || p.PlacementEducations.Count == 0 ? "" : + p.PlacementEducations.FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -298,10 +310,13 @@ namespace BMA.EHR.Application.Repositories.Commands .Include(x => x.PositionType) .Include(x => x.PosNo) .Include(x => x.Salaries) + .Include(x => x.Educations) on r.CitizenId equals pf.CitizenId orderby r.Sequence select new CommandType03Response { + Education = pf.Educations == null || pf.Educations.Count == 0 ? "" : + pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -357,10 +372,13 @@ namespace BMA.EHR.Application.Repositories.Commands .Include(x => x.PositionType) .Include(x => x.PosNo) .Include(x => x.Salaries) + .Include(x => x.Educations) on r.CitizenId equals pf.CitizenId orderby r.Sequence select new CommandType03Response { + Education = pf.Educations == null || pf.Educations.Count == 0 ? "" : + pf.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -413,6 +431,8 @@ namespace BMA.EHR.Application.Repositories.Commands .ThenInclude(x => x.PositionType) .Include(x => x.Profile) .ThenInclude(x => x.PosNo) + .Include(x => x.Profile) + .ThenInclude(x => x.Educations) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) @@ -424,6 +444,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType03Response { + Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" : + p.Profile.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -476,6 +498,8 @@ namespace BMA.EHR.Application.Repositories.Commands .ThenInclude(x => x.PositionType) .Include(x => x.Profile) .ThenInclude(x => x.PosNo) + .Include(x => x.Profile) + .ThenInclude(x => x.Educations) .Include(x => x.OrganizationPosition) .ThenInclude(x => x.Organization) @@ -487,6 +511,8 @@ namespace BMA.EHR.Application.Repositories.Commands orderby r.Sequence select new CommandType03Response { + Education = p.Profile.Educations == null || p.Profile.Educations.Count == 0 ? "" : + p.Profile.Educations.OrderByDescending(x => x.StartDate).FirstOrDefault().Degree, Seq = r.Sequence.ToString().ToThaiNumber(), CitizenId = r.CitizenId, FullName = $"{r.Prefix}{r.FirstName} {r.LastName}", @@ -1006,7 +1032,7 @@ namespace BMA.EHR.Application.Repositories.Commands PositionType = p.Profile.PositionType == null ? "" : p.Profile.PositionType.Name, PositionNumber = p.Profile.PosNo == null ? "" : p.Profile.PosNo.Name.ToThaiNumber(), Salary = r.Amount == null ? "" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), - RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiShortDate2().ToThaiNumber() + RetireDate = p.Profile.BirthDate.CalculateRetireDate().ToThaiFullDate3().ToThaiNumber() }) .ToList(); diff --git a/BMA.EHR.Application/Responses/Reports/CommandType01Response.cs b/BMA.EHR.Application/Responses/Reports/CommandType01Response.cs index 53076593..08b56ca7 100644 --- a/BMA.EHR.Application/Responses/Reports/CommandType01Response.cs +++ b/BMA.EHR.Application/Responses/Reports/CommandType01Response.cs @@ -25,5 +25,7 @@ public string PlacementName { get; set;} = string.Empty; public string Seq { get; set; } = string.Empty; + + public string Education { get; set; } = string.Empty; } } diff --git a/BMA.EHR.Application/Responses/Reports/CommandType03Response.cs b/BMA.EHR.Application/Responses/Reports/CommandType03Response.cs index a6f4b82d..e9d9c4b2 100644 --- a/BMA.EHR.Application/Responses/Reports/CommandType03Response.cs +++ b/BMA.EHR.Application/Responses/Reports/CommandType03Response.cs @@ -35,5 +35,7 @@ namespace BMA.EHR.Application.Responses.Reports public string NewSalary { get; set; } = ""; public string AppointDate { get; set; } = string.Empty; + + public string Education { get; set;} = string.Empty; } } diff --git a/BMA.EHR.Report.Service/Reports/01-คำสั่งบรรจุและแต่งตั้งผู้สอบแข่งขันได้-2.trdp b/BMA.EHR.Report.Service/Reports/01-คำสั่งบรรจุและแต่งตั้งผู้สอบแข่งขันได้-2.trdp index 9fde247e..cf94ca8e 100644 Binary files a/BMA.EHR.Report.Service/Reports/01-คำสั่งบรรจุและแต่งตั้งผู้สอบแข่งขันได้-2.trdp and b/BMA.EHR.Report.Service/Reports/01-คำสั่งบรรจุและแต่งตั้งผู้สอบแข่งขันได้-2.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp b/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp index 5ec38d42..77584854 100644 Binary files a/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp and b/BMA.EHR.Report.Service/Reports/02-คำสั่งบรรจุและแต่งตั้งผู้ได้รับคัดเลือก-4.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/03-คำสั่งแต่งตั้งผู้สอบแข่งขัน.trdp b/BMA.EHR.Report.Service/Reports/03-คำสั่งแต่งตั้งผู้สอบแข่งขัน.trdp index 43342987..70c3ebb4 100644 Binary files a/BMA.EHR.Report.Service/Reports/03-คำสั่งแต่งตั้งผู้สอบแข่งขัน.trdp and b/BMA.EHR.Report.Service/Reports/03-คำสั่งแต่งตั้งผู้สอบแข่งขัน.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/04-คำสั่งย้ายผู้สอบแข่งขัน.trdp b/BMA.EHR.Report.Service/Reports/04-คำสั่งย้ายผู้สอบแข่งขัน.trdp index 55aa9c4f..64240f46 100644 Binary files a/BMA.EHR.Report.Service/Reports/04-คำสั่งย้ายผู้สอบแข่งขัน.trdp and b/BMA.EHR.Report.Service/Reports/04-คำสั่งย้ายผู้สอบแข่งขัน.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp b/BMA.EHR.Report.Service/Reports/05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp index da0ae806..1c92a1a8 100644 Binary files a/BMA.EHR.Report.Service/Reports/05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp and b/BMA.EHR.Report.Service/Reports/05-06-แนบท้ายคำสั่งแต่งตั้ง-คำสั่งเลื่อน.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/07-แนบท้ายคำสั่งย้าย.trdp b/BMA.EHR.Report.Service/Reports/07-แนบท้ายคำสั่งย้าย.trdp index a80e2e91..30edd00e 100644 Binary files a/BMA.EHR.Report.Service/Reports/07-แนบท้ายคำสั่งย้าย.trdp and b/BMA.EHR.Report.Service/Reports/07-แนบท้ายคำสั่งย้าย.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp b/BMA.EHR.Report.Service/Reports/08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp index 1583e38b..bb313d93 100644 Binary files a/BMA.EHR.Report.Service/Reports/08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp and b/BMA.EHR.Report.Service/Reports/08-คำสั่งบรรจุและแต่งตั้งข้าราชการฯกลับเข้ารับราชการ-6.trdp differ diff --git a/BMA.EHR.Report.Service/Reports/09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp b/BMA.EHR.Report.Service/Reports/09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp index 6534bbd1..49e4988e 100644 Binary files a/BMA.EHR.Report.Service/Reports/09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp and b/BMA.EHR.Report.Service/Reports/09-คำสั่งบรรจุและแต่งตั้งผู้ออกไปรับราชการทหารกลับเข้ารับราชการ-8.trdp differ