This commit is contained in:
parent
a81b8d50fb
commit
5a33e4690d
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="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("{insigniaPeriodId:length(36)}/{ocId:length(36)}/{role}/{status}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetInsignaiRequestBkk(Guid insigniaPeriodId, Guid ocId, string role, string 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, bool isDeputy)
|
||||
{
|
||||
var result = await _repository.GetInsigniaRequest(insigniaPeriodId, ocId);
|
||||
if (result != null)
|
||||
|
|
@ -315,7 +315,7 @@ namespace BMA.EHR.Insignia.Service.Controllers
|
|||
Items = new List<InsigniaRequestItem>()
|
||||
};
|
||||
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);
|
||||
if (RoleInsignia.isDirector == true && (result.RequestStatus == "st1" || result.RequestStatus == "st2"))
|
||||
return Success(resend);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue