diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index fc25fa13..610b0e7f 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -341,7 +341,7 @@ namespace BMA.EHR.Placement.Service.Controllers data.CreatedAt, data.Reason, - educationOld = data.EducationOld == "/" || data.EducationOld == null ? null : data.EducationOld, + data.EducationOld, data.salary, data.PositionTypeOld, data.PositionLevelOld, @@ -844,7 +844,8 @@ namespace BMA.EHR.Placement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, @@ -1056,7 +1057,8 @@ namespace BMA.EHR.Placement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, @@ -1265,7 +1267,8 @@ namespace BMA.EHR.Placement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, @@ -1470,7 +1473,8 @@ namespace BMA.EHR.Placement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, @@ -1618,13 +1622,13 @@ namespace BMA.EHR.Placement.Service.Controllers { try { - 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())) - // .Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ") - // .Where(x => x.typeCommand.Trim().ToUpper() == "SLIP") - .ToList() + 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())) + // .Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ") + // .Where(x => x.typeCommand.Trim().ToUpper() == "SLIP") + .ToList() join r in req.refIds on p.Id.ToString() equals r.refId orderby r.Sequence @@ -1686,7 +1690,8 @@ namespace BMA.EHR.Placement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs index 33e31c73..731564a2 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -335,7 +335,7 @@ namespace BMA.EHR.Placement.Service.Controllers data.CreatedAt, data.Reason, - educationOld = data.EducationOld == "/" || data.EducationOld == null ? null : data.EducationOld, + data.EducationOld, data.AmountOld, data.PositionOld, organizationOld = data.OrganizationOld == "/" || data.OrganizationOld == null ? null : data.OrganizationOld, @@ -488,7 +488,7 @@ namespace BMA.EHR.Placement.Service.Controllers placementReceive.posLevelOldId = org.result.posLevelId; placementReceive.posLevelNameOld = org.result.posLevelName; - // placementReceive.EducationOld = profile.Educations.Count() == 0 ? null : $"{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Degree}-{profile.Educations.OrderByDescending(x => x.FinishDate).FirstOrDefault().Field}"; + placementReceive.EducationOld = org.result.education; placementReceive.AmountOld = org.result.Amount; placementReceive.PositionOld = org.result.position; diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs index 81bc5bce..bcc5d787 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs @@ -103,7 +103,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var retirementOthers = await _context.RetirementOthers.AsQueryable() .OrderByDescending(x => x.CreatedAt) - .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) + // .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) .Select(p => new { p.Id, @@ -721,7 +721,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, @@ -742,7 +743,7 @@ namespace BMA.EHR.Retirement.Service.Controllers CommandExcecuteDate = _null, RemarkHorizontal = _null, RemarkVertical = _null, - }); + }); } } return Success(result); @@ -927,7 +928,8 @@ namespace BMA.EHR.Retirement.Service.Controllers { result.Add(r); string? _null = null; - if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") { + if (r.RemarkHorizontal != null && r.RemarkHorizontal != "") + { result.Add(new { No = _null, diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs index 35b274fe..b6468e2b 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs @@ -103,7 +103,7 @@ namespace BMA.EHR.Retirement.Service.Controllers var retirementOuts = await _context.RetirementOuts.AsQueryable() .OrderByDescending(x => x.CreatedAt) - .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) + // .Where(x => rootId == "" ? true : (child1Id == "" ? x.rootOldId == rootId : (child2Id == "" ? x.child1OldId == child1Id : (child3Id == "" ? x.child2OldId == child2Id : (child4Id == "" ? x.child3OldId == child3Id : x.child4OldId == child4Id))))) .Select(p => new { p.Id,