เพิ่ม user ใน บรรจุ
This commit is contained in:
parent
d5ffd5cb08
commit
824c8267ef
24 changed files with 45466 additions and 16 deletions
|
|
@ -292,14 +292,14 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
OrganizationName = result.OrganizationName,
|
||||
Items = new List<InsigniaRequestItem>()
|
||||
};
|
||||
var candidate = await _repository.GetInsigniaCandidateBKK(period, ocId);
|
||||
// var candidate = await _repository.GetInsigniaCandidateBKK(period, ocId);
|
||||
|
||||
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||
if (requestStatus == null)
|
||||
{
|
||||
// บันทึกรายชื่อ
|
||||
await _repository.InsertCandidate(period, ocId, candidate);
|
||||
}
|
||||
// // ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||
// if (requestStatus == null)
|
||||
// {
|
||||
// // บันทึกรายชื่อ
|
||||
// await _repository.InsertCandidate(period, ocId, candidate);
|
||||
// }
|
||||
if (role.Trim().ToUpper() == "OFFICER")
|
||||
{
|
||||
resend.Items = await _repository.InsigniaHasProfile(period, ocId, status);
|
||||
|
|
@ -440,6 +440,38 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// คำนวนราชชื่อผู้ได้รับเครื่องราช
|
||||
/// </summary>
|
||||
/// <param name="insigniaPeriodId">Id รอบเครื่องราช</param>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("{insigniaPeriodId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> UpdateInsignaiRequestBkk(Guid insigniaPeriodId)
|
||||
{
|
||||
var oc = await _context.Organizations.Where(x => x.Parent == null).FirstOrDefaultAsync();
|
||||
if (oc == null)
|
||||
return Error(GlobalMessages.Error);
|
||||
|
||||
var result = await _repository.GetInsigniaRequest(insigniaPeriodId, oc.Id);
|
||||
if (result != null)
|
||||
{
|
||||
Guid period = result.PeriodId;
|
||||
string requestStatus = result.RequestStatus;
|
||||
var candidate = await _repository.GetInsigniaCandidateBKK(insigniaPeriodId, oc.Id);
|
||||
// ตรวจสอบว่ารายการอยู่ใน table insignia_request_new
|
||||
if (requestStatus == null)
|
||||
{
|
||||
// บันทึกรายชื่อ
|
||||
await _repository.InsertCandidate(period, oc.Id, candidate);
|
||||
}
|
||||
}
|
||||
return Success();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// #region " บันทึกหมายเหตุ "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue