เตรียมไปออกคำสั่ง วินัย
This commit is contained in:
parent
3d8d65f21f
commit
536a94d907
12 changed files with 11865 additions and 2 deletions
|
|
@ -57,8 +57,8 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
{
|
||||
var data_search = (from x in _context.DisciplineDisciplinarys
|
||||
where x.Title.Contains(keyword) ||
|
||||
x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
x.DisciplinaryCaseFault.Contains(keyword) ||
|
||||
x.DisciplinaryFaultLevel == null ? false : x.DisciplinaryFaultLevel.Contains(keyword) ||
|
||||
x.DisciplinaryCaseFault == null ? false : x.DisciplinaryCaseFault.Contains(keyword) ||
|
||||
x.Status == "DONE"
|
||||
select x).ToList();
|
||||
var data = data_search
|
||||
|
|
@ -146,5 +146,34 @@ namespace BMA.EHR.DisciplineResult.Service.Controllers
|
|||
await _context.SaveChangesAsync();
|
||||
return Success(data.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// สั่งรายชื่อไปออกคำสั่งให้ออกจากราชการไว้ก่อน
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("report/{commandTypeId:length(36)}")]
|
||||
public async Task<ActionResult<ResponseObject>> PostToReport([FromBody] DisciplineProfileRequest req, Guid commandTypeId)
|
||||
{
|
||||
foreach (var item in req.Id)
|
||||
{
|
||||
var uppdated = await _context.DisciplineDisciplinary_ProfileComplaintInvestigates
|
||||
.FirstOrDefaultAsync(x => x.Id == item);
|
||||
if (uppdated == null)
|
||||
continue;
|
||||
|
||||
uppdated.CommandTypeId = commandTypeId;
|
||||
uppdated.Status = "REPORT";
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue