From 119fa939ab5e17e0a71becfb420a715f668a6efc Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 8 Nov 2024 13:16:14 +0700 Subject: [PATCH] add field commandDate & education --- .../Controllers/PlacementAppointmentController.cs | 6 ++++-- BMA.EHR.Placement.Service/Requests/OrgRequest.cs | 1 + .../Requests/ReportAttachmentRequest.cs | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index 3bf93eea..a77a272f 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -441,7 +441,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementAppointment.posTypeNameOld = org.result.posTypeName; placementAppointment.posLevelOldId = org.result.posLevelId; placementAppointment.posLevelNameOld = org.result.posLevelName; - + placementAppointment.EducationOld = org.result.education; // placementAppointment.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; // placementAppointment.AmountOld = profile.Salaries.Count() == 0 ? null : profile.Salaries.OrderByDescending(x => x.Order).FirstOrDefault().Amount; @@ -1588,7 +1588,7 @@ namespace BMA.EHR.Placement.Service.Controllers { try { - var report_data = (from p in _context.PlacementAppointments + var report_data = (from p in _context.PlacementAppointments //.Include(x => x.PlacementEducation) // .ThenInclude(x => x.PlacementType) .Where(x => req.refIds.Select(x => x.refId).Contains(x.Id.ToString())) @@ -1645,6 +1645,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), + CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); @@ -1671,6 +1672,7 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); diff --git a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs index 54263203..61e77526 100644 --- a/BMA.EHR.Placement.Service/Requests/OrgRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/OrgRequest.cs @@ -41,6 +41,7 @@ namespace BMA.EHR.Placement.Service.Requests public string? posLevelId { get; set; } public string? posLevelName { get; set; } public double? salary { get; set; } + public string? education { get; set; } } } \ No newline at end of file diff --git a/BMA.EHR.Placement.Service/Requests/ReportAttachmentRequest.cs b/BMA.EHR.Placement.Service/Requests/ReportAttachmentRequest.cs index 75379027..d1d19752 100644 --- a/BMA.EHR.Placement.Service/Requests/ReportAttachmentRequest.cs +++ b/BMA.EHR.Placement.Service/Requests/ReportAttachmentRequest.cs @@ -21,5 +21,6 @@ namespace BMA.EHR.Placement.Service.Requests public string? RemarkHorizontal { get; set; } public string? RemarkVertical { get; set; } public int CommandYear { get; set; } + public DateTime? CommandExcecuteDate { get; set; } } }