修改阅片看到得instance 序列
continuous-integration/drone/push Build is failing Details

Uat_IRC_Net8
hang 2025-02-13 16:13:52 +08:00
parent ae14a8a530
commit 8bdd9e29ab
1 changed files with 22 additions and 10 deletions

View File

@ -31,7 +31,7 @@ namespace IRaCIS.Core.Application.Services
[HttpPost]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
[UnitOfWork]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput<string>> AddOrUpdateSV(SubjectVisitCommand svCommand)
@ -161,7 +161,7 @@ namespace IRaCIS.Core.Application.Services
[HttpPut("{trialId:guid}/{subjectVisitId:guid}/{isUrgent:bool}")]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
//[Authorize(Policy = IRaCISPolicy.PM_IQC)]
public async Task<IResponseOutput> SetSubjectVisitUrgent(Guid subjectVisitId, bool isUrgent)
{
@ -173,7 +173,7 @@ namespace IRaCIS.Core.Application.Services
[HttpDelete, Route("{trialId:guid}/{id:guid}")]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
//[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task<IResponseOutput> DeleteSV(Guid id)
{
@ -238,7 +238,7 @@ namespace IRaCIS.Core.Application.Services
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId))
.WhereIf(isReading == 1, s => s.IsReading)
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath,t.IsDeleted,t.IsReading }).ToListAsync();
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.HtmlPath, t.IsDeleted, t.IsReading }).ToListAsync();
foreach (var t in studyList)
{
@ -258,11 +258,11 @@ namespace IRaCIS.Core.Application.Services
HtmlPath = k.HtmlPath,
Path = k.Path,
InstanceNumber = k.InstanceNumber,
IsReading=k.IsReading,
IsDeleted=k.IsDeleted,
IsReading = k.IsReading,
IsDeleted = k.IsDeleted,
}).ToList();
series.InstanceCount=series.InstanceInfoList.Count;
series.InstanceCount = series.InstanceInfoList.Count;
}
);
@ -503,7 +503,7 @@ namespace IRaCIS.Core.Application.Services
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId) && t.IsReading)
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath,t.IsReading }).ToListAsync();
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.IsReading }).ToListAsync();
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
.WhereIf(isManualGenerate == false, t => t.IsReading)
@ -527,6 +527,9 @@ namespace IRaCIS.Core.Application.Services
}).ToList();
// 设置阅片 不阅片,数字要要重新统计
series.InstanceCount = series.InstanceInfoList.Count;
//series.WindowWidth = instanceList.FirstOrDefault()!.WindowWidth;
//series.WindowCenter = instanceList.FirstOrDefault()!.WindowCenter;
});
@ -612,7 +615,7 @@ namespace IRaCIS.Core.Application.Services
item.InstanceInfoList.ForEach(x =>
{
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0&&y.NumberOfFrames!=null).Select(y => y.NumberOfFrames).Distinct().ToList();
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0 && y.NumberOfFrames != null).Select(y => y.NumberOfFrames).Distinct().ToList();
if (keyFramesList.Count() > 0)
{
@ -726,9 +729,18 @@ namespace IRaCIS.Core.Application.Services
#endregion
#region 过滤空序列得检查 过滤空instance得序列
foreach (var study in studyList)
{
study.SeriesList = study.SeriesList.Where(t => t.InstanceCount > 0).ToList();
}
var result = studyList.Where(x => x.SeriesCount > 0).ToList();
#endregion
return result;
@ -743,7 +755,7 @@ namespace IRaCIS.Core.Application.Services
/// <param name="subjectVisitId"></param>
/// <returns></returns>
[HttpPut("{trialId:guid}/{subjectVisitId:guid}")]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
[TrialGlobalLimit("AfterStopCannNotOpt")]
[Obsolete]
public async Task<IResponseOutput> SetSVExecuted(Guid subjectVisitId)
{