Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing Details

Test_IRC_Net10
he 2026-04-24 11:14:12 +08:00
commit 27bdc95f6e
4 changed files with 75 additions and 20 deletions

View File

@ -17269,17 +17269,17 @@
</member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Question">
<summary>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
质疑
</summary>
</member>
<member name="F:IRaCIS.Core.Application.ViewModel.AccessToDialogueEnum.Consistency">
<summary>
һ<EFBFBD><EFBFBD><EFBFBD>Ժ˲<EFBFBD>
一致性核查
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.CopyFrontAuditConfigItemDto">
<summary>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
复制
</summary>
</member>
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeView">
@ -18400,6 +18400,36 @@
ISystemDocumentService
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.PatientWeight">
<summary>
体重
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.RadionuclideTotalDose">
<summary>
总剂量
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.RadionuclideHalfLife">
<summary>
半衰期
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.RadiopharmaceuticalStartTime">
<summary>
注射时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.AcquisitionTime">
<summary>
成像 / 采集时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DicomStudyDTO.IsHasEmptyPatientInfo">
<summary>
是否存在空字符串字段PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串)
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.EditPatientInfoCommand.PatientSex">
<summary>
性别
@ -19648,6 +19678,11 @@
成像 / 采集时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.VisitStudyDTO.IsHasEmptyPatientInfo">
<summary>
是否存在空字符串字段PatientSex、PatientWeight、RadionuclideTotalDose、RadionuclideHalfLife、RadiopharmaceuticalStartTime、AcquisitionTime 任意一个为空/空字符串)
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Services.SystemBasicDataService">
<summary>
SystemBasicDataService

View File

@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public Guid? SeriesId { get; set; }
public bool? IsMasked { get; set; }
[JsonIgnore]
public int ShowOrder { get; set; }
[JsonIgnore]

View File

@ -72,7 +72,8 @@ namespace IRaCIS.Core.Application.Services
InstanceNumber = k.InstanceNumber,
IsReading = true,
IsDeleted = false,
FileSize = k.FileSize
FileSize = k.FileSize,
}).ToList();
@ -103,7 +104,7 @@ namespace IRaCIS.Core.Application.Services
.WhereIf(isReading == true, t => t.IsReading == true)
.OrderBy(t => t.SeriesId).ThenBy(t => t.InstanceNumber)
.ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize }).ToListAsync();//.GroupBy(u => u.SeriesId);
.Select(t => new { t.SeriesId, t.Id, t.Path, t.NumberOfFrames, t.InstanceNumber, t.HtmlPath, t.IsReading, t.IsDeleted, t.FileSize ,t.IsMasked}).ToListAsync();//.GroupBy(u => u.SeriesId);
foreach (var series in seriesList)
@ -119,7 +120,8 @@ namespace IRaCIS.Core.Application.Services
InstanceNumber = k.InstanceNumber,
IsReading = k.IsReading,
IsDeleted = k.IsDeleted,
FileSize = k.FileSize
FileSize = k.FileSize,
IsMasked = k.IsMasked
}).ToList();

View File

@ -92,7 +92,11 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync();
}
var errorPathList = new List<string>();
var errorList = new List<InstanceIdPath>();
var okList = new List<InstanceIdPath>();
var batchId = Guid.NewGuid();
foreach (var item in idPathList)
{
@ -106,20 +110,27 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
var prefix = path.Substring(1, path.LastIndexOf('/') - 1);
var maskPath = $"{Path.GetFileName(path)}.MaskImage";
//每次都用一个新的名字
var maskFileName = $"{Path.GetFileName(path)}.{batchId}_MaskDicom";
if (path.Contains("_MaskDicom"))
{
//清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
await _oSSService.DeleteFromPrefix(maskPath, true);
await _oSSService.DeleteFromPrefix(path, true); //清理缓存的里面的遮盖图,多次遮盖同一张图时,清除缓存很重要
}
await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskPath);
await _oSSService.UploadToOSSAsync(outPutStream, prefix, maskFileName, false);
var newPath = path + ".MaskImage";
var newPath = $"/{prefix}/{maskFileName}";
await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path= newPath, IsMasked = true });
okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath });
await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = true });
}
catch (Exception ex)
{
errorPathList.Add(path);
errorList.Add(new InstanceIdPath() { Id = item.Id, Path = path });
Log.Logger.Error(ex, $"StudyMaskImage Error for InstanceIdList Path:{path} {ex.Message}");
}
@ -128,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
await _dicomInstanceRepository.SaveChangesAsync();
return ResponseOutput.Ok(errorPathList);
return ResponseOutput.Ok(new { OkList = okList, ErrorList = errorList });
}
@ -158,13 +169,18 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
idPathList = await _dicomInstanceRepository.Where(t => t.SeriesId == inCommand.SeriesId).Select(t => new InstanceIdPath { Id = t.Id, Path = t.Path }).ToListAsync();
}
var okList = new List<InstanceIdPath>();
foreach (var item in idPathList)
{
if (item.Path.EndsWith(".MaskImage"))
if (item.Path.EndsWith("_MaskDicom"))
{
var newPath = item.Path[..^10];
await _oSSService.DeleteFromPrefix(item.Path, true);
//await _oSSService.DeleteFromPrefix(newPath, true);
var length = Guid.Empty.ToString().Length + "_MaskDicom".Length;
var newPath = item.Path[..^length];
okList.Add(new InstanceIdPath() { Id = item.Id, Path = newPath });
await _dicomInstanceRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new DicomInstance() { Path = newPath, IsMasked = false });
}
@ -174,7 +190,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
await _dicomInstanceRepository.SaveChangesAsync();
return ResponseOutput.Ok();
return ResponseOutput.Ok(new { OkList = okList });
}