refactor LeaveController to modify checkout-check endpoint for seminar handling #2199
This commit is contained in:
parent
3a6e4501fd
commit
3e8c3d998e
1 changed files with 5 additions and 3 deletions
|
|
@ -2397,11 +2397,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
/// <response code="200">เมื่อทำรายการสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("user/checkout-check")]
|
||||
[HttpGet("user/checkout-check/{isSeminar:bool}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> CheckoutCheckAsync()
|
||||
public async Task<ActionResult<ResponseObject>> CheckoutCheckAsync(bool isSeminar = false)
|
||||
{
|
||||
var time = DateTime.Now;
|
||||
|
||||
|
|
@ -2435,7 +2435,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
//var endTime = DateTimeOffset.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00").ToLocalTime().DateTime;
|
||||
|
||||
//var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00");
|
||||
var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}");
|
||||
var endTime = isSeminar
|
||||
? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {14:30}")
|
||||
: DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}");
|
||||
var status = string.Empty;
|
||||
if(lastCheckIn == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue