diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
index f88f6a3f..99aa9ca6 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs
@@ -516,5 +516,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+
+ ///
+ /// หน่วยงานที่ถูกเลือกไปแล้ว
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpGet("use")]
+ public async Task> GetAppointmentsUse()
+ {
+ var appointments = await _context.PlacementAppointments
+ .Where(x => x.PositionNumber != null)
+ .Select(x => x.PositionNumber.Id)
+ .ToListAsync();
+
+ return Success(appointments);
+ }
}
}
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
index 067e7f98..0f264530 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs
@@ -512,5 +512,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+
+ ///
+ /// หน่วยงานที่ถูกเลือกไปแล้ว
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpGet("use")]
+ public async Task> GetReceiveUse()
+ {
+ var receives = await _context.PlacementReceives
+ .Where(x => x.PositionNumber != null)
+ .Select(x => x.PositionNumber.Id)
+ .ToListAsync();
+
+ return Success(receives);
+ }
}
}
diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs
index d39f72f1..c611c529 100644
--- a/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs
+++ b/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs
@@ -510,5 +510,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
+
+ ///
+ /// หน่วยงานที่ถูกเลือกไปแล้ว
+ ///
+ ///
+ ///
+ /// ค่าตัวแปรที่ส่งมาไม่ถูกต้อง
+ /// ไม่ได้ Login เข้าระบบ
+ /// เมื่อเกิดข้อผิดพลาดในการทำงาน
+ [HttpGet("use")]
+ public async Task> GetRelocationUse()
+ {
+ var relocation = await _context.PlacementRelocations
+ .Where(x => x.PositionNumber != null)
+ .Select(x => x.PositionNumber.Id)
+ .ToListAsync();
+
+ return Success(relocation);
+ }
}
}