瀏覽代碼

编辑知识库列表信息

gaobingyue 5 年之前
父節點
當前提交
60b8dc0683

+ 5 - 5
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -25,7 +25,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
25 25
                 int pageindex = 1;
26 26
                 string strpagesize = RequestString.GetQueryString("pagesize");
27 27
                 int pagesize = 10;
28
-            //知识库可见权限
28
+            //知识库可见权限 //部门可见 0 或者 本部门
29 29
             string sql = " and (isnull(F_visibleDeptId,0)=0 or F_visibleDeptId=" + CurrentUser.UserData.F_DeptId + ") ";
30 30
              sql += "   and F_DeleteFlag=0";
31 31
             if (pid.Trim() != "")
@@ -34,9 +34,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
34 34
                 dr = new BLL.T_RepositoryCategory().GetList(" 1=1 " + "and F_CategoryId=" + pid).Tables[0];
35 35
                 string modelList = BindTree(dr, pid);
36 36
                 sql += " and F_CategoryId in(" + modelList.Trim() + ")";
37
-                //部门可见 0 或者 本部门
38
-                sql += " and( isnull(F_visibleDeptId,0)=0 or F_visibleDeptId=" + CurrentUser.UserData.F_DeptId+") ";
39
-
37
+               
40 38
                 //根据 F_CategoryId 获取知识分类信息 如果是 -常用接待用语   则部门区分(获取属于当前登录部门的信息)
41 39
                 // CurrentUser.UserData.F_DeptId;当前登录人部门
42 40
                 //(select  u.F_DeptId  from  dbo.T_Sys_UserAccount  u where u.F_UserId = F_CreateBy )
@@ -160,7 +158,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
160 158
 
161 159
         //[Authority]
162 160
         //添加知识库
163
-        public ActionResult AddInfo(string title, string key, string con, string pid)
161
+        public ActionResult AddInfo(string title, string key, string con, string pid,int visibleDeptId)
164 162
         {
165 163
 
166 164
             if (!Request.IsAuthenticated)
@@ -188,6 +186,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
188 186
             dModel.F_ModifyOn = DateTime.Now;
189 187
             dModel.F_CreateBy = CurrentUser.UserData.F_UserId;
190 188
             dModel.F_DeleteFlag = 0;
189
+            dModel.F_visibleDeptId = visibleDeptId;
191 190
             int b = new BLL.T_RepositoryInformation().Add(dModel, CurrentUser.UserData.F_UserId);
192 191
             if (b > 0)
193 192
             {
@@ -233,6 +232,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
233 232
             dModel.F_ModifyBy = CurrentUser.UserData.F_UserId;
234 233
             dModel.F_ModifyOn = DateTime.Now;
235 234
             dModel.F_visibleDeptId = visibleDeptId;
235
+          
236 236
             bool b = dBLL.Update(dModel, CurrentUser.UserData.F_UserId);
237 237
             if (b)
238 238
             {