add isDeputy
This commit is contained in:
parent
a81b8d50fb
commit
ace8aba180
1 changed files with 3 additions and 3 deletions
|
|
@ -289,8 +289,8 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
[HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}")]
|
[HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}/{isDeputy}")]
|
||||||
public async Task<ActionResult<ResponseObject>> GetInsignaiRequestBkk(Guid insigniaPeriodId, Guid ocId, string role, string status)
|
public async Task<ActionResult<ResponseObject>> GetInsignaiRequestBkk(Guid insigniaPeriodId, Guid ocId, string role, string status, bool isDeputy)
|
||||||
{
|
{
|
||||||
var result = await _repository.GetInsigniaRequest(insigniaPeriodId, ocId);
|
var result = await _repository.GetInsigniaRequest(insigniaPeriodId, ocId);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
|
|
@ -315,7 +315,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
||||||
Items = new List<InsigniaRequestItem>()
|
Items = new List<InsigniaRequestItem>()
|
||||||
};
|
};
|
||||||
GetIsOfficerDto RoleInsignia = await _userProfileRepository.GetIsOfficerRootAsync(AccessToken, "SYS_INSIGNIA_MANAGE");
|
GetIsOfficerDto RoleInsignia = await _userProfileRepository.GetIsOfficerRootAsync(AccessToken, "SYS_INSIGNIA_MANAGE");
|
||||||
if (RoleInsignia.isOfficer == true && result.RequestStatus != "st6")
|
if (RoleInsignia.isOfficer == true && isDeputy == false && result.RequestStatus != "st6")
|
||||||
return Success(resend);
|
return Success(resend);
|
||||||
if (RoleInsignia.isDirector == true && (result.RequestStatus == "st1" || result.RequestStatus == "st2"))
|
if (RoleInsignia.isDirector == true && (result.RequestStatus == "st1" || result.RequestStatus == "st2"))
|
||||||
return Success(resend);
|
return Success(resend);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue