This commit is contained in:
parent
780eebea4d
commit
8a27795586
1 changed files with 192 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ using Swashbuckle.AspNetCore.Annotations;
|
|||
using System.Net.Http.Headers;
|
||||
using System.Security.Claims;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using BMA.EHR.Application.Repositories.Reports;
|
||||
|
||||
namespace BMA.EHR.Placement.Service.Controllers
|
||||
{
|
||||
|
|
@ -32,6 +33,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly PermissionRepository _permission;
|
||||
private readonly TransferReportRepository _service;
|
||||
|
||||
public PlacementTransferController(PlacementRepository repository,
|
||||
NotificationRepository repositoryNoti,
|
||||
|
|
@ -39,7 +41,8 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
MinIOService documentService,
|
||||
IHttpContextAccessor httpContextAccessor,
|
||||
IConfiguration configuration,
|
||||
PermissionRepository permission)
|
||||
PermissionRepository permission,
|
||||
TransferReportRepository service)
|
||||
{
|
||||
_repository = repository;
|
||||
_repositoryNoti = repositoryNoti;
|
||||
|
|
@ -48,6 +51,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
_httpContextAccessor = httpContextAccessor;
|
||||
_configuration = configuration;
|
||||
_permission = permission;
|
||||
_service = service;
|
||||
}
|
||||
|
||||
#region " Properties "
|
||||
|
|
@ -927,5 +931,192 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
|
||||
#region คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน
|
||||
/// <summary>
|
||||
/// คําร้องขอโอนไปถึงส่วนราชการอื่นนอก กรุงเทพมหานครที่ข้าราชการประสงค์ขอโอน
|
||||
/// </summary>
|
||||
/// <param name="id">id </param>
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("21/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer1ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData1Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer1",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน
|
||||
/// <summary>
|
||||
/// หนังสือแจ้งสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานคร ให้ทราบตําแหน่งและตําแหน่งเลขที่ที่ดําเนินการให้โอน
|
||||
/// </summary>
|
||||
/// <param name="id">id </param>
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("22/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer2ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData2Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer2",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน
|
||||
/// <summary>
|
||||
/// หนังสือยินยอมให้โอนและวันที่พร้อมจะให้โอนไปยัง หน่วยงานที่รับโอน
|
||||
/// </summary>
|
||||
/// <param name = "id" > id </param >
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code = "200" > เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code = "401" > ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code = "500" > เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("23/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer3ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData3Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer3",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์
|
||||
/// <summary>
|
||||
/// หนังสือแจ้งสหกรณ์ออมทรัพย์กรุงเทพมหานครเพื่อขอ ตรวจสอบภาระหนี้สินสหกรณ์ออมทรัพย์
|
||||
/// </summary>
|
||||
/// <param name="id">id </param>
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("24/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer4ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData4Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer4",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ
|
||||
/// <summary>
|
||||
/// หนังสือถึงสํานักงานการเจ้าหน้าที่ สํานักปลัดกรุงเทพมหานครเพื่อขอตรวจสอบพฤติการณ์ทางวินัย และภาระหนี้สินสวัสดิการ
|
||||
/// </summary>
|
||||
/// <param name="id">id </param>
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("25/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer5ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData5Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer5",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร
|
||||
/// <summary>
|
||||
/// หนังสือถึงสถาบันพัฒนาข้าราชการกรุงเทพมหานครเพื่อขอตรวจสอบเรื่องภาระผูกพันการรับทุนและการลา ศึกษาต่อกับทางกรุงเทพมหานคร
|
||||
/// </summary>
|
||||
/// <param name="id">id </param>
|
||||
/// <param name="exportType">pdf, docx หรือ xlsx</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("26/{exportType}/{id}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetTransfer6ConvertReportAsync(Guid id, string exportType = "pdf")
|
||||
{
|
||||
try
|
||||
{
|
||||
var data = await _service.GetData6Transfer(id);
|
||||
var result = new
|
||||
{
|
||||
template = "transfer6",
|
||||
reportName = "docx-report",
|
||||
data = data
|
||||
};
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue