|
|
@@ -14,6 +14,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
|
|
14
|
14
|
|
|
15
|
15
|
public class KnowledgeController : BaseController
|
|
16
|
16
|
{ private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
|
|
|
17
|
+
|
|
17
|
18
|
// 获取知识库列表
|
|
18
|
19
|
public ActionResult GetList()
|
|
19
|
20
|
{
|
|
|
@@ -27,7 +28,14 @@ namespace CallCenterApi.Interface.Controllers.knowledge
|
|
27
|
28
|
string strpagesize = RequestString.GetQueryString("pagesize");
|
|
28
|
29
|
int pagesize = 10;
|
|
29
|
30
|
//知识库可见权限 //部门可见 0 或者 本部门
|
|
30
|
|
- string sql = " and (isnull(F_visibleDeptId,0)=0 or F_visibleDeptId=" + CurrentUser.UserData.F_DeptId + ") ";
|
|
|
31
|
+ // 获取部门 以及部门父级id
|
|
|
32
|
+ var depModel = departmentBLL.GetModel(Convert.ToInt32(CurrentUser.UserData.F_DeptId));
|
|
|
33
|
+ int parntId = depModel.F_ParentId;
|
|
|
34
|
+
|
|
|
35
|
+
|
|
|
36
|
+
|
|
|
37
|
+ string sql = @" and (isnull(F_visibleDeptId,0)=0 or F_visibleDeptId=" + CurrentUser.UserData.F_DeptId + ""
|
|
|
38
|
+ +" or "+ parntId + "="+ CurrentUser.UserData.F_DeptId + " or "+ parntId + "=0 ) ";
|
|
31
|
39
|
sql += " and F_DeleteFlag=0";
|
|
32
|
40
|
if (pid.Trim() != "")
|
|
33
|
41
|
{
|