diff --git a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs index c3dbebf9a..4372fc35f 100644 --- a/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/ExcelExportHelper.cs @@ -199,21 +199,25 @@ public static class ExcelExportHelper public class DynamicColumnConfig { + //标题动态修改的行 从0 开始算 public int AutoColumnStartIndex { get; set; } + //动态列开始的index 从0开始 public int AutoColumnRowIndex { get; set; } + //动态列后面还有几列数据 public int BackMoveCount { get; set; } + //动态的列名 public List ColumnNameList { get; set; } + //动态翻译的字典名 public List TranslateDicNameList { get; set; } //动态取数据的集合名 public string DynamicListName { get; set; } - //动态数据翻译的取字典的属性名 public string DynamicItemDicName { get; set; } //取值的属性名 @@ -420,7 +424,7 @@ public static class ExcelExportHelper var index = list.IndexOf(itemResult); //从第四行开始处理动态列 - var row = sheet.GetRow(index + 3); + var row = sheet.GetRow(index + dynamicColumnConfig.AutoColumnRowIndex + 1); var itemDic = itemResult.ConvertToDictionary(); diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 413809011..9d2723f14 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -12716,6 +12716,38 @@ 利用DocX 库 处理word国际化模板 + + + 翻译字典 + + + + + + + 转换字典的Dto + + + + + 字典仓储 + + + + + 字典Code + + + + + 枚举值 + + + + + 是否是英文 + + 构造函数注入 @@ -12762,6 +12794,19 @@ 加急的医学反馈任务 通知MIM + + + 加急的医学反馈任务 通知MIM + + + + + 加急的医学反馈任务 通知MIM + + + + + MIM 回复医学返回通知IR diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs index ed884bf8e..4dab467c4 100644 --- a/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs +++ b/IRaCIS.Core.Application/MassTransit/Consumer/ReadingRelationEmailConsumer.cs @@ -73,7 +73,7 @@ public class UrgentMedicalReviewAddedEventConsumer( var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr), userinfo.FullName, // 用户名 trialInfo.ExperimentName , // 项目 - criterion.CriterionName, // 阅片标准 + criterion.CriterionName // 阅片标准 // 受试者 // 访视 // 任务类型 diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index fa53af9f0..0c3353e86 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -1602,6 +1602,11 @@ namespace IRaCIS.Core.Application.Service.Common var list = new List(); var criterion = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == trialReadingCriterionId).Select(t => new { t.CriterionType, t.CriterionName }).FirstNotNullAsync(); + list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReading_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); + list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonReadingDetail_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); + list.Add(new ExportDocumentDes() { Code = StaticData.Export.CommonJudgeReadingDetail_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); + + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB) { list.Add(new ExportDocumentDes() { Code = StaticData.Export.OverallTumorEvaluation_Export, ExportCatogory = ExportCatogory.OverallTumorEvaluation }); @@ -2072,7 +2077,13 @@ namespace IRaCIS.Core.Application.Service.Common exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list.Where(t => t.ReadingCategory != ReadingCategory.Global).ToList(), _userInfo.TimeZoneId); exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId); - var dynamicColumnConfig = new DynamicColumnConfig() { AutoColumnRowIndex = 2, AutoColumnStartIndex = 6, ColumnNameList = list.FirstOrDefault()?.JudgeQuestionAnswerList.Select(t => t.QuestionName).ToList() }; + var dynamicColumnConfig = new DynamicColumnConfig() { AutoColumnRowIndex = 2, AutoColumnStartIndex = 6, BackMoveCount=3, + DynamicItemDicName= "QuestionName", + DynamicItemValueName= "QuestionValue", + DynamicListName= "JudgeQuestionAnswerList", + ColumnNameList = list.FirstOrDefault()?.JudgeQuestionAnswerList.Select(t => t.QuestionName).ToList(), + TranslateDicNameList= list.FirstOrDefault()?.JudgeQuestionAnswerList.Select(t => t.TranslateDicName).ToList() + }; var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.CommonReading_Export, exportInfo, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CommonEvaluationExport), criterion.CriterionType, dynamicColumnConfig); diff --git a/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs b/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs index 656b6ced8..9e82dfcbd 100644 --- a/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs +++ b/IRaCIS.Core.Infrastructure/_IRaCIS/ObjectExtension.cs @@ -57,15 +57,16 @@ namespace IRaCIS.Core.Infrastructure.Extention } Type type = obj.GetType(); - PropertyInfo[] properties = type.GetProperties(); + PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance); Dictionary dictionary = new Dictionary(); foreach (PropertyInfo property in properties) { string propertyName = property.Name; + Console.WriteLine(propertyName); object propertyValue = property.GetValue(obj); - + Console.WriteLine(propertyName); // 如果属性的类型是枚举,将其值保留为整数 if (property.PropertyType.IsEnum || (Nullable.GetUnderlyingType(property.PropertyType)?.IsEnum == true && propertyValue!=null) ) {