Compare commits
No commits in common. "85a303171c3f18b25244178e3b2dba66f89790a7" and "8fedcdaf00de9069004c3f5865d364b32dba16ab" have entirely different histories.
85a303171c
...
8fedcdaf00
|
@ -37,7 +37,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
||||
|
||||
Task<bool> ResetReadingRestTime(Guid? userId);
|
||||
Task ResetReadingRestTime(Guid? userId);
|
||||
|
||||
Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto);
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ using AutoMapper.QueryableExtensions;
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
|
@ -2707,31 +2705,6 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置跳过阅片的缓存
|
||||
/// </summary>
|
||||
/// <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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -2797,20 +2770,14 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var subjectIndex = subjectTaskList.Where(x => x.SubjectId == inDto.SubjectId && x.SubjectCode == inDto.SubjectCode).Select(x => x.Index).FirstOrDefault();
|
||||
|
||||
|
||||
var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex && !x.ExistReadingApply)
|
||||
// 排除跳过的
|
||||
.Where(x=> x.UnReadCanReadTaskList.Select(y => y.Id).Intersect(cacheSkipIds).Count()==0)
|
||||
.OrderBy(x => x.Index).FirstOrDefault();
|
||||
|
||||
var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex && !x.ExistReadingApply).OrderBy(x => x.Index).FirstOrDefault();
|
||||
|
||||
if (currentSubject == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
task = currentSubject.UnReadCanReadTaskList
|
||||
.Select(x => new GetReadingTaskDto()
|
||||
task = currentSubject.UnReadCanReadTaskList.Select(x => new GetReadingTaskDto()
|
||||
{
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
SubjectCode = currentSubject.SubjectCode,
|
||||
|
@ -2839,25 +2806,12 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
})).CurrentPageData;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (subjectTaskList.Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -3041,12 +2995,12 @@ namespace IRaCIS.Application.Services
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> VerifyReadingRestTime()
|
||||
public async Task VerifyReadingRestTime()
|
||||
{
|
||||
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||
if (userTypeEnum != UserTypeEnum.IndependentReviewer)
|
||||
{
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
var startReadingTimeKey = _userInfo.Id.ToString() + "StartReadingTime";
|
||||
var startRestTimeKey = _userInfo.Id.ToString() + "StartRestTime";
|
||||
|
@ -3091,8 +3045,6 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
#endregion
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -3100,7 +3052,7 @@ namespace IRaCIS.Application.Services
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> ResetReadingRestTime(Guid? userID)
|
||||
public async Task ResetReadingRestTime(Guid? userID)
|
||||
{
|
||||
if (userID == null)
|
||||
{
|
||||
|
@ -3127,7 +3079,6 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
_provider.Set(startReadingTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue