From 5b893431927f410ad9ce7a357af42ea1c9fcb009 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 8 Apr 2024 11:16:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs index 687ac403f..c51693fe3 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs @@ -61,7 +61,7 @@ namespace IRaCIS.Core.Infrastructure.Extention object propertyValue = property.GetValue(obj); // 如果属性的类型是枚举,将其值保留为整数 - if (property.PropertyType.IsEnum || Nullable.GetUnderlyingType(property.PropertyType)?.IsEnum == true) + if (property.PropertyType.IsEnum || (Nullable.GetUnderlyingType(property.PropertyType)?.IsEnum == true && propertyValue!=null) ) { dictionary.Add(propertyName, (int)propertyValue); } From 3a52021cdc518f354c239106da601928515a3633 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Mon, 8 Apr 2024 13:29:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=A1=A8?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/_MapConfig.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 9de1b4307..de2e57822 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -217,8 +217,7 @@ namespace IRaCIS.Core.Application.Service //t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer) // t.MapFrom(u => u.OrganInfo.IsCanEditPosition ? //u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault()!.Answer : isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT) - t.MapFrom(u => u.OrganInfo.IsCanEditPosition ? - u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault()!.Answer : "") + t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault()!.Answer) ) .ForMember(o => o.LongDiameter, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis).FirstOrDefault()!.Answer))