test dumb
This commit is contained in:
parent
8e967a1fa8
commit
27fd503d9e
8 changed files with 342 additions and 77 deletions
|
|
@ -559,5 +559,47 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// รายชื่อออกคำสั่ง
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/find/{periodId:guid}/{personId:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportFind(Guid periodId, Guid personId)
|
||||
{
|
||||
var data1 = await _context.DisciplineComplaint_Profiles
|
||||
.Where(x => x.Id == periodId)
|
||||
.Where(x => x.PersonId == personId.ToString())
|
||||
.FirstOrDefaultAsync();
|
||||
if (data1 == null)
|
||||
{
|
||||
var data2 = await _context.DisciplineInvestigate_ProfileComplaints
|
||||
.Where(x => x.Id == periodId)
|
||||
.Where(x => x.PersonId == personId.ToString())
|
||||
.FirstOrDefaultAsync();
|
||||
if (data2 == null)
|
||||
{
|
||||
var data3 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => x.Id == periodId)
|
||||
.Where(x => x.PersonId == personId.ToString())
|
||||
.FirstOrDefaultAsync();
|
||||
if (data3 == null)
|
||||
{
|
||||
var data4 = await _context.DisciplineReport_Profiles
|
||||
.Where(x => x.Id == periodId)
|
||||
.Where(x => x.PersonId == personId.ToString())
|
||||
.FirstOrDefaultAsync();
|
||||
return Success(data4);
|
||||
}
|
||||
return Success(data3);
|
||||
}
|
||||
return Success(data2);
|
||||
}
|
||||
return Success(data1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue