ลบรายชื่อออกคำสั่ง

This commit is contained in:
Bright 2024-10-07 17:05:12 +07:00
parent 61b6f77d85
commit d128960111
9 changed files with 644 additions and 0 deletions

View file

@ -1484,6 +1484,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-01
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("recruit/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteRecruit([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.PlacementProfiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
.ToListAsync();
placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-01
/// </summary>
@ -1757,6 +1777,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-02
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("candidate/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCandidate([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.PlacementProfiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
.ToListAsync();
placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-02
/// </summary>
@ -2029,6 +2069,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-03
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("appoint/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteAppoint([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.PlacementProfiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
.ToListAsync();
placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-03
/// </summary>
@ -2185,6 +2245,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-04
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("move/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteMove([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.PlacementProfiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
.ToListAsync();
placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-04
/// </summary>
@ -2339,6 +2419,26 @@ namespace BMA.EHR.Placement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-39
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("slip/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteSlip([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.PlacementProfiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.PlacementStatus.ToUpper() == "PREPARE-CONTAIN")
.ToListAsync();
placementProfiles.ForEach(profile => profile.PlacementStatus = "PREPARE-CONTAIN");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-39
/// </summary>