diff --git a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs index 2639e28f4..07a60cff0 100644 --- a/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/FrontAuditConfigService.cs @@ -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 jsonList = new List(); + + 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 guids = new List(); diff --git a/IRaCIS.Core.Domain.Share/Management/SystemNotice.cs b/IRaCIS.Core.Domain.Share/Management/SystemNotice.cs index 85a0b0cee..1e8672066 100644 --- a/IRaCIS.Core.Domain.Share/Management/SystemNotice.cs +++ b/IRaCIS.Core.Domain.Share/Management/SystemNotice.cs @@ -66,10 +66,17 @@ namespace IRaCIS.Core.Domain.Share.Management ChildGroup = 2, /// - ///id + ///Code /// [DisplayAttribute(Name = "Code")] Code =3, + + + /// + ///DictionaryCode + /// + [DisplayAttribute(Name = "DictionaryType")] + DictionaryType = 4, }