修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4026eca656
commit
85a303171c
|
@ -2707,10 +2707,29 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var c = _provider.Get<string>(clearSkipReadingCacheKey).Value;
|
/// <summary>
|
||||||
Console.WriteLine(c);
|
/// 设置跳过阅片的缓存
|
||||||
// 加这个测试
|
/// </summary>
|
||||||
Thread.Sleep(3000); // 3000毫秒 = 3秒
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> SetSkipReadingCache(SetSkipReadingCacheInDto inDto )
|
||||||
|
{
|
||||||
|
var clearSkipReadingCacheKey = _userInfo.Id.ToString() + "SkipReadingCache";
|
||||||
|
var clearSkipReadingCache = _provider.Get<string>(clearSkipReadingCacheKey).Value;
|
||||||
|
if (clearSkipReadingCache == null|| clearSkipReadingCache==string.Empty)
|
||||||
|
{
|
||||||
|
List<Guid> cacheIds = new List<Guid>();
|
||||||
|
cacheIds.Add(inDto.VisitTaskId);
|
||||||
|
|
||||||
|
_provider.Set(clearSkipReadingCacheKey, JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
List<Guid>? cacheIds=JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||||
|
cacheIds.Add(inDto.VisitTaskId);
|
||||||
|
_provider.Set(clearSkipReadingCacheKey, JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2820,12 +2839,25 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
})).CurrentPageData;
|
})).CurrentPageData;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (subjectTaskList.Count() == 0)
|
if (subjectTaskList.Count() == 0)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||||
}
|
}
|
||||||
|
|
||||||
var taskList = subjectTaskList.FirstOrDefault()!.UnReadCanReadTaskList;
|
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();
|
Random random = new Random();
|
||||||
//返回的范围是 0- taskList.Count-1
|
//返回的范围是 0- taskList.Count-1
|
||||||
|
|
Loading…
Reference in New Issue