随机阅片NextTask-4
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7683866718
commit
b1fd623065
|
@ -287,7 +287,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var result = await _readingCustomTagRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
result.AddRange(await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync());
|
||||
result.AddRange(await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -649,7 +649,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsCurrentTask = x.Id == inDto.VisitTaskId,
|
||||
IsConvertedTask = x.IsConvertedTask,
|
||||
IsFirstChangeTask = x.BeforeConvertedTaskId != null,
|
||||
IsExistUnprocessedFeedback=x.UserFeedBackList.Any(y => y.State == 0),
|
||||
IsExistUnprocessedFeedback = x.UserFeedBackList.Any(y => y.State == 0),
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
|
@ -1652,7 +1652,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
QuestionMark.IsLymph,
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
|
@ -2454,14 +2454,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).FirstNotNullAsync();
|
||||
var tableQuestionIds = inDto.AnswerList.Select(x => x.TableQuestionId).ToList();
|
||||
|
@ -3122,17 +3122,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect)
|
||||
.Where(x => !cacheSkipIds.Contains(x.Id));
|
||||
var count = await query.CountAsync();
|
||||
if (count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
//如果是随机阅片
|
||||
|
||||
Random random = new Random();
|
||||
var skipcount = 0;
|
||||
if (count >= 2)
|
||||
{
|
||||
skipcount = random.Next(0, count - 1);
|
||||
}
|
||||
|
||||
var maxReadingTime = query.MaxOrDefault(x => x.FirstReadingTime);
|
||||
if (maxReadingTime != null)
|
||||
|
@ -3140,6 +3134,29 @@ namespace IRaCIS.Core.Application.Service
|
|||
query = query.Where(x => x.FirstReadingTime == maxReadingTime);
|
||||
skipcount = 0;
|
||||
}
|
||||
|
||||
var minRandomOrder = query.Where(t => t.RandomOrder != null).Select(t => t.RandomOrder).MinOrDefault();
|
||||
|
||||
//阅片中的可能没序号,以阅片中优先先给IR
|
||||
if (minRandomOrder != null && maxReadingTime == null)
|
||||
{
|
||||
query = query.Where(x => x.RandomOrder == minRandomOrder);
|
||||
skipcount = 0;
|
||||
}
|
||||
|
||||
|
||||
var count = await query.CountAsync();
|
||||
if (count >= 2)
|
||||
{
|
||||
skipcount = random.Next(0, count - 1);
|
||||
}
|
||||
if (count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
|
||||
|
||||
task = await query
|
||||
.Select(x => new GetReadingTaskDto()
|
||||
{
|
||||
|
@ -3240,7 +3257,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode;
|
||||
task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0;
|
||||
task.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||
task.IsShowStudyName= trialInfo.IsShowStudyName;
|
||||
task.IsShowStudyName = trialInfo.IsShowStudyName;
|
||||
task.IsBaseLine = isBaseLine;
|
||||
task.ReadingVersionEnum = criterionInfo.ReadingVersionEnum;
|
||||
task.ReadingToolList = criterionInfo.ReadingToolList;
|
||||
|
@ -3356,7 +3373,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpPost]
|
||||
public async Task<bool> ResetReadingRestTime(Guid? userRoleId)
|
||||
{
|
||||
var roleId = (userRoleId != null && userRoleId != Guid.Empty) ? (Guid) userRoleId : _userInfo.UserRoleId;
|
||||
var roleId = (userRoleId != null && userRoleId != Guid.Empty) ? (Guid)userRoleId : _userInfo.UserRoleId;
|
||||
|
||||
//int readingMinute = 120; // 为60整数
|
||||
int restMinute = 10; //
|
||||
|
|
Loading…
Reference in New Issue