Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # BMA.EHR.Placement.Service/appsettings.json
This commit is contained in:
parent
6b1e648721
commit
109016e2b5
3 changed files with 107 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories.Commands;
|
||||
using BMA.EHR.Command.Service.Requests;
|
||||
using BMA.EHR.Domain.Common;
|
||||
using BMA.EHR.Domain.Extensions;
|
||||
using BMA.EHR.Domain.Shared;
|
||||
|
|
@ -7,6 +8,7 @@ using BMA.EHR.Infrastructure.Persistence;
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Security.Claims;
|
||||
|
||||
|
|
@ -203,6 +205,49 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostAsync([FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo.ToString(),
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
PositionName = req.registerPosition,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
ExamRoundId = req.examRound,
|
||||
ConclusionRegisterNo = req.conclusionRegisterNo,
|
||||
ConclusionRegisterDate = req.conclusionRegisterDate,
|
||||
ConclusionResultNo = req.conclusionResultNo,
|
||||
ConclusionResultDate = req.conclusionResultDate
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-24 : dropdown รอบการสอบ หน้ารายละเอียดการออกคำสั่ง
|
||||
/// </summary>
|
||||
|
|
|
|||
31
BMA.EHR.Command.Service/Requests/CreateCommandRequest.cs
Normal file
31
BMA.EHR.Command.Service/Requests/CreateCommandRequest.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class CreateCommandRequest
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; }
|
||||
|
||||
public int orderNo { get; set; }
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string signatoryBy { get; set; }
|
||||
|
||||
public string signatoryPosition { get; set; }
|
||||
|
||||
public Guid examRound { get; set; }
|
||||
|
||||
public string registerPosition { get; set; }
|
||||
|
||||
public string conclusionRegisterNo { get; set; }
|
||||
|
||||
public DateTime conclusionRegisterDate { get; set; }
|
||||
|
||||
public string conclusionResultNo { get; set; }
|
||||
|
||||
public DateTime conclusionResultDate { get; set; }
|
||||
}
|
||||
}
|
||||
31
BMA.EHR.Command.Service/Requests/UpdateCommandRequest.cs
Normal file
31
BMA.EHR.Command.Service/Requests/UpdateCommandRequest.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class UpdateCommandRequest
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; }
|
||||
|
||||
public int orderNo { get; set; }
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string signatoryBy { get; set; }
|
||||
|
||||
public string signatoryPosition { get; set; }
|
||||
|
||||
public Guid examRound { get; set; }
|
||||
|
||||
public string registerPosition { get; set; }
|
||||
|
||||
public string conclusionRegisterNo { get; set; }
|
||||
|
||||
public DateTime conclusionRegisterDate { get; set; }
|
||||
|
||||
public string conclusionResultNo { get; set; }
|
||||
|
||||
public DateTime conclusionResultDate { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue