Merge branch 'Test.IRC' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test.IRC
continuous-integration/drone/push Build is passing Details

IRC_NewDev
hang 2023-12-20 16:21:41 +08:00
commit e4b20908dc
2 changed files with 25 additions and 3 deletions

View File

@ -271,6 +271,13 @@ namespace IRaCIS.Core.Application.Service
&&x.ClinicalQuestionType!= ReadingQestionType.Group
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderByDescending(x=>x.IsCheckDate).ThenBy(x=>x.ShowOrder)
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
if (_userInfo.IsEn_Us)
{
result.QuestionList.ForEach(x => {
x.GroupName = x.GroupEnName;
x.QuestionName = x.QuestionEnName;
});
}
var answers = await _clinicalQuestionAnswerRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
.Select(x => new

View File

@ -54,9 +54,10 @@ namespace IRaCIS.Application.Services
VisitTask? globalTaskInfo = null;
var relatedVisitTaskIdList = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
Guid? judgeResultTaskId = null;
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned && relatedVisitTaskIdList.Count() > 0)
{
var judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
// 说明是裁判 取裁判结果
if (judgeResultTaskId != null)
@ -100,11 +101,15 @@ namespace IRaCIS.Application.Services
}
else
{
var judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == globalTaskInfo.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
if (judgeResultTaskId == null)
{
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == globalTaskInfo.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
if (judgeResultTaskId == null)
{
throw new BusinessValidationFailedException(_localizer["ReadingOncology_Abnormal"]);
}
}
visitTask = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
visitTaskIdList= await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).Select(x=>x.RelatedVisitTaskIdList).FirstNotNullAsync();
}
@ -261,6 +266,16 @@ namespace IRaCIS.Application.Services
&& x.ReadingCategory == ReadingCategory.Global
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.JudgeVisitTaskId).FirstOrDefaultAsync();
// 要判断是否为老裁判任务的Id
if (judgeVisitTaskId != null)
{
// 如果不存在有效的裁判
if (!(await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId && x.TaskState == TaskState.Effect)))
{
judgeVisitTaskId = null;
}
}
// 获取系统配置
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();