diff --git a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs index 8baf7789d..c79bf6a2e 100644 --- a/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs +++ b/IRaCIS.Core.Application/Helper/FileDocProcess/ExcelExportHelper.cs @@ -300,6 +300,17 @@ public static class ExcelExportHelper { public Guid Id { get; set; } public string Name { get; set; } + + public override bool Equals(object obj) + { + if (obj is not ColumItem other) return false; + return Id == other.Id && Name == other.Name; + } + + public override int GetHashCode() + { + return HashCode.Combine(Id, Name); + } } public List ColumnIdList => ColumnIdNameList == null ? new List() : ColumnIdNameList.Select(t => t.Id.ToString()).ToList(); diff --git a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs index ccbf5e4d1..51c7e4496 100644 --- a/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/ExcelExportService.cs @@ -2400,7 +2400,7 @@ namespace IRaCIS.Core.Application.Service.Common { Id = Guid.Empty, Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.Tumor) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName - }).ToList(); + }).Distinct().ToList(); @@ -2413,7 +2413,7 @@ namespace IRaCIS.Core.Application.Service.Common { Id = Guid.Empty, Name = (t.QuestionType == QuestionType.ExistDisease || t.QuestionType == QuestionType.ImgOncology) ? (_userInfo.IsEn_Us ? "Overall Response" : "整体肿瘤评估") : t.QuestionName - }).ToList(); + }).Distinct().ToList(); } else if (criterion.CriterionType == CriterionType.PCWG3) @@ -2422,7 +2422,7 @@ namespace IRaCIS.Core.Application.Service.Common { Id = Guid.Empty, Name = t.QuestionName - }).ToList(); + }).Distinct().ToList(); }