修改
continuous-integration/drone/push Build is passing Details

he 2024-07-17 10:19:51 +08:00
parent 20d557e795
commit 102e193ae8
1 changed files with 11 additions and 8 deletions

View File

@ -2737,11 +2737,6 @@ namespace IRaCIS.Application.Services
cacheIds.Add(inDto.VisitTaskId);
_provider.Set(clearSkipReadingCacheKey, JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
}
var c = _provider.Get<string>(clearSkipReadingCacheKey).Value;
Console.WriteLine(c);
// 加这个测试
Thread.Sleep(3000); // 3000毫秒 = 3秒
return true;
}
@ -2870,9 +2865,9 @@ namespace IRaCIS.Application.Services
})).CurrentPageData;
subjectTaskList = subjectTaskList
// 排除跳过的
.Where(x => x.UnReadCanReadTaskList.Select(y => y.Id).Except(cacheSkipIds).Count() > 0).ToList();
if (subjectTaskList.Count() == 0)
{
@ -2880,6 +2875,14 @@ namespace IRaCIS.Application.Services
}
var taskList = subjectTaskList.FirstOrDefault()!.UnReadCanReadTaskList;
// 排除跳过的
List<Guid> remainingItems = taskList.Select(x => x.Id).Except(cacheSkipIds).ToList();
taskList = taskList.Where(x => remainingItems.Contains(x.Id)).ToList();
if (taskList.Count() == 0)
{
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
}
Random random = new Random();
//返回的范围是 0- taskList.Count-1