gaobingyue лет назад: 5
Родитель
Сommit
a4009fe224

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

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

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

14
    
14
    
15
     public class KnowledgeController : BaseController
15
     public class KnowledgeController : BaseController
16
     { private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
16
     { private BLL.T_Sys_Department departmentBLL = new BLL.T_Sys_Department();
17
+       
17
         // 获取知识库列表
18
         // 获取知识库列表
18
         public ActionResult GetList()
19
         public ActionResult GetList()
19
         {
20
         {
27
                 string strpagesize = RequestString.GetQueryString("pagesize");
28
                 string strpagesize = RequestString.GetQueryString("pagesize");
28
                 int pagesize = 10;
29
                 int pagesize = 10;
29
             //知识库可见权限 //部门可见 0 或者 本部门
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
              sql += "   and F_DeleteFlag=0";
39
              sql += "   and F_DeleteFlag=0";
32
             if (pid.Trim() != "")
40
             if (pid.Trim() != "")
33
             {
41
             {