ลบรายชื่อออกคำสั่ง
This commit is contained in:
parent
61b6f77d85
commit
d128960111
9 changed files with 644 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue