From 9a23c3131385de1e035854993029fa53235f6f52 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 24 Apr 2026 11:24:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E6=AC=A1=E5=88=A0=E9=99=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ImageAndDoc/StudyService.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs index 1169cd9d8..c30f36659 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/StudyService.cs @@ -7,6 +7,7 @@ using IRaCIS.Core.Infrastructure; using Medallion.Threading; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using NetTopologySuite.Algorithm; using SkiaSharp; using System.Drawing; using ZiggyCreatures.Caching.Fusion; @@ -177,7 +178,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc { await _oSSService.DeleteFromPrefix(item.Path, true); - var length = Guid.Empty.ToString().Length + "_MaskDicom".Length; + var length = Guid.Empty.ToString().Length + "_MaskDicom".Length + 1; var newPath = item.Path[..^length]; okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath }); @@ -185,6 +186,17 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false }); } + if (item.Path.EndsWith(".")) + { + await _oSSService.DeleteFromPrefix(item.Path, true); + + var newPath = item.Path[..^1]; + + okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath }); + + await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false }); + } + }