Change API Put and Post CommandType 01-09
This commit is contained in:
parent
0aa0aedba9
commit
9c03708bdc
13 changed files with 17000 additions and 37 deletions
|
|
@ -364,22 +364,27 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
#region " Put and Post "
|
||||
|
||||
#region " C-PM-01 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-01
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("detail")]
|
||||
[HttpPost("c-pm-01/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostAsync([FromBody] CreateCommandRequest req)
|
||||
public async Task<ActionResult<ResponseObject>> PostType01Async([FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
|
|
@ -391,13 +396,16 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
PlacementId = req.examRound,
|
||||
ConclusionRegisterNo = req.conclusionRegisterNo,
|
||||
ConclusionRegisterNo = req.conclusionRegisterNo ?? "",
|
||||
ConclusionRegisterDate = req.conclusionRegisterDate,
|
||||
ConclusionResultNo = req.conclusionResultNo,
|
||||
ConclusionResultDate = req.conclusionResultDate,
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -412,18 +420,18 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-01
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("detail/{orderId}")]
|
||||
[HttpPut("c-pm-01/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutAsync(Guid orderId, [FromBody] CreateCommandRequest req)
|
||||
public async Task<ActionResult<ResponseObject>> PutType01Async(Guid orderId, [FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
|
@ -431,7 +439,7 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
var placement = await _placementRepository.GetByIdAsync(req.examRound);
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
|
|
@ -444,11 +452,632 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
|
||||
var placement = await _placementRepository.GetByIdAsync(req.examRound);
|
||||
order.Placement = placement!;
|
||||
order.ConclusionRegisterNo = req.conclusionRegisterNo;
|
||||
order.ConclusionRegisterDate = req.conclusionRegisterDate;
|
||||
order.ConclusionResultNo = req.conclusionResultNo;
|
||||
order.ConclusionResultDate = req.conclusionResultDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-02 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-02
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-02/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType02Async([FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
PositionName = req.registerPosition,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
PlacementId = 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-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-02
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-02/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType02Async(Guid orderId, [FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.PositionName = req.registerPosition;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
|
||||
var placement = await _placementRepository.GetByIdAsync(req.examRound);
|
||||
order.Placement = placement!;
|
||||
order.ConclusionRegisterNo = req.conclusionRegisterNo;
|
||||
order.ConclusionRegisterDate = req.conclusionRegisterDate;
|
||||
order.ConclusionResultNo = req.conclusionResultNo;
|
||||
order.ConclusionResultDate = req.conclusionResultDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-03 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-03
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-03/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType03Async([FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
PositionName = req.registerPosition,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
PlacementId = 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-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-04
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-03/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType03Async(Guid orderId, [FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.PositionName = req.registerPosition;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
|
||||
var placement = await _placementRepository.GetByIdAsync(req.examRound);
|
||||
order.Placement = placement!;
|
||||
order.ConclusionRegisterNo = req.conclusionRegisterNo;
|
||||
order.ConclusionRegisterDate = req.conclusionRegisterDate;
|
||||
order.ConclusionResultNo = req.conclusionResultNo;
|
||||
order.ConclusionResultDate = req.conclusionResultDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-04 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-04
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-04/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType04Async([FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
PositionName = req.registerPosition,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
PlacementId = 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-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-04
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-04/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType04Async(Guid orderId, [FromBody] CreateCommandRequest req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.PositionName = req.registerPosition;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
// c-pm-01 ถึง c-pm-04
|
||||
|
||||
var placement = await _placementRepository.GetByIdAsync(req.examRound);
|
||||
order.Placement = placement!;
|
||||
order.ConclusionRegisterNo = req.conclusionRegisterNo;
|
||||
order.ConclusionRegisterDate = req.conclusionRegisterDate;
|
||||
order.ConclusionResultNo = req.conclusionResultNo;
|
||||
order.ConclusionResultDate = req.conclusionResultDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-05 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-05
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-05/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType05Async([FromBody] CreateCommandGroup2Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
ConclusionMeetingNo = req.conclusionMeetingNo,
|
||||
ConclusionMeetingDate = req.conclusionMeetingDate,
|
||||
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-05
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-05/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType05Async(Guid orderId, [FromBody] CreateCommandGroup2Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
order.ConclusionMeetingNo = req.conclusionMeetingNo;
|
||||
order.ConclusionMeetingDate = req.conclusionMeetingDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-06 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-06
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-06/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType06Async([FromBody] CreateCommandGroup2Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
ConclusionMeetingNo = req.conclusionMeetingNo,
|
||||
ConclusionMeetingDate = req.conclusionMeetingDate,
|
||||
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-06
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-06/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType06Async(Guid orderId, [FromBody] CreateCommandGroup2Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
order.ConclusionMeetingNo = req.conclusionMeetingNo;
|
||||
order.ConclusionMeetingDate = req.conclusionMeetingDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-07 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-07
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-07/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType07Async([FromBody] CreateCommandGroup3Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-07
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-07/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType07Async(Guid orderId, [FromBody] CreateCommandGroup3Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
|
|
@ -462,6 +1091,211 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-08 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-08
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-08/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType08Async([FromBody] CreateCommandGroup4Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
ConclusionReturnNo = req.conclusionReturnNo,
|
||||
ConclusionReturnDate = req.conclusionReturnDate,
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-08
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-08/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType08Async(Guid orderId, [FromBody] CreateCommandGroup4Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
|
||||
order.ConclusionReturnNo = req.conclusionReturnNo;
|
||||
order.ConclusionReturnDate = req.conclusionReturnDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " C-PM-09 "
|
||||
|
||||
/// <summary>
|
||||
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-09
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPost("c-pm-09/detail")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PostType09Async([FromBody] CreateCommandGroup5Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
|
||||
var inserted = new Domain.Models.Commands.Core.Command
|
||||
{
|
||||
CommandNo = req.orderNo,
|
||||
CommandYear = req.orderYear.ToString(),
|
||||
CommandSubject = req.orderTitle,
|
||||
CommandTypeId = req.orderTypeValue,
|
||||
IssuerOrganizationId = req.orderBy,
|
||||
IssuerOrganizationName = req.orderByOrganizationName,
|
||||
AuthorizedUserFullName = req.signatoryBy,
|
||||
AuthorizedPosition = req.signatoryPosition,
|
||||
|
||||
CommandAffectDate = req.orderDate,
|
||||
OwnerGovId = OcId,
|
||||
|
||||
ConclusionReturnNo = req.conclusionReturnNo,
|
||||
ConclusionReturnDate = req.conclusionReturnDate,
|
||||
SourceOrganizationName = req.sourceOrganizationName,
|
||||
MilitaryCommandNo = req.militaryCommandNo,
|
||||
MilitaryCommanDate = req.militaryCommandDate
|
||||
};
|
||||
|
||||
var result = await _repository.AddAsync(inserted);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-09
|
||||
/// </summary>
|
||||
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("c-pm-09/detail/{orderId}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> PutType09Async(Guid orderId, [FromBody] CreateCommandGroup5Request req)
|
||||
{
|
||||
try
|
||||
{
|
||||
var order = await _repository.GetByIdAsync(orderId);
|
||||
if (order == null)
|
||||
throw new Exception(GlobalMessages.CommandNotFound);
|
||||
|
||||
|
||||
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||
|
||||
order.CommandNo = req.orderNo;
|
||||
order.CommandYear = req.orderYear.ToString();
|
||||
order.CommandSubject = req.orderTitle;
|
||||
order.CommandType = commandType!;
|
||||
order.IssuerOrganizationId = req.orderBy;
|
||||
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||
order.AuthorizedUserFullName = req.signatoryBy;
|
||||
order.AuthorizedPosition = req.signatoryPosition;
|
||||
order.CommandStatus = status!;
|
||||
order.CommandAffectDate = req.orderDate;
|
||||
|
||||
|
||||
order.ConclusionReturnNo = req.conclusionReturnNo;
|
||||
order.ConclusionReturnDate = req.conclusionReturnDate;
|
||||
order.SourceOrganizationName = req.sourceOrganizationName;
|
||||
order.MilitaryCommandNo = req.militaryCommandNo;
|
||||
order.MilitaryCommanDate = req.militaryCommandDate;
|
||||
|
||||
var result = await _repository.UpdateAsync(order);
|
||||
|
||||
return Success(result);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// PM7-24 : dropdown รอบการสอบ หน้ารายละเอียดการออกคำสั่ง
|
||||
|
|
@ -483,11 +1317,11 @@ namespace BMA.EHR.Command.Service.Controllers
|
|||
|
||||
|
||||
var data = rawData.Select(x => new
|
||||
{
|
||||
examRoundValue = x.Id,
|
||||
examRoundName = $"{x.Name} ครั้งที่ {x.Round}/{x.Year.ToThaiYear()}"
|
||||
{
|
||||
examRoundValue = x.Id,
|
||||
examRoundName = $"{x.Name} ครั้งที่ {x.Round}/{x.Year.ToThaiYear()}"
|
||||
|
||||
})
|
||||
})
|
||||
.ToList();
|
||||
|
||||
return Success(data);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class CreateCommandGroup2Request
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; } = string.Empty;
|
||||
|
||||
public string orderNo { get; set; } = string.Empty;
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public DateTime orderDate { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryBy { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryPosition { get; set; } = string.Empty;
|
||||
|
||||
public string conclusionMeetingNo { get; set; } = string.Empty;
|
||||
|
||||
public DateTime conclusionMeetingDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class CreateCommandGroup3Request
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; } = string.Empty;
|
||||
|
||||
public string orderNo { get; set; } = string.Empty;
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public DateTime orderDate { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryBy { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryPosition { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class CreateCommandGroup4Request
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; } = string.Empty;
|
||||
|
||||
public string orderNo { get; set; } = string.Empty;
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public DateTime orderDate { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryBy { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryPosition { get; set; } = string.Empty;
|
||||
|
||||
public string conclusionReturnNo { get; set; } = string.Empty;
|
||||
|
||||
public DateTime conclusionReturnDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class CreateCommandGroup5Request
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; } = string.Empty;
|
||||
|
||||
public string orderNo { get; set; } = string.Empty;
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public DateTime orderDate { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryBy { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryPosition { get; set; } = string.Empty;
|
||||
|
||||
public string conclusionReturnNo { get; set; } = string.Empty;
|
||||
|
||||
public DateTime conclusionReturnDate { get; set; }
|
||||
|
||||
public string sourceOrganizationName { get; set; }
|
||||
|
||||
public string militaryCommandNo { get; set; }
|
||||
|
||||
public DateTime militaryCommandDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
namespace BMA.EHR.Command.Service.Requests
|
||||
{
|
||||
public class UpdateCommandGroup2Request
|
||||
{
|
||||
public Guid orderTypeValue { get; set; }
|
||||
|
||||
public string orderTitle { get; set; } = string.Empty;
|
||||
|
||||
public string orderNo { get; set; } = string.Empty;
|
||||
|
||||
public int orderYear { get; set; }
|
||||
|
||||
public DateTime orderDate { get; set; }
|
||||
|
||||
public Guid orderBy { get; set; }
|
||||
|
||||
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryBy { get; set; } = string.Empty;
|
||||
|
||||
public string signatoryPosition { get; set; } = string.Empty;
|
||||
|
||||
public string conclusionMeetingNo { get; set; } = string.Empty;
|
||||
|
||||
public DateTime conclusionMeetingDate { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -48,25 +48,58 @@ namespace BMA.EHR.Domain.Models.Commands.Core
|
|||
|
||||
#region " For Placement Command "
|
||||
|
||||
[Required, Comment("อ้างอิงรอบการสอบ")]
|
||||
public Guid PlacementId { get; set; }
|
||||
[Comment("อ้างอิงรอบการสอบ")]
|
||||
public Guid? PlacementId { get; set; }
|
||||
|
||||
public Placement.Placement Placement { get; set; }
|
||||
|
||||
[Required, Comment("ตำแหน่งที่บรรจุ")]
|
||||
public string PositionName { get; set; } = string.Empty;
|
||||
[Comment("ตำแหน่งที่บรรจุ")]
|
||||
public string? PositionName { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")]
|
||||
public string ConclusionRegisterNo { get; set; } = string.Empty;
|
||||
[Comment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")]
|
||||
public string? ConclusionRegisterNo { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)")]
|
||||
public DateTime ConclusionRegisterDate { get; set; } = DateTime.Now;
|
||||
[Comment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)")]
|
||||
public DateTime? ConclusionRegisterDate { get; set; } = DateTime.Now;
|
||||
|
||||
[Required, Comment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")]
|
||||
public string ConclusionResultNo { get; set; } = string.Empty;
|
||||
[Comment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")]
|
||||
public string? ConclusionResultNo { get; set; } = string.Empty;
|
||||
|
||||
[Required, Comment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")]
|
||||
public DateTime ConclusionResultDate { get; set; } = DateTime.Now;
|
||||
[Comment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)")]
|
||||
public DateTime? ConclusionResultDate { get; set; } = DateTime.Now;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " คำสั่ง C-PM-05, C-PM-06 "
|
||||
|
||||
[Comment("การประชุม ครั้งที่")]
|
||||
public string? ConclusionMeetingNo { get; set; } = string.Empty;
|
||||
|
||||
[Comment("การประชุม ลงวันที่")]
|
||||
public DateTime? ConclusionMeetingDate { get; set; } = DateTime.Now;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " คำสั่ง C-PM-08, C-PM-09 "
|
||||
|
||||
[Comment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)")]
|
||||
public string? ConclusionReturnNo { get; set; } = string.Empty;
|
||||
|
||||
[Comment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)")]
|
||||
public DateTime? ConclusionReturnDate { get; set; } = DateTime.Now;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " คำสั่ง C-PM-09 "
|
||||
|
||||
[Comment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร")]
|
||||
public string? SourceOrganizationName { get; set; }
|
||||
|
||||
[Comment("คำสั่งที่ (ให้เข้ารับราชการทหาร)")]
|
||||
public string? MilitaryCommandNo { get; set; }
|
||||
|
||||
[Comment("ลงวันที่ (ให้เข้ารับราชการทหาร)")]
|
||||
public DateTime? MilitaryCommanDate { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
15623
BMA.EHR.Infrastructure/Migrations/20230825033101_Add field For CommandType 05-09.Designer.cs
generated
Normal file
15623
BMA.EHR.Infrastructure/Migrations/20230825033101_Add field For CommandType 05-09.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,313 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddfieldForCommandType0509 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Commands_Placements_PlacementId",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "TimeThink",
|
||||
table: "RetirementQuestions",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PositionName",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ตำแหน่งที่บรรจุ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "ตำแหน่งที่บรรจุ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PlacementId",
|
||||
table: "Commands",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
comment: "อ้างอิงรอบการสอบ",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldComment: "อ้างอิงรอบการสอบ")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ConclusionResultNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ConclusionResultDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ConclusionRegisterNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ConclusionRegisterDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldComment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "ConclusionMeetingDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "การประชุม ลงวันที่");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ConclusionMeetingNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "การประชุม ครั้งที่")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "ConclusionReturnDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ลงวันที่ (เรื่อง กลับเข้ารับราชการ)");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ConclusionReturnNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "MilitaryCommanDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: true,
|
||||
comment: "ลงวันที่ (ให้เข้ารับราชการทหาร)");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "MilitaryCommandNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "คำสั่งที่ (ให้เข้ารับราชการทหาร)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "SourceOrganizationName",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "หน่วยงานต้นสังกัด ก่อนรับราชการทหาร")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Commands_Placements_PlacementId",
|
||||
table: "Commands",
|
||||
column: "PlacementId",
|
||||
principalTable: "Placements",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Commands_Placements_PlacementId",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ConclusionMeetingDate",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ConclusionMeetingNo",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ConclusionReturnDate",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ConclusionReturnNo",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MilitaryCommanDate",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MilitaryCommandNo",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SourceOrganizationName",
|
||||
table: "Commands");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "TimeThink",
|
||||
table: "RetirementQuestions",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด",
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true,
|
||||
oldComment: "สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Commands",
|
||||
keyColumn: "PositionName",
|
||||
keyValue: null,
|
||||
column: "PositionName",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "PositionName",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ตำแหน่งที่บรรจุ",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "ตำแหน่งที่บรรจุ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "PlacementId",
|
||||
table: "Commands",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
comment: "อ้างอิงรอบการสอบ",
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true,
|
||||
oldComment: "อ้างอิงรอบการสอบ")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Commands",
|
||||
keyColumn: "ConclusionResultNo",
|
||||
keyValue: null,
|
||||
column: "ConclusionResultNo",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ConclusionResultNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ConclusionResultDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
comment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldNullable: true,
|
||||
oldComment: "ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "Commands",
|
||||
keyColumn: "ConclusionRegisterNo",
|
||||
keyValue: null,
|
||||
column: "ConclusionRegisterNo",
|
||||
value: "");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "ConclusionRegisterNo",
|
||||
table: "Commands",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "ConclusionRegisterDate",
|
||||
table: "Commands",
|
||||
type: "datetime(6)",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
|
||||
comment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "datetime(6)",
|
||||
oldNullable: true,
|
||||
oldComment: "ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Commands_Placements_PlacementId",
|
||||
table: "Commands",
|
||||
column: "PlacementId",
|
||||
principalTable: "Placements",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -76,24 +76,38 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(4)")
|
||||
.HasComment("ปีที่ออกคำสั่ง");
|
||||
|
||||
b.Property<DateTime>("ConclusionRegisterDate")
|
||||
b.Property<DateTime?>("ConclusionMeetingDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("การประชุม ลงวันที่");
|
||||
|
||||
b.Property<string>("ConclusionMeetingNo")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("การประชุม ครั้งที่");
|
||||
|
||||
b.Property<DateTime?>("ConclusionRegisterDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
b.Property<string>("ConclusionRegisterNo")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("มติ กก. ครั้งที่ (เรื่อง รับสมัครสอบฯ)");
|
||||
|
||||
b.Property<DateTime>("ConclusionResultDate")
|
||||
b.Property<DateTime?>("ConclusionResultDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
b.Property<string>("ConclusionResultNo")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("มติ กก. ครั้งที่ (เรื่อง ผลการสอบแข่งขัน)");
|
||||
|
||||
b.Property<DateTime?>("ConclusionReturnDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (เรื่อง กลับเข้ารับราชการ)");
|
||||
|
||||
b.Property<string>("ConclusionReturnNo")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("มติ กก. ครั้งที่ (เรื่อง กลับเข้ารับราชการ)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasColumnOrder(100)
|
||||
|
|
@ -141,19 +155,30 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(102)
|
||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<DateTime?>("MilitaryCommanDate")
|
||||
.HasColumnType("datetime(6)")
|
||||
.HasComment("ลงวันที่ (ให้เข้ารับราชการทหาร)");
|
||||
|
||||
b.Property<string>("MilitaryCommandNo")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("คำสั่งที่ (ให้เข้ารับราชการทหาร)");
|
||||
|
||||
b.Property<Guid>("OwnerGovId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("รหัสส่วนราชการผู้ออกคำสั่ง");
|
||||
|
||||
b.Property<Guid>("PlacementId")
|
||||
b.Property<Guid?>("PlacementId")
|
||||
.HasColumnType("char(36)")
|
||||
.HasComment("อ้างอิงรอบการสอบ");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่งที่บรรจุ");
|
||||
|
||||
b.Property<string>("SourceOrganizationName")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("หน่วยงานต้นสังกัด ก่อนรับราชการทหาร");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CommandStatusId");
|
||||
|
|
@ -13275,8 +13300,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("ความคิดเห็นและข้อเสนอแนะอื่น ๆ ");
|
||||
|
||||
b.Property<string>("TimeThink")
|
||||
.HasColumnType("longtext")
|
||||
b.Property<int?>("TimeThink")
|
||||
.HasColumnType("int")
|
||||
.HasComment("สำหรับการลาออกในครั้งนี้ ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
|
@ -13473,9 +13498,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Placement.Placement", "Placement")
|
||||
.WithMany()
|
||||
.HasForeignKey("PlacementId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("PlacementId");
|
||||
|
||||
b.Navigation("CommandStatus");
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue