diff --git a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs index c5cdbe34..9e5cbb0c 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementAppointmentController.cs @@ -522,5 +522,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 b56f3408..7bb56fa7 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementReceiveController.cs @@ -518,5 +518,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 131b3334..7c93b581 100644 --- a/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs +++ b/BMA.EHR.Placement.Service/Controllers/PlacementRelocationController.cs @@ -516,5 +516,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); + } } }