ลบรายชื่อออกคำสั่ง
This commit is contained in:
parent
61b6f77d85
commit
d128960111
9 changed files with 644 additions and 0 deletions
|
|
@ -762,6 +762,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-05
|
||||
/// </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.PlacementAppointments
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-05
|
||||
/// </summary>
|
||||
|
|
@ -904,6 +924,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-06
|
||||
/// </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.PlacementAppointments
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-06
|
||||
/// </summary>
|
||||
|
|
@ -1046,6 +1086,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-07
|
||||
/// </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.PlacementAppointments
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-07
|
||||
/// </summary>
|
||||
|
|
@ -1189,6 +1249,27 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-22
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("employee-appoint/report/delete")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportDeleteEmployeeAppoint([FromBody] ReportPersonRequest req)
|
||||
{
|
||||
var placementProfiles = await _context.PlacementAppointments
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.type == "EMPLOYEE")
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-22
|
||||
/// </summary>
|
||||
|
|
@ -1325,6 +1406,27 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-24
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("employee-move/report/delete")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportDeleteEmployeeMove([FromBody] ReportPersonRequest req)
|
||||
{
|
||||
var placementProfiles = await _context.PlacementAppointments
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.type == "EMPLOYEE")
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-24
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -588,6 +588,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-15
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command/report/delete")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportDelete([FromBody] ReportPersonRequest req)
|
||||
{
|
||||
var placementProfiles = await _context.PlacementOfficers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-15
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -899,6 +899,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-14
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command/report/delete")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportDelete([FromBody] ReportPersonRequest req)
|
||||
{
|
||||
var placementProfiles = await _context.PlacementReceives
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "APPROVE");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-14
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -778,6 +778,26 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ลบรายชื่อออกคำสั่ง C-PM-13
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("command/report/delete")]
|
||||
public async Task<ActionResult<ResponseObject>> PostReportDelete([FromBody] ReportPersonRequest req)
|
||||
{
|
||||
var placementProfiles = await _context.PlacementTransfers
|
||||
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||
.Where(x => x.Status.ToUpper() == "REPORT")
|
||||
.ToListAsync();
|
||||
placementProfiles.ForEach(profile => profile.Status = "REPORTREPORT");
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// เอกสารแนบท้าย C-PM-13
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue