From 8f6e2e342a10967f5f57888e1dc52be37465c4ad Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Sat, 8 Feb 2025 15:58:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=BF=E7=98=A4=E8=AF=84=E4=BC=B0=E6=A0=87?= =?UTF-8?q?=E5=87=86-Id=E5=8C=B9=E9=85=8D=E5=90=88=E5=B9=B6=E5=8E=BB?= =?UTF-8?q?=E9=87=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Helper/FileDocProcess/ExcelExportHelper.cs | 11 +++++++++++ .../Service/Common/ExcelExportService.cs | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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(); }