Sfoglia il codice sorgente

编辑知识库列表信息

gaobingyue 5 anni fa
parent
commit
60b8dc0683

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

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