|
|
@@ -1,6 +1,8 @@
|
|
1
|
1
|
using CallCenter.Utility;
|
|
|
2
|
+using CallCenterApi.Common;
|
|
2
|
3
|
using CallCenterApi.DB;
|
|
3
|
4
|
using CallCenterApi.Interface.Controllers.Base;
|
|
|
5
|
+using CallCenterApi.Interface.Models.Dto;
|
|
4
|
6
|
using System;
|
|
5
|
7
|
using System.Collections.Generic;
|
|
6
|
8
|
using System.Data;
|
|
|
@@ -16,6 +18,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
|
|
16
|
18
|
BLL.T_RepositoryInformation infoBLL = new BLL.T_RepositoryInformation();
|
|
17
|
19
|
BLL.T_RepositoryCategory bllcategory = new BLL.T_RepositoryCategory();
|
|
18
|
20
|
BLL.T_RepositoryFavorites bllfavorites = new BLL.T_RepositoryFavorites();
|
|
|
21
|
+ BLL.T_Sys_DictionaryValue blldic = new BLL.T_Sys_DictionaryValue();
|
|
19
|
22
|
// 获取知识库列表
|
|
20
|
23
|
public ActionResult GetList(string keywords, string pid, int? issub, int? ispass)
|
|
21
|
24
|
{
|
|
|
@@ -272,7 +275,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
|
|
272
|
275
|
}
|
|
273
|
276
|
|
|
274
|
277
|
/// <summary>
|
|
275
|
|
- /// 获取审核列表 修改前修改后对比
|
|
|
278
|
+ /// 获取修改前修改后对比详情
|
|
276
|
279
|
/// </summary>
|
|
277
|
280
|
/// <param name="auditid">id</param>
|
|
278
|
281
|
/// <returns></returns>
|
|
|
@@ -593,5 +596,47 @@ namespace CallCenterApi.Interface.Controllers.knowledge
|
|
593
|
596
|
return logid;
|
|
594
|
597
|
}
|
|
595
|
598
|
|
|
|
599
|
+ #region 知识库关键词
|
|
|
600
|
+
|
|
|
601
|
+ /// <summary>
|
|
|
602
|
+ /// 获取知识库关键词列表
|
|
|
603
|
+ /// </summary>
|
|
|
604
|
+ /// <param name="keywords"></param>
|
|
|
605
|
+ /// <returns></returns>
|
|
|
606
|
+ public ActionResult GetKnowledgeKeyWordList(string keywords)
|
|
|
607
|
+ {
|
|
|
608
|
+ //获取数组
|
|
|
609
|
+ var lists = new List<KnowledgeKeyDto>();
|
|
|
610
|
+
|
|
|
611
|
+ var dtCache = CacheHelper.Get<List<KnowledgeKeyDto>>($"KnowledgeKeyWordList");
|
|
|
612
|
+ if (dtCache != null)
|
|
|
613
|
+ {
|
|
|
614
|
+ lists = dtCache;
|
|
|
615
|
+ }
|
|
|
616
|
+ else {
|
|
|
617
|
+ //知识库关键词(字典)
|
|
|
618
|
+ string sql = " F_PrentId = 59 AND F_PrentId != 0 ";
|
|
|
619
|
+ var list = blldic.DataTableToList(blldic.GetList($" {sql} ").Tables[0]);
|
|
|
620
|
+ foreach (var item in list)
|
|
|
621
|
+ {
|
|
|
622
|
+ lists.Add(new KnowledgeKeyDto
|
|
|
623
|
+ {
|
|
|
624
|
+ titleEN = ChineseToPinYin.Convert(item.F_Value).ToLower(),
|
|
|
625
|
+ titleCH = item.F_Value
|
|
|
626
|
+ });
|
|
|
627
|
+ }
|
|
|
628
|
+ //排序
|
|
|
629
|
+ lists = lists.OrderBy(x => x.titleEN).ToList();
|
|
|
630
|
+ CacheHelper.Insert($"KnowledgeKeyWordList", lists, 10);
|
|
|
631
|
+ }
|
|
|
632
|
+
|
|
|
633
|
+ if (!string.IsNullOrEmpty(keywords))
|
|
|
634
|
+ {
|
|
|
635
|
+ lists = lists.Where(x => x.titleCH.Contains(keywords) || x.titleEN.Contains(keywords)).ToList();
|
|
|
636
|
+ }
|
|
|
637
|
+ return Success("获取知识库关键词成功", lists);
|
|
|
638
|
+ }
|
|
|
639
|
+ #endregion
|
|
|
640
|
+
|
|
596
|
641
|
}
|
|
597
|
642
|
}
|