แก้ ออก คำ สั่ง
This commit is contained in:
parent
e862829246
commit
604b234c4b
15 changed files with 897 additions and 845 deletions
|
|
@ -708,30 +708,26 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <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)
|
||||
[HttpGet("report/find/{periodId:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportFind(Guid periodId)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue