fix complain_Channel
This commit is contained in:
parent
c34399b855
commit
048a17224b
1 changed files with 33 additions and 3 deletions
|
|
@ -13,6 +13,7 @@ using Swashbuckle.AspNetCore.Annotations;
|
|||
using System.Security.Claims;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.IO;
|
||||
|
||||
namespace BMA.EHR.DisciplineComplaint_Channel.Service.Controllers
|
||||
{
|
||||
|
|
@ -57,10 +58,39 @@ namespace BMA.EHR.DisciplineComplaint_Channel.Service.Controllers
|
|||
/// <response code="400">ค่าตัวแปรที่ส่งมาไม่ถูกต้อง</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet()]
|
||||
public async Task<ActionResult<ResponseObject>> GetDiscipline(int page = 1, int pageSize = 25, string keyword = "")
|
||||
[HttpGet("{path}")]
|
||||
public async Task<ActionResult<ResponseObject>> GetDiscipline(string path, int page = 1, int pageSize = 25, string keyword = "")
|
||||
{
|
||||
var getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INFO");
|
||||
path = path.Trim().ToUpper();
|
||||
string getPermission;
|
||||
if (path == "MAIN")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INFO");
|
||||
}
|
||||
else if (path == "COMPLAIN")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_COMPLAIN");
|
||||
}
|
||||
else if (path == "CREATE-COMPLAIN")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("CREATE", "SYS_DISCIPLINE_COMPLAIN");
|
||||
}
|
||||
else if (path == "INVES")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INVESTIGATE");
|
||||
}
|
||||
else if (path == "DISCIP")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_INTERROGATE");
|
||||
}
|
||||
else if (path == "RESULT")
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("GET", "SYS_DISCIPLINE_RESULT");
|
||||
}
|
||||
else
|
||||
{
|
||||
getPermission = await _permission.GetPermissionAPIAsync("LIST", "SYS_DISCIPLINE_INFO");
|
||||
}
|
||||
var jsonData = JsonConvert.DeserializeObject<JObject>(getPermission);
|
||||
if (jsonData["status"]?.ToString() != "200")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue