导表增加验证

IRC_NewDev
hang 2024-11-25 17:48:16 +08:00
parent d0828ddf0e
commit 46e1da667a
1 changed files with 2 additions and 2 deletions

View File

@ -322,7 +322,7 @@ public static class ExcelExportHelper
foreach (var key in dic.Keys)
{
//是数组 那么找到对应的属性 进行翻译
if (dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
if (dic[key] != null && dic[key].GetType().GetInterfaces().Any(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IList<>)))
//if (dic[key].GetType().IsAssignableFrom(typeof(JArray)))
{
@ -421,7 +421,7 @@ public static class ExcelExportHelper
}
//中文替换项目术语
if (data.TrialObjectNameList.Count > 0)
if (data.TrialObjectNameList?.Count > 0)
{
var replaceObjectList = data.TrialObjectNameList;