diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index b11a2a1da..625646d3f 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -2049,44 +2049,54 @@ namespace IRaCIS.Core.Application.Service.Common var dynamicLessionTitleList = lessionAnserList.Select(t => new DymamicQuestionInfo { QuestionMark = t.QuestionMark, QuestionName = t.QuestionName, TranslateDicName = t.TranslateDicName }).Distinct(); var dynamicTitleList = dynamicExtraAddTitleList.Union(dynamicLessionTitleList).ToList(); - //最终的病灶列表 + //最终的病灶列表 要把裁判的也要加进去 list = new List(); foreach (var item in taskList) { - - foreach (var lession in item.LesionList) + if (item.LesionList.Count > 0) { - var firstLessionAnser = lession.LessionAnswerList.FirstOrDefault() ?? new CommonLessionQuestionAnswerInfo(); - - var addLessionInfoList = new List(); - - if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB - || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + foreach (var lession in item.LesionList) { - //病灶编号 和病灶类型没有配置,但是需要有的 - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号", QuestionValue = firstLessionAnser.LessionCode }); - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); + var firstLessionAnser = lession.LessionAnswerList.FirstOrDefault() ?? new CommonLessionQuestionAnswerInfo(); + var addLessionInfoList = new List(); + + if (criterion.CriterionType == CriterionType.RECIST1Point1 || criterion.CriterionType == CriterionType.RECIST1Pointt1_MB + || criterion.CriterionType == CriterionType.IRECIST1Point1 || criterion.CriterionType == CriterionType.Lugano2014 || criterion.CriterionType == CriterionType.Lugano2014WithoutPET) + { + //病灶编号 和病灶类型没有配置,但是需要有的 + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion ID" : "病灶编号", QuestionValue = firstLessionAnser.LessionCode }); + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); + + } + else if (criterion.CriterionType == CriterionType.PCWG3) + { + addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); + } + + + var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName }); + + + //有三部分组成 外层问题+ 没有配置的编号和类型+ 动态的表格问题 + var dynamicLessionInfoList = addLessionInfoList.Union(dynamicPartialLessionInfoList).Union(item.QuestionAnswerList).ToList(); + + var cloneItem = item.Clone(); + cloneItem.QuestionAnswerList = dynamicLessionInfoList; + + list.Add(cloneItem); } - else if (criterion.CriterionType == CriterionType.PCWG3) - { - addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = firstLessionAnser.LessionType, TranslateDicName = "LesionType" }); - } - - - var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName }); - - - //有三部分组成 外层问题+ 没有配置的编号和类型+ 动态的表格问题 - var dynamicLessionInfoList = addLessionInfoList.Union(dynamicPartialLessionInfoList).Union(item.QuestionAnswerList).ToList(); - - var cloneItem = item.Clone(); - cloneItem.QuestionAnswerList = dynamicLessionInfoList; - - list.Add(cloneItem); } + else + { + //要把裁判任务加进去 + + list.Add(item); + } + + }