|
@@ -704,12 +704,24 @@ namespace Hotline.Api.Controllers
|
|
|
new KeyValuePair<string, string>("KnowledgeOffshelf", "下架审核"),
|
|
|
};
|
|
|
|
|
|
- return _baseDataApplication
|
|
|
- .FileType(EFileType.excel | EFileType.pdf)
|
|
|
- .Add("tabNames", tabNames)
|
|
|
- .Add("tabNewDraftsNames", tabNewDraftsNames)
|
|
|
- .Add("tabAuditingNames", tabAuditingNames)
|
|
|
- .Build();
|
|
|
+ //return _baseDataApplication
|
|
|
+ // .FileType(EFileType.excel | EFileType.pdf)
|
|
|
+ // .Build();
|
|
|
+ var ignoreFileType = EFileType.excel | EFileType.pdf;
|
|
|
+ var items = EnumExts.GetDescriptions<EFileType>();
|
|
|
+ var filteredDictionary = items
|
|
|
+ .Where(kvp => (ignoreFileType & (EFileType)kvp.Key) == 0)
|
|
|
+ .ToDictionary(kvp => kvp.Key, kvp => kvp.Value)
|
|
|
+ .ToList();
|
|
|
+
|
|
|
+ return new Dictionary<string, dynamic>
|
|
|
+ {
|
|
|
+ { "fileType", filteredDictionary},
|
|
|
+ { "fileType", tabNames },
|
|
|
+ { "tabNames", tabNames },
|
|
|
+ { "tabNewDraftsNames", tabNewDraftsNames },
|
|
|
+ { "tabAuditingNames", tabAuditingNames }
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -765,9 +777,14 @@ namespace Hotline.Api.Controllers
|
|
|
[HttpGet("knowretrieval/base_data")]
|
|
|
public Dictionary<string, dynamic> GetKnowretrievalBaseData()
|
|
|
{
|
|
|
- return _baseDataApplication
|
|
|
- .KnowledgeRetrievalType(new[] { 3, 4 })
|
|
|
- .Build();
|
|
|
+ //return _baseDataApplication
|
|
|
+ // .KnowledgeRetrievalType(new[] { 3, 4 })
|
|
|
+ // .Build();
|
|
|
+ var ignoreFileType = new[] { 3, 4 };
|
|
|
+ return new Dictionary<string, dynamic>
|
|
|
+ {
|
|
|
+ { "knowledgeRetrievalType", EnumExts.GetDescriptions<EKnowledgeRetrievalType>().Where(m => !ignoreFileType.Contains(m.Key)).ToList() }
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1601,9 +1618,13 @@ namespace Hotline.Api.Controllers
|
|
|
[HttpGet("hotword/basedata")]
|
|
|
public Dictionary<string, dynamic> AddKnowledgeHotWordBaseDataAsync()
|
|
|
{
|
|
|
- return _baseDataApplication
|
|
|
- .KnowledgeHotWordType()
|
|
|
- .Build();
|
|
|
+ //return _baseDataApplication
|
|
|
+ // .KnowledgeHotWordType()
|
|
|
+ // .Build();
|
|
|
+ return new Dictionary<string, dynamic>
|
|
|
+ {
|
|
|
+ { "knowledgeHotWordType", EnumExts.GetDescriptions<EKnowledgeHotWordType>() }
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
/// <summary>
|