瀏覽代碼

知识库相关的

liyuanyuan 3 年之前
父節點
當前提交
7a0eeddb08

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

12
     [Authority]
12
     [Authority]
13
     public class KnowledgeClassController : BaseController
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
         public ActionResult GetAllList()
18
         public ActionResult GetAllList()
17
         {
19
         {
23
 
25
 
24
             return Success("加载成功", dt);
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
         public ActionResult GetList()
50
         public ActionResult GetList()
28
         {
51
         {
36
             else
59
             else
37
                 sql += " and F_ParentId=0";
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
             dt = new BLL.T_RepositoryCategory().GetList(" 1=1 " + sql).Tables[0];
70
             dt = new BLL.T_RepositoryCategory().GetList(" 1=1 " + sql).Tables[0];
40
             List<Model.TreeModel> modelList = BindTree(dt, "0");
71
             List<Model.TreeModel> modelList = BindTree(dt, "0");
41
 
72
 

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

13
     public class KnowledgeController : BaseController
13
     public class KnowledgeController : BaseController
14
     {
14
     {
15
         BLL.T_RepositoryInformation infoBLL = new BLL.T_RepositoryInformation();
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
         public ActionResult GetList(string title, string content,string keywords, string pid,int deptid=0)
19
         public ActionResult GetList(string title, string content,string keywords, string pid,int deptid=0)
18
         {
20
         {
76
             {
78
             {
77
                 pagesize = Convert.ToInt32(strpagesize);
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
             int recordCount = 0;
89
             int recordCount = 0;
80
             dt = BLL.PagerBLL.GetListPager(
90
             dt = BLL.PagerBLL.GetListPager(
81
                 "T_RepositoryInformation a",
91
                 "T_RepositoryInformation a",

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

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