เพิ่ม api หน่วยงานที่ถูกเลือกไปแล้ว (ระบบแต่งตั้ง-เลื่อน, ระบบรับโอน, ระบบย้าย)

This commit is contained in:
Harid Promsri (Bright) 2023-08-15 18:09:29 +07:00
parent 243700bd53
commit eadbf102e7
3 changed files with 57 additions and 0 deletions

View file

@ -516,5 +516,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// หน่วยงานที่ถูกเลือกไปแล้ว
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("use")]
public async Task<ActionResult<ResponseObject>> GetAppointmentsUse()
{
var appointments = await _context.PlacementAppointments
.Where(x => x.PositionNumber != null)
.Select(x => x.PositionNumber.Id)
.ToListAsync();
return Success(appointments);
}
}
}

View file

@ -512,5 +512,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// หน่วยงานที่ถูกเลือกไปแล้ว
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("use")]
public async Task<ActionResult<ResponseObject>> GetReceiveUse()
{
var receives = await _context.PlacementReceives
.Where(x => x.PositionNumber != null)
.Select(x => x.PositionNumber.Id)
.ToListAsync();
return Success(receives);
}
}
}

View file

@ -510,5 +510,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// หน่วยงานที่ถูกเลือกไปแล้ว
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpGet("use")]
public async Task<ActionResult<ResponseObject>> GetRelocationUse()
{
var relocation = await _context.PlacementRelocations
.Where(x => x.PositionNumber != null)
.Select(x => x.PositionNumber.Id)
.ToListAsync();
return Success(relocation);
}
}
}