ตำแหน่งที่เลืิอกไปแล้ว

This commit is contained in:
Kittapath 2024-06-26 18:05:12 +07:00
parent 509a9933b0
commit b3ed889433
5 changed files with 75 additions and 86 deletions

View file

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

View file

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

View file

@ -1045,17 +1045,6 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success(); return Success();
} }
[HttpGet("position/use")]
public async Task<ActionResult<ResponseObject>> GetPositionUse()
{
var position = await _context.PlacementProfiles
.Where(x => x.PositionNumber != null)
.Select(x => x.PositionNumber)
.ToListAsync();
return Success(position);
}
[HttpPut("position/{personalId:length(36)}")] [HttpPut("position/{personalId:length(36)}")]
public async Task<ActionResult<ResponseObject>> UpdatePositionDraft([FromBody] List<Guid> items, Guid personalId) public async Task<ActionResult<ResponseObject>> UpdatePositionDraft([FromBody] List<Guid> items, Guid personalId)
{ {
@ -1283,5 +1272,24 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success(); 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>> GetPositionUse()
{
var position = await _context.PlacementProfiles
.Where(x => x.posmasterId != null)
.Where(x => x.PlacementStatus != "CONTAIN")
.Select(x => x.posmasterId)
.ToListAsync();
return Success(position);
}
} }
} }

View file

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

View file

@ -525,24 +525,5 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success(); 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);
}
} }
} }