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

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

@ -758,6 +758,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-19
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command19/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand19([FromBody] ReportPersonRequest req)
{
var data = await _context.DisciplineReport_Profiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// ออกคำสั่ง C-PM-19 คำสั่งปลดออกจากราชการ
/// </summary>
@ -830,6 +850,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-20
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command20/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeletecommand20([FromBody] ReportPersonRequest req)
{
var data = await _context.DisciplineReport_Profiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// ออกคำสั่ง C-PM-20 คำสั่งไล่ออกจากราชการ
/// </summary>
@ -909,6 +949,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-25
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command25/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand25([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineReport_Profiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.Status.ToUpper() =="REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// เอกสารแนบท้าย C-PM-25
/// </summary>
@ -1032,6 +1099,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-26
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command26/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand26([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineReport_Profiles
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-26 คำสั่งให้ออกจากราชการไว้ก่อน
/// </summary>
@ -1113,6 +1207,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-27
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command27/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand27([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-27 คำสั่งลงโทษ ภาคทัณฑ์
/// </summary>
@ -1193,6 +1314,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-28
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command28/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand28([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-28 คำสั่งลงโทษ ตัดเงินเดือน
/// </summary>
@ -1273,6 +1421,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-29
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command29/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand29([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-29 คำสั่งลงโทษ ลดขั้นเงินเดือน
/// </summary>
@ -1353,6 +1528,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-30
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command30/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand30([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-30 คำสั่งเพิ่มโทษ
/// </summary>
@ -1433,6 +1635,33 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-31
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command31/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand31([FromBody] ReportPersonRequest req)
{
try
{
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id.ToString()))
.Where(x => x.Status.ToUpper() == "REPORT")
.ToListAsync();
data.ForEach(profile => profile.Status = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-31 คำสั่งงดโทษ
/// </summary>
@ -1520,6 +1749,41 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
}
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-32
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("command32/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteCommand32([FromBody] ReportPersonRequest req)
{
try
{
var data1 = await _context.DisciplineInvestigate_ProfileComplaints
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.IsReport == "REPORT")
.ToListAsync();
data1.ForEach(profile => profile.IsReport = "APPROVE");
var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.IsReport == "REPORT")
.ToListAsync();
data2.ForEach(profile => profile.IsReport = "APPROVE");
await _context.SaveChangesAsync();
return Success();
}
catch
{
throw;
}
}
/// <summary>
/// ออกคำสั่ง C-PM-32 คำสั่งยุติเรื่อง
/// </summary>

View file

@ -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>

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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -645,6 +645,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-08
/// </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.RetirementOthers
.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-08
/// </summary>
@ -780,6 +800,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-09
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("out/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteOut([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.RetirementOthers
.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-09
/// </summary>

View file

@ -486,6 +486,26 @@ namespace BMA.EHR.Retirement.Service.Controllers
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-18
/// </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>> PostDeleteReport([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.RetirementResigns
.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-18 คำสั่งให้ออกจากราชการ
/// </summary>

View file

@ -1645,6 +1645,25 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-17
/// </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.RetirementResigns
.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-17
@ -1771,6 +1790,26 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-23
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("employee/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteEmployee([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.RetirementResigns
.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-23
/// </summary>
@ -1893,6 +1932,25 @@ $"คำขอลาออกของ {updated.prefix}{updated.firstName} {upda
return Success();
}
/// <summary>
/// ลบรายชื่อออกคำสั่ง C-PM-41
/// </summary>
/// <returns></returns>
/// <response code="200"></response>
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("leave-cancel/report/delete")]
public async Task<ActionResult<ResponseObject>> PostReportDeleteLeaveCancel([FromBody] ReportPersonRequest req)
{
var placementProfiles = await _context.RetirementResigns
.Where(x => req.refIds.Contains(x.Id.ToString()))
.Where(x => x.Status.ToUpper() == "DONECANCEL")
.ToListAsync();
placementProfiles.ForEach(profile => profile.Status = "DONE");
await _context.SaveChangesAsync();
return Success();
}
/// <summary>
/// เอกสารแนบท้าย C-PM-41
/// </summary>