diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
index 40ae00ea..307aa88a 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
@@ -743,6 +743,33 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success(appointments);
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-05
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("appoint/report")]
+ public async Task> PostReportAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Include(x => x.Placement)
+ .ThenInclude(x => x.PlacementType)
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Placement!.PlacementType!.Name == "คำสั่งแต่งตั้ง")
+ .Where(x => x.typeCommand.Trim().ToUpper() == "REPORT")
+ .ToListAsync();
+ foreach (var placementProfile in placementProfiles)
+ {
+ // update placementstatus
+ placementProfile.PlacementStatus = "PREPARE-CONTAIN";
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-05
///
@@ -820,6 +847,33 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-06
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("slip/report")]
+ public async Task> PostReportSlip([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Include(x => x.Placement)
+ .ThenInclude(x => x.PlacementType)
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ")
+ .Where(x => x.typeCommand.Trim().ToUpper() == "REPORT")
+ .ToListAsync();
+ foreach (var placementProfile in placementProfiles)
+ {
+ // update placementstatus
+ placementProfile.PlacementStatus = "PREPARE-CONTAIN";
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-06
///
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
index 857222a5..d79907a0 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementController.cs
@@ -1874,6 +1874,33 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-03
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("appoint/report")]
+ public async Task> PostReportAppoint([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Include(x => x.Placement)
+ .ThenInclude(x => x.PlacementType)
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Placement!.PlacementType!.Name == "แต่งตั้งข้าราชการ")
+ .Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
+ .ToListAsync();
+ foreach (var placementProfile in placementProfiles)
+ {
+ // update placementstatus
+ placementProfile.PlacementStatus = "PREPARE-CONTAIN";
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-03
///
@@ -1949,6 +1976,33 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-04
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("move/report")]
+ public async Task> PostReportMove([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Include(x => x.Placement)
+ .ThenInclude(x => x.PlacementType)
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Placement!.PlacementType!.Name == "ย้ายข้าราชการ")
+ .Where(x => x.typeCommand.Trim().ToUpper() == "MOVE")
+ .ToListAsync();
+ foreach (var placementProfile in placementProfiles)
+ {
+ // update placementstatus
+ placementProfile.PlacementStatus = "PREPARE-CONTAIN";
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-04
///
@@ -2024,6 +2078,33 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+ ///
+ /// ส่งรายชื่อออกคำสั่ง C-PM-39
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpPost("slip/report")]
+ public async Task> PostReportSlip([FromBody] ReportPersonRequest req)
+ {
+ var placementProfiles = await _context.PlacementProfiles
+ .Include(x => x.Placement)
+ .ThenInclude(x => x.PlacementType)
+ .Where(x => req.refIds.Contains(x.Id.ToString()))
+ .Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ")
+ .Where(x => x.typeCommand.Trim().ToUpper() == "SLIP")
+ .ToListAsync();
+ foreach (var placementProfile in placementProfiles)
+ {
+ // update placementstatus
+ placementProfile.PlacementStatus = "PREPARE-CONTAIN";
+ }
+ await _context.SaveChangesAsync();
+ return Success();
+ }
+
///
/// ออกคำสั่ง C-PM-39
///