diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index ad38c1c09..71ae48ff3 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -112,17 +112,33 @@ namespace IRaCIS.Core.Infra.EFCore.Common return string.Empty; } + + + if (answerType == "upload") { return "❄❅❆❇❈❉❊" + answer; } - if (unit == ValueUnit.Custom) + var answerList = answer.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries).ToList(); + + List transList = new List(); + foreach (var item in answerList) { - return answer + string.Empty + customUnit; + if (unit == ValueUnit.Custom) + { + transList.Add(answer + string.Empty + customUnit); + } + else + { + transList.Add(answer + string.Empty + unitDataList.Where(y => y.Unit == unit).Select(x => x.UnitName).FirstIsNullReturnEmpty()); + } + + } - return answer + string.Empty + unitDataList.Where(y => y.Unit == unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(); + return string.Join(",", transList); + } public string GetEntityAuditOpt(EntityEntry entityEntry) {