api บันทึกเครื่องราช
This commit is contained in:
parent
9abb9c5422
commit
51bdcf4041
50 changed files with 162548 additions and 111 deletions
|
|
@ -47,17 +47,16 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <summary>
|
||||
/// list รอบเครื่องราช
|
||||
/// </summary>
|
||||
/// <param name="type">ประเภทเครื่องราช(insignia=เครื่องราช,coin=เหรียญ)</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("{type}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetList(string type)
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetList()
|
||||
{
|
||||
var insigniaPeriods = await _context.InsigniaPeriods.AsQueryable()
|
||||
.Where(x => x.Type == type)
|
||||
// .Where(x => x.Type == type)
|
||||
.OrderByDescending(x => x.Year)
|
||||
.ThenByDescending(x => x.StartDate)
|
||||
.Select(p => new
|
||||
|
|
@ -147,7 +146,6 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <summary>
|
||||
/// สร้างรอบเครื่องราช
|
||||
/// </summary>
|
||||
/// <param name="type">ประเภทเครื่องราช(insignia=เครื่องราช,coin=เหรียญ)</param>
|
||||
/// <param name="req.Round">รอบที่</param>
|
||||
/// <param name="req.Name">ชื่อรอบ</param>
|
||||
/// <param name="req.Year">ปีที่เสนอ</param>
|
||||
|
|
@ -160,8 +158,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("{type}")]
|
||||
public async Task<ActionResult<ResponseObject>> Post([FromForm] InsigniaPeriodRequest req, string type)
|
||||
[HttpPost()]
|
||||
public async Task<ActionResult<ResponseObject>> Post([FromForm] InsigniaPeriodRequest req)
|
||||
{
|
||||
var insigniaPeriod = await _context.InsigniaPeriods.AsQueryable()
|
||||
.Where(x => x.Round == req.Round && x.Year == req.Year)
|
||||
|
|
@ -177,7 +175,6 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
StartDate = req.StartDate,
|
||||
EndDate = req.EndDate,
|
||||
Amount = req.Amount,
|
||||
Type = type.Trim().ToUpper(),
|
||||
IsActive = true,
|
||||
CreatedUserId = FullName ?? "",
|
||||
CreatedFullName = UserId ?? "System Administrator",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue