From 46e1da667a4e7018b6489d00143c324d6668eee9 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 25 Nov 2024 17:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E8=A1=A8=E5=A2=9E=E5=8A=A0=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Helper/FileDocProcess/ExcelExportHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs index 65aabea98..879db8897 100644 --- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs @@ -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;