From 4970659f0a650f8aed715014f3f32a67ae8a316d Mon Sep 17 00:00:00 2001 From: Bright Date: Fri, 8 Nov 2024 17:22:51 +0700 Subject: [PATCH] add CommandExcecuteDate --- .../Controllers/PlacementAppointmentController.cs | 7 +++++++ .../Controllers/PlacementAppointmentEmployeeController.cs | 2 +- .../Controllers/PlacementController.cs | 8 ++++++++ .../Controllers/RetirementOtherController.cs | 4 ++++ .../Requests/ReportAttachmentRequest.cs | 1 + 5 files changed, 21 insertions(+), 1 deletion(-) diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index a77a272f..12c88c10 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -822,6 +822,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(); @@ -849,6 +850,7 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); @@ -1029,6 +1031,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(); @@ -1056,6 +1059,7 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); @@ -1435,6 +1439,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "", NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), ReportingDate = 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(); @@ -1455,6 +1460,8 @@ namespace BMA.EHR.Placement.Service.Controllers NewOc = _null, NewPositionNumber = _null, NewSalary = _null, + ReportingDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs index 6bc16c73..1248a582 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentEmployeeController.cs @@ -473,7 +473,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; diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs index d44f47f2..eead4006 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs @@ -1576,6 +1576,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), + CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), OccupationPosition = p.OccupationPosition == null ? "-" : p.OccupationPosition, //ตำแหน่งเก่าก่อนสอบ PositionCandidate = p.positionName, //ตำแหน่งที่สอบแข่งขัน OcCandidate = p.root == null ? p.PositionCandidate == null ? "-" : $"{p.PositionCandidate}/-" : @@ -1613,6 +1614,7 @@ namespace BMA.EHR.Placement.Service.Controllers PositionNumber = _null, Salary = _null, AppointDate = _null, + CommandExcecuteDate = _null, OccupationPosition = _null, PositionCandidate = _null, OcCandidate = _null, @@ -1887,6 +1889,7 @@ namespace BMA.EHR.Placement.Service.Controllers p.node == 0 ? $"{p.rootShortName}{p.posMasterNo}".ToThaiNumber() : "-", Salary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber().ToThaiNumber(), AppointDate = p.ReportingDate == null ? "-" : p.ReportingDate.Value.ToThaiShortDate2().ToThaiNumber(), + CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), PositionCandidate = p.positionName, RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, @@ -1912,6 +1915,7 @@ namespace BMA.EHR.Placement.Service.Controllers PositionNumber = _null, Salary = _null, AppointDate = _null, + CommandExcecuteDate = _null, OccupationPosition = _null, PositionCandidate = _null, RemarkHorizontal = _null, @@ -2206,6 +2210,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(); @@ -2234,6 +2239,7 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); @@ -2429,6 +2435,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(); @@ -2457,6 +2464,7 @@ namespace BMA.EHR.Placement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index d61f45db..ef8a9330 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -709,6 +709,7 @@ namespace BMA.EHR.Retirement.Service.Controllers NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), + CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); @@ -736,6 +737,7 @@ namespace BMA.EHR.Retirement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); @@ -910,6 +912,7 @@ namespace BMA.EHR.Retirement.Service.Controllers NewPositionNumber = p.PositionNumberOld == null ? "-" : p.PositionNumberOld.ToThaiNumber(), NewSalary = r.Amount == null ? "-" : r.Amount.Value.ToNumericNoDecimalText().ToThaiNumber(), AppointDate = p.PositionDate == null ? "-" : p.PositionDate.Value.ToThaiShortDate2().ToThaiNumber(), + CommandExcecuteDate = string.IsNullOrEmpty(r.CommandExcecuteDate.ToString()) ? "-" : r.CommandExcecuteDate.Value.ToThaiShortDate2().ToThaiNumber(), RemarkHorizontal = r.RemarkHorizontal, RemarkVertical = r.RemarkVertical, }).ToList(); @@ -938,6 +941,7 @@ namespace BMA.EHR.Retirement.Service.Controllers NewPositionNumber = _null, NewSalary = _null, AppointDate = _null, + CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, }); diff --git a/BMA.EHR.Retirement.Service/Requests/ReportAttachmentRequest.cs b/BMA.EHR.Retirement.Service/Requests/ReportAttachmentRequest.cs index 2e71ceda..6dde1740 100644 --- a/BMA.EHR.Retirement.Service/Requests/ReportAttachmentRequest.cs +++ b/BMA.EHR.Retirement.Service/Requests/ReportAttachmentRequest.cs @@ -21,5 +21,6 @@ namespace BMA.EHR.Retirement.Service.Requests public string? RemarkHorizontal { get; set; } public string? RemarkVertical { get; set; } public int CommandYear { get; set; } + public DateTime? CommandExcecuteDate { get; set; } } }