Sfoglia il codice sorgente

知识库编辑 显示

gaobingyue 5 anni fa
parent
commit
a4009fe224

+ 1 - 1
codegit/CallCenterApi/CallCenterApi.DAL/T_RepositoryInformation.cs

@@ -157,7 +157,7 @@ F_visibleDeptId,F_isorPerson ,F_visibleDeptName)");
157 157
             strSql.Append("F_DeleteFlag=@F_DeleteFlag,");
158 158
             //strSql.Append("F_RepositoryId=@F_RepositoryId,");
159 159
             strSql.Append("F_visibleDeptId=@F_visibleDeptId,");
160
-            strSql.Append("F_isorPerson=@F_isorPerson"); 
160
+            strSql.Append("F_isorPerson=@F_isorPerson,"); 
161 161
                 strSql.Append("F_visibleDeptName=@F_visibleDeptName");
162 162
             strSql.Append(" where F_RepositoryId=@F_RepositoryId");
163 163
             SqlParameter[] parameters = {

+ 9 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -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
             {