เพิ่มเรื่องร้องเรียนตอนออกคำสั่ง
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>
|
||||
|
|
|
|||
|
|
@ -1626,6 +1626,7 @@ namespace BMA.EHR.DisciplineDisciplinary.Service.Controllers
|
|||
OffenseDetails = data.OffenseDetails,
|
||||
DisciplinaryCaseFault = data.DisciplinaryCaseFault,
|
||||
DisciplinaryFaultLevel = data.DisciplinaryFaultLevel,
|
||||
DisciplineDisciplinary = data,
|
||||
Status = "PENDING",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
|
|
|
|||
|
|
@ -327,11 +327,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/up")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportUp()
|
||||
[HttpGet("report/up/{id:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportUp(Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => x.Status == "REPORT")
|
||||
.Where(x => x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id == id)
|
||||
.Select(x => new
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
|
@ -350,11 +351,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/down")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportDown()
|
||||
[HttpGet("report/down/{id:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportDown(Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => x.StatusDiscard == "REPORT")
|
||||
.Where(x => x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id == id)
|
||||
.Select(x => new
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
|
@ -373,11 +375,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/reject")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportReject()
|
||||
[HttpGet("report/reject/{id:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportReject(Guid id)
|
||||
{
|
||||
var data1 = await _context.DisciplineInvestigate_ProfileComplaints
|
||||
.Where(x => x.IsReport == "REPORT")
|
||||
.Where(x => x.DisciplineInvestigate.DisciplineComplaint.Id == id)
|
||||
.Select(x => new
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
|
@ -386,6 +389,7 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
.ToListAsync();
|
||||
var data2 = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.Where(x => x.IsReport == "REPORT")
|
||||
.Where(x => x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id == id)
|
||||
.Select(x => new
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
|
@ -408,11 +412,12 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("report/stop")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportStop()
|
||||
[HttpGet("report/stop/{id:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetPersonReportStop(Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineReport_Profiles
|
||||
.Where(x => x.Status == "REPORT")
|
||||
.Where(x => x.DisciplineDisciplinary.DisciplineInvestigate.DisciplineComplaint.Id == id)
|
||||
.Select(x => new
|
||||
{
|
||||
PersonId = x.PersonId,
|
||||
|
|
|
|||
|
|
@ -83,10 +83,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
DescriptionSuspend = x.DescriptionSuspend,
|
||||
StartDateSuspend = x.StartDateSuspend,
|
||||
EndDateSuspend = x.EndDateSuspend,
|
||||
Title = x.Title,
|
||||
OffenseDetails = x.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplinaryCaseFault,//กรณีความผิด
|
||||
Title = x.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
})
|
||||
.OrderByDescending(x => x.CitizenId)
|
||||
.Skip((page - 1) * pageSize)
|
||||
|
|
@ -124,10 +124,10 @@ namespace BMA.EHR.DisciplineSuspend.Service.Controllers
|
|||
DescriptionSuspend = x.DescriptionSuspend,
|
||||
StartDateSuspend = x.StartDateSuspend,
|
||||
EndDateSuspend = x.EndDateSuspend,
|
||||
Title = x.Title,
|
||||
OffenseDetails = x.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplinaryCaseFault,//กรณีความผิด
|
||||
Title = x.DisciplineDisciplinary.Title,
|
||||
OffenseDetails = x.DisciplineDisciplinary.OffenseDetails,//ลักษณะความผิด
|
||||
DisciplinaryFaultLevel = x.DisciplineDisciplinary.DisciplinaryFaultLevel,//ระดับโทษความผิด
|
||||
DisciplinaryCaseFault = x.DisciplineDisciplinary.DisciplinaryCaseFault,//กรณีความผิด
|
||||
})
|
||||
.Where(x => x.Id == id)
|
||||
.FirstOrDefaultAsync();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue