ส่งวินัยไปออกคำสั่ง
This commit is contained in:
parent
e8a288b4b2
commit
f644654384
21 changed files with 24913 additions and 84 deletions
|
|
@ -448,7 +448,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
Salary = item.salary,
|
||||
PersonId = item.personId,
|
||||
PosNo = item.posNo,
|
||||
IsReport = isReport == null ? false : isReport.IsReport,
|
||||
IsReport = isReport == null ? "NEW" : isReport.IsReport,
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -572,7 +572,8 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
PositionLevel = item.PositionLevel,
|
||||
Status = "NEW",
|
||||
StatusDiscard = "NEW",
|
||||
IsReport = false,
|
||||
IsReport = "NEW",
|
||||
IsSuspend = "NEW",
|
||||
CreatedFullName = FullName ?? "System Administrator",
|
||||
CreatedUserId = UserId ?? "",
|
||||
CreatedAt = DateTime.Now,
|
||||
|
|
@ -970,7 +971,7 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
continue;
|
||||
|
||||
// uppdated.CommandTypeId = commandTypeId;
|
||||
uppdated.IsReport = true;
|
||||
uppdated.IsReport = "REPORT";
|
||||
uppdated.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
uppdated.LastUpdateUserId = UserId ?? "";
|
||||
uppdated.LastUpdatedAt = DateTime.Now;
|
||||
|
|
@ -979,5 +980,33 @@ namespace BMA.EHR.DisciplineInvestigate.Service.Controllers
|
|||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ระบุหน้าที่กรรมการ
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <response code="200"></response>
|
||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpPut("director/{disciplineId:guid}/{id:guid}")]
|
||||
public async Task<ActionResult<ResponseObject>> AddDutyDisciplineInvestigate([FromBody] DisciplineDutyRequest req, Guid disciplineId, Guid id)
|
||||
{
|
||||
var data = await _context.DisciplineInvestigates
|
||||
.Include(x => x.DisciplineInvestigate_Directors)
|
||||
.Where(x => x.Id == disciplineId)
|
||||
.FirstOrDefaultAsync();
|
||||
if (data == null)
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
var director = data.DisciplineInvestigate_Directors.FirstOrDefault(x => x.Id == id);
|
||||
if (director == null)
|
||||
return Error(new Exception(GlobalMessages.DataNotFound), StatusCodes.Status404NotFound);
|
||||
director.Duty = req.duty;
|
||||
director.LastUpdateFullName = FullName ?? "System Administrator";
|
||||
director.LastUpdateUserId = UserId ?? "";
|
||||
director.LastUpdatedAt = DateTime.Now;
|
||||
await _context.SaveChangesAsync();
|
||||
return Success();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue