เพิ่มเรื่องร้องเรียนตอนออกคำสั่ง
This commit is contained in:
parent
4f32e253fd
commit
5ca85c6e7e
13 changed files with 4045 additions and 58 deletions
|
|
@ -87,6 +87,34 @@ namespace BMA.EHR.DisciplineComplaint.Service.Controllers
|
|||
return Success(new { data, total = data_search.Count() });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// list รายการวินัยเรื่องร้องเรียนในหน้าออกคำสั่ง
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report")]
|
||||
public async Task<ActionResult<ResponseObject>> GetDisciplineComplaintReport()
|
||||
{
|
||||
var data = await _context.DisciplineComplaints
|
||||
.Where(x => x.Status.Contains("SEND_INVESTIGATE"))
|
||||
.Select(x => new
|
||||
{
|
||||
Id = x.Id,//id ข้อมูลเรื่องร้องเรียน
|
||||
Title = x.Title,//ชื่อเรื่อง
|
||||
IsComplaint = true,
|
||||
IsInvestigate = x.DisciplineInvestigates.FirstOrDefault() == null ? false : true,
|
||||
IsDisciplinary = x.DisciplineInvestigates.FirstOrDefault() == null || x.DisciplineInvestigates.FirstOrDefault().DisciplineDisciplinarys.FirstOrDefault() == null ? false : true,
|
||||
IsResult = x.DisciplineInvestigates.FirstOrDefault() == null || x.DisciplineInvestigates.FirstOrDefault().DisciplineDisciplinarys.FirstOrDefault() == null || (x.DisciplineInvestigates.FirstOrDefault().DisciplineDisciplinarys.FirstOrDefault().Status != "DONE" && x.DisciplineInvestigates.FirstOrDefault().DisciplineDisciplinarys.FirstOrDefault().Status != "REPORT") ? false : true,
|
||||
DateConsideration = x.DateConsideration,//วันที่กำหนดพิจารณา
|
||||
})
|
||||
.OrderByDescending(x => x.DateConsideration)
|
||||
.ToListAsync();
|
||||
return Success(data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// get รายการวินัยเรื่องร้องเรียน
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue