add endpoint report

This commit is contained in:
AdisakKanthawilang 2025-02-11 20:21:49 +07:00
parent fd17afb145
commit 7843da3bde
2 changed files with 230 additions and 58 deletions

View file

@ -219,7 +219,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report2/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport3Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
public async Task<ActionResult<ResponseObject>> GetInsigniaReport2Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
@ -265,7 +265,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report3/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport2Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
public async Task<ActionResult<ResponseObject>> GetInsigniaReport3Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
@ -316,6 +316,151 @@ namespace BMA.EHR.Insignia.Service.Controllers
}
#endregion
#region /
/// <summary>
/// รายชื่อข้าราชการฯ ที่ได้รับ/ไม่ได้รับการจ่ายใบกำกับฯ
/// </summary>
/// <param name="type">type </param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report4/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport4Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
var date = $"ณ วันที่ {DateTime.Now.Date.ToThaiShortDate().ToThaiNumber()}";
var result = new
{
template = "reportInsignia4",
reportName = "reportInsignia4",
data = new
{
yearInsignalPeriod = "",
date = date,
data = "",
}
};
return Success(result);
}
catch
{
throw;
}
}
#endregion
#region
/// <summary>
/// รายงานสถิติการได้รับเครื่องราชอิสริยาภรณ์ข้าราชการ ฯ
/// </summary>
/// <param name="type">type </param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report5/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport5Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
var date = $"ณ วันที่ {DateTime.Now.Date.ToThaiShortDate().ToThaiNumber()}";
var result = new
{
template = "reportInsignia5",
reportName = "reportInsignia5",
data = new
{
yearInsignalPeriod = "",
date = date,
data = "",
}
};
return Success(result);
}
catch
{
throw;
}
}
#endregion
#region
/// <summary>
/// รายงานผลการจ่ายประกาศนียบัตรกำกับเครื่องราชอิสริยาภรณ์ แยกรายหน่วยงาน
/// </summary>
/// <param name="type">type </param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report6/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport6Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
var date = $"ณ วันที่ {DateTime.Now.Date.ToThaiShortDate().ToThaiNumber()}";
var result = new
{
template = "reportInsignia6",
reportName = "reportInsignia6",
data = new
{
yearInsignalPeriod = "",
date = date,
data = "",
}
};
return Success(result);
}
catch
{
throw;
}
}
#endregion
#region
/// <summary>
/// รายงานผลการจ่ายประกาศนียบัตรกำกับเครื่องราชอิสริยาภรณ์ แยกรายหน่วยงาน
/// </summary>
/// <param name="type">type </param>
/// <returns></returns>
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
[HttpPost("report7/{type}")]
public async Task<ActionResult<ResponseObject>> GetInsigniaReport7Async([FromBody] GetInsigniaDetailByNodeReportDto req, string type)
{
try
{
var date = $"ณ วันที่ {DateTime.Now.Date.ToThaiShortDate().ToThaiNumber()}";
var result = new
{
template = "reportInsignia7",
reportName = "reportInsignia7",
data = new
{
yearInsignalPeriod = "",
date = date,
data = "",
}
};
return Success(result);
}
catch
{
throw;
}
}
#endregion
}
}