This commit is contained in:
he
2022-12-07 17:37:26 +08:00
parent 47a8b82ec9
commit d758d27abd
2 changed files with 40 additions and 1 deletions
@@ -15,6 +15,7 @@ using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Management;
using System.Text.Json.Nodes;
namespace IRaCIS.Core.Application.Service
{
@@ -771,6 +772,37 @@ namespace IRaCIS.Core.Application.Service
}).Select(x => x.value).ToListAsync()
);
}
else if (item.Type.ToLower() == FrontAudit.DictionaryType.GetDescription().ToLower())
{
List<JObject> jsonList = new List<JObject>();
foreach (JToken arraysItem in arrays)
{
var jsonObject = JObject.Parse(arraysItem.ToString());
try
{
jsonObject[item.Code]= await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => x.Code == jsonObject[item.Code].ToString()), a => a.Id, b => b.ParentId, (a, b) => new
{
value = b.ValueCN
}).Select(x => x.value).FirstOrDefaultAsync();
jsonList.Add(jsonObject);
}
catch (Exception)
{
jsonList.Add(jsonObject);
}
}
jsonDataDic[item.Key] = JToken.FromObject(jsonList);
}
else
{
List<string> guids = new List<string>();