Explorar el Código

知识库相关的

liyuanyuan %!s(int64=3) %!d(string=hace) años
padre
commit
7a0eeddb08

+ 31 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeClassController.cs

@@ -12,6 +12,8 @@ namespace CallCenterApi.Interface.Controllers.knowledge
12 12
     [Authority]
13 13
     public class KnowledgeClassController : BaseController
14 14
     {
15
+        private BLL.T_Sys_UserAccount userbll = new BLL.T_Sys_UserAccount();
16
+        private BLL.T_Sys_RoleInfo rolebll = new BLL.T_Sys_RoleInfo();
15 17
         // 获取知识库分类列表
16 18
         public ActionResult GetAllList()
17 19
         {
@@ -23,6 +25,27 @@ namespace CallCenterApi.Interface.Controllers.knowledge
23 25
 
24 26
             return Success("加载成功", dt);
25 27
         }
28
+
29
+        // 二级网络单位知识库索要录添加知识库 获取知识库分类列表
30
+        public ActionResult GetAllListEJ()
31
+        {
32
+            DataTable dt = new DataTable();
33
+           
34
+           
35
+
36
+            dt = new BLL.T_RepositoryCategory().GetList("").Tables[0];
37
+
38
+            List<Model.TreeModel> modelList = BindTree(dt, "0");
39
+
40
+            if (modelList.Count > 0)
41
+            {
42
+                return Success("加载成功", modelList);
43
+            }
44
+            else
45
+                return Error("加载失败");
46
+        }
47
+
48
+
26 49
         // 获取知识库分类列表
27 50
         public ActionResult GetList()
28 51
         {
@@ -36,6 +59,14 @@ namespace CallCenterApi.Interface.Controllers.knowledge
36 59
             else
37 60
                 sql += " and F_ParentId=0";
38 61
 
62
+            Model.T_Sys_RoleInfo role = rolebll.GetModel("WLDW");
63
+            if (User.F_RoleId == role.F_RoleId)
64
+            {
65
+                sql = " and F_ParentId=0 and F_CategoryId in ( select F_CategoryId from T_RepositoryCategory where F_CategoryName ='知识信息分类')"; 
66
+             
67
+            }
68
+      
69
+
39 70
             dt = new BLL.T_RepositoryCategory().GetList(" 1=1 " + sql).Tables[0];
40 71
             List<Model.TreeModel> modelList = BindTree(dt, "0");
41 72
 

+ 10 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -13,6 +13,8 @@ namespace CallCenterApi.Interface.Controllers.knowledge
13 13
     public class KnowledgeController : BaseController
14 14
     {
15 15
         BLL.T_RepositoryInformation infoBLL = new BLL.T_RepositoryInformation();
16
+        private BLL.T_Sys_RoleInfo rolebll = new BLL.T_Sys_RoleInfo();
17
+
16 18
         // 获取知识库列表
17 19
         public ActionResult GetList(string title, string content,string keywords, string pid,int deptid=0)
18 20
         {
@@ -76,6 +78,14 @@ namespace CallCenterApi.Interface.Controllers.knowledge
76 78
             {
77 79
                 pagesize = Convert.ToInt32(strpagesize);
78 80
             }
81
+
82
+            Model.T_Sys_RoleInfo role = rolebll.GetModel("WLDW");
83
+            if ( pid==null&& User.F_RoleId == role.F_RoleId)
84
+            {
85
+                sql += " and F_CategoryId in ( select F_CategoryId from T_RepositoryCategory where F_CategoryName ='知识信息分类')";
86
+            }
87
+
88
+
79 89
             int recordCount = 0;
80 90
             dt = BLL.PagerBLL.GetListPager(
81 91
                 "T_RepositoryInformation a",

+ 3 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/RepositoryController.cs

@@ -619,6 +619,9 @@ namespace CallCenterApi.Interface.Controllers.knowledge
619 619
                 return Error("获取记录失败");
620 620
         }
621 621
 
622
+
623
+      
624
+
622 625
         //添加知识库索要记录
623 626
         public ActionResult AddDemands(int deptid,string des,DateTime limittime,string file,int demandsid=0, int level=0)
624 627
         {