读取下一个阅片
parent
431d2e7a97
commit
6a6e449e49
|
@ -2825,20 +2825,24 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
else if (inDto.SubjectId != null && trialReadingCriterion.IsReadingTaskViewInOrder == ReadingOrder.SubjectRandom)
|
||||
{
|
||||
await _downloadAndUploadService.SubejctRandomReadingTaskNameDeal((Guid)inDto.SubjectId, (Guid)trialReadingCriterionId);
|
||||
|
||||
|
||||
|
||||
var subjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId,
|
||||
SubjectId = inDto.SubjectId,
|
||||
TrialReadingCriterionId = trialReadingCriterionId!.Value,
|
||||
SubjectCode = inDto.SubjectCode,
|
||||
PageIndex = 1,
|
||||
PageSize = 99999,
|
||||
|
||||
})).CurrentPageData;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (subjectTaskList.Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
|
@ -2851,11 +2855,36 @@ namespace IRaCIS.Core.Application.Service
|
|||
//受试者随机固定排序
|
||||
taskList = taskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t=>t.TaskBlindName).ToList();
|
||||
|
||||
// 当前受试者没有就找其他受试者
|
||||
if (taskList.Count() == 0)
|
||||
{
|
||||
var allsubjectTaskList = (await _visitTaskService.GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId,
|
||||
TrialReadingCriterionId = trialReadingCriterionId!.Value,
|
||||
PageIndex = 1,
|
||||
PageSize = 99999,
|
||||
|
||||
})).CurrentPageData;
|
||||
|
||||
foreach (var item in allsubjectTaskList)
|
||||
{
|
||||
var canReadList = item.UnReadCanReadTaskList.Where(x => remainingItems.Contains(x.Id)).OrderBy(t => t.TaskBlindName).ToList();
|
||||
if (canReadList.Count() > 0)
|
||||
{
|
||||
taskList = canReadList;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (taskList.Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
|
||||
#region 随机废弃
|
||||
//Random random = new Random();
|
||||
////返回的范围是 0- taskList.Count-1
|
||||
|
|
Loading…
Reference in New Issue