ส่งรายชื่อออกคำสั่ง 3, 4, 39, 5, 6
This commit is contained in:
parent
9b6db93a5f
commit
27aa7a773d
2 changed files with 135 additions and 0 deletions
|
|
@ -743,6 +743,33 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
return Success(appointments);
|
return Success(appointments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <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")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportAppoint([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
|
.Include(x => x.Placement)
|
||||||
|
.ThenInclude(x => x.PlacementType)
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Where(x => x.Placement!.PlacementType!.Name == "คำสั่งแต่งตั้ง")
|
||||||
|
.Where(x => x.typeCommand.Trim().ToUpper() == "REPORT")
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.PlacementStatus = "PREPARE-CONTAIN";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-05
|
/// ออกคำสั่ง C-PM-05
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -820,6 +847,33 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
return Success();
|
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")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportSlip([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
|
.Include(x => x.Placement)
|
||||||
|
.ThenInclude(x => x.PlacementType)
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ")
|
||||||
|
.Where(x => x.typeCommand.Trim().ToUpper() == "REPORT")
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.PlacementStatus = "PREPARE-CONTAIN";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-06
|
/// ออกคำสั่ง C-PM-06
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1874,6 +1874,33 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
return Success();
|
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")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportAppoint([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
|
.Include(x => x.Placement)
|
||||||
|
.ThenInclude(x => x.PlacementType)
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Where(x => x.Placement!.PlacementType!.Name == "แต่งตั้งข้าราชการ")
|
||||||
|
.Where(x => x.typeCommand.Trim().ToUpper() == "APPOIN")
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.PlacementStatus = "PREPARE-CONTAIN";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-03
|
/// ออกคำสั่ง C-PM-03
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -1949,6 +1976,33 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
return Success();
|
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")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportMove([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
|
.Include(x => x.Placement)
|
||||||
|
.ThenInclude(x => x.PlacementType)
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Where(x => x.Placement!.PlacementType!.Name == "ย้ายข้าราชการ")
|
||||||
|
.Where(x => x.typeCommand.Trim().ToUpper() == "MOVE")
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.PlacementStatus = "PREPARE-CONTAIN";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-04
|
/// ออกคำสั่ง C-PM-04
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -2024,6 +2078,33 @@ namespace BMA.EHR.Placement.Service.Controllers
|
||||||
return Success();
|
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")]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostReportSlip([FromBody] ReportPersonRequest req)
|
||||||
|
{
|
||||||
|
var placementProfiles = await _context.PlacementProfiles
|
||||||
|
.Include(x => x.Placement)
|
||||||
|
.ThenInclude(x => x.PlacementType)
|
||||||
|
.Where(x => req.refIds.Contains(x.Id.ToString()))
|
||||||
|
.Where(x => x.Placement!.PlacementType!.Name == "เลื่อนข้าราชการ")
|
||||||
|
.Where(x => x.typeCommand.Trim().ToUpper() == "SLIP")
|
||||||
|
.ToListAsync();
|
||||||
|
foreach (var placementProfile in placementProfiles)
|
||||||
|
{
|
||||||
|
// update placementstatus
|
||||||
|
placementProfile.PlacementStatus = "PREPARE-CONTAIN";
|
||||||
|
}
|
||||||
|
await _context.SaveChangesAsync();
|
||||||
|
return Success();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ออกคำสั่ง C-PM-39
|
/// ออกคำสั่ง C-PM-39
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue