|
@@ -35,6 +35,7 @@ using WingInterfaceLibrary.Request.DBCopy;
|
|
|
using System;
|
|
|
using WingInterfaceLibrary.Result.QualityControl;
|
|
|
using WingInterfaceLibrary.Request.QualityControl;
|
|
|
+using Newtonsoft.Json.Linq;
|
|
|
|
|
|
namespace WingLiveConsultationService
|
|
|
{
|
|
@@ -2258,7 +2259,37 @@ namespace WingLiveConsultationService
|
|
|
/// <returns></returns>
|
|
|
public async Task<GetConsultationQualityTypeResult> GetConsultationReportQualityTypeAsync(GetConsultationReportQualityTypeRequest request)
|
|
|
{
|
|
|
- return null;
|
|
|
+
|
|
|
+ var getConsultationQualityTypeResult = new GetConsultationQualityTypeResult();
|
|
|
+ getConsultationQualityTypeResult.QualityTypeList = new List<QualityTypeDetail>();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var jsonContent = WingServerCommon.ResourceManage.ResourceManager.GetSetting(request.Language + "consultation");
|
|
|
+ if (string.IsNullOrWhiteSpace(jsonContent))
|
|
|
+ {
|
|
|
+ jsonContent = WingServerCommon.ResourceManage.ResourceManager.GetSetting("en-US" + "consultation");
|
|
|
+ }
|
|
|
+ JObject json = JObject.Parse(jsonContent);
|
|
|
+ foreach (QualityType qualityType in Enum.GetValues(typeof(QualityType)))
|
|
|
+ {
|
|
|
+ string name = Enum.GetName(typeof(QualityType), qualityType);
|
|
|
+ int key = (int)qualityType;
|
|
|
+ if (key == 0)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ QualityTypeDetail detail = new QualityTypeDetail();
|
|
|
+
|
|
|
+ detail.Key = key;
|
|
|
+ detail.Description = json["Language"][name]?.ToString();
|
|
|
+ getConsultationQualityTypeResult.QualityTypeList.Add(detail);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ Logger.WriteLineError($"GetConsultationReportQualityTypeAsync,error{ex.ToString()}");
|
|
|
+ }
|
|
|
+ return getConsultationQualityTypeResult;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|