diff --git a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
index 4d5998c4..30bd1142 100644
--- a/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
+++ b/BMA.EHR.Discipline.Service/Controllers/DisciplineResultController.cs
@@ -758,6 +758,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-19
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command19/report/delete")]
+ public async Task> PostReportDeleteCommand19([FromBody] ReportPersonRequest req)
+ {
+ var data = await _context.DisciplineReport_Profiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-19 คำสั่งปลดออกจากราชการ
///
@@ -830,6 +850,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-20
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command20/report/delete")]
+ public async Task> PostReportDeletecommand20([FromBody] ReportPersonRequest req)
+ {
+ var data = await _context.DisciplineReport_Profiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-20 คำสั่งไล่ออกจากราชการ
///
@@ -909,6 +949,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-25
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command25/report/delete")]
+ public async Task> PostReportDeleteCommand25([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineReport_Profiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() =="REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// เอกสารแนบท้าย C-PM-25
///
@@ -1032,6 +1099,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-26
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command26/report/delete")]
+ public async Task> PostReportDeleteCommand26([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineReport_Profiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-26 คำสั่งให้ออกจากราชการไว้ก่อน
///
@@ -1113,6 +1207,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-27
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command27/report/delete")]
+ public async Task> PostReportDeleteCommand27([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-27 คำสั่งลงโทษ ภาคทัณฑ์
///
@@ -1193,6 +1314,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-28
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command28/report/delete")]
+ public async Task> PostReportDeleteCommand28([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-28 คำสั่งลงโทษ ตัดเงินเดือน
///
@@ -1273,6 +1421,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-29
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command29/report/delete")]
+ public async Task> PostReportDeleteCommand29([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-29 คำสั่งลงโทษ ลดขั้นเงินเดือน
///
@@ -1353,6 +1528,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-30
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command30/report/delete")]
+ public async Task> PostReportDeleteCommand30([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-30 คำสั่งเพิ่มโทษ
///
@@ -1433,6 +1635,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-31
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command31/report/delete")]
+ public async Task> PostReportDeleteCommand31([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ data.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-31 คำสั่งงดโทษ
///
@@ -1520,6 +1749,41 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-32
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command32/report/delete")]
+ public async Task> PostReportDeleteCommand32([FromBody] ReportPersonRequest req)
+ {
+ try
+ {
+ var data1 = await _context.DisciplineInvestigate_ProfileComplaints
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.IsReport == "REPORT")
+ .ToListAsync();
+
+ data1.ForEach(profile => profile.IsReport = "APPROVE");
+ var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.IsReport == "REPORT")
+ .ToListAsync();
+
+ data2.ForEach(profile => profile.IsReport = "APPROVE");
+
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+ catch
+ {
+ throw;
+ }
+ }
+
///
/// ออกคำสั่ง C-PM-32 คำสั่งยุติเรื่อง
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
index c7fd9ad3..699d5ddd 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
@@ -762,6 +762,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-05
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("appoint/report/delete")]
+ public async Task> PostReportDeleteAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementAppointments
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-05
///
@@ -904,6 +924,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-06
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("slip/report/delete")]
+ public async Task> PostReportDeleteSlip([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementAppointments
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-06
///
@@ -1046,6 +1086,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-07
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("move/report/delete")]
+ public async Task> PostReportDeleteMove([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementAppointments
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-07
///
@@ -1189,6 +1249,27 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-22
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("employee-appoint/report/delete")]
+ public async Task> PostReportDeleteEmployeeAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementAppointments
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.type == "EMPLOYEE")
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-22
///
@@ -1325,6 +1406,27 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-24
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("employee-move/report/delete")]
+ public async Task> PostReportDeleteEmployeeMove([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementAppointments
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.type == "EMPLOYEE")
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-24
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
index 067dae21..c8f93b8c 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
@@ -1484,6 +1484,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-01
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("recruit/report/delete")]
+ public async Task> PostReportDeleteRecruit([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-01
///
@@ -1757,6 +1777,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-02
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("candidate/report/delete")]
+ public async Task> PostReportDeleteCandidate([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-02
///
@@ -2029,6 +2069,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-03
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("appoint/report/delete")]
+ public async Task> PostReportDeleteAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-03
///
@@ -2185,6 +2245,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-04
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("move/report/delete")]
+ public async Task> PostReportDeleteMove([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-04
///
@@ -2339,6 +2419,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-39
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("slip/report/delete")]
+ public async Task> PostReportDeleteSlip([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-39
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs
index 1cd048e4..95ea3a91 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementOfficerController.cs
@@ -588,6 +588,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-15
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command/report/delete")]
+ public async Task> PostReportDelete([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementOfficers
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-15
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
index a4c5bcd4..1483572c 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
@@ -899,6 +899,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-14
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command/report/delete")]
+ public async Task> PostReportDelete([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementReceives
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-14
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs
index 58c4a3a2..c447495f 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementTransferController.cs
@@ -778,6 +778,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-13
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command/report/delete")]
+ public async Task> PostReportDelete([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementTransfers
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "REPORTREPORT");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-13
///
diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs
index b3a130c8..8ec26491 100644
--- a/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs
+++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOtherController.cs
@@ -645,6 +645,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-08
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("appoint/report/delete")]
+ public async Task> PostReportDeleteAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementOthers
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-08
///
@@ -780,6 +800,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-09
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("out/report/delete")]
+ public async Task> PostReportDeleteOut([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementOthers
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-09
///
diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs
index d059ad26..ec8982d5 100644
--- a/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs
+++ b/BMA.EHR.Retirement.Service/Controllers/RetirementOutController.cs
@@ -486,6 +486,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-18
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command/report/delete")]
+ public async Task> PostDeleteReport([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementResigns
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-18 คำสั่งให้ออกจากราชการ
///
diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
index 277025a4..dc2b4cb9 100644
--- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
+++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs
@@ -1645,6 +1645,25 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
await _context.SaveChangesAsync();
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-17
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("command/report/delete")]
+ public async Task> PostReportDelete([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementResigns
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
///
/// เอกสารแนบท้าย C-PM-17
@@ -1771,6 +1790,26 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-23
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("employee/report/delete")]
+ public async Task> PostReportDeleteEmployee([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementResigns
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "REPORT")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "APPROVE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// เอกสารแนบท้าย C-PM-23
///
@@ -1893,6 +1932,25 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
return Success();
}
+ ///
+ /// ลบรายชื่อออกคำสั่ง C-PM-41
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("leave-cancel/report/delete")]
+ public async Task> PostReportDeleteLeaveCancel([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.RetirementResigns
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Status.ToUpper() == "DONECANCEL")
+ .ToListAsync();
+ placementProfiles.ForEach(profile => profile.Status = "DONE");
+ await _context.SaveChangesAsync();
+ return Success();
+ }
///
/// เอกสารแนบท้าย C-PM-41
///