+97
-99
@@ -1,21 +1,17 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 裁判
|
||||
/// </summary>
|
||||
@@ -43,14 +39,14 @@ namespace IRaCIS.Application.Services
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
PageName = x.ReadingCriterionPage.PageName,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
JudgeType = x.JudgeType,
|
||||
Type=x.Type,
|
||||
Unit= x.Unit,
|
||||
Type = x.Type,
|
||||
Unit = x.Unit,
|
||||
ReadingQuestionTrialId = x.Id,
|
||||
JudgeDifferenceValue= x.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=x.JudgeDifferenceType,
|
||||
JudgeDifferenceValue = x.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.JudgeDifferenceType,
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
@@ -74,9 +70,9 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
|
||||
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
|
||||
JudgeDifferenceValue= inDto.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=inDto.JudgeDifferenceType,
|
||||
JudgeType = inDto.JudgeType,
|
||||
JudgeDifferenceValue = inDto.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = inDto.JudgeDifferenceType,
|
||||
JudgeType = inDto.JudgeType,
|
||||
});
|
||||
|
||||
var result = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
@@ -134,21 +130,11 @@ namespace IRaCIS.Application.Services
|
||||
if (await VerifyIsGlobalVisitTask(taskList[0].Id))
|
||||
{
|
||||
|
||||
var globalVisitTaskIds = await _visitTaskRepository.Where(x=>x.Id== taskList[0].Id).Select(x=>x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
var globalVisitTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[0].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTasks = await _visitTaskRepository.Where(x => globalVisitTaskIds.Contains(x.Id)||x.Id== taskList[0].Id).Select(x => new {
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
x.SourceSubjectVisitId,
|
||||
x.TaskBlindName,
|
||||
} ).ToListAsync();
|
||||
|
||||
var globalVisitTwoTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[1].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTwoTasks = await _visitTaskRepository.Where(x => globalVisitTwoTaskIds.Contains(x.Id) || x.Id == taskList[1].Id).Select(x => new {
|
||||
var globalVisitTasks = await _visitTaskRepository.Where(x => globalVisitTaskIds.Contains(x.Id) || x.Id == taskList[0].Id).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
@@ -156,7 +142,19 @@ namespace IRaCIS.Application.Services
|
||||
x.TaskBlindName,
|
||||
}).ToListAsync();
|
||||
|
||||
var taskNum = globalVisitTasks.Select(x => x.VisitTaskNum).Distinct().OrderBy(x=>x).ToList();
|
||||
var globalVisitTwoTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[1].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTwoTasks = await _visitTaskRepository.Where(x => globalVisitTwoTaskIds.Contains(x.Id) || x.Id == taskList[1].Id).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
x.SourceSubjectVisitId,
|
||||
x.TaskBlindName,
|
||||
}).ToListAsync();
|
||||
|
||||
var taskNum = globalVisitTasks.Select(x => x.VisitTaskNum).Distinct().OrderBy(x => x).ToList();
|
||||
|
||||
|
||||
var judgeQuestionAnswer = await _readingTaskQuestionAnswerRepository.Where(x => globalVisitTaskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(x => x.ReadingQuestionTrial.ShowOrder)
|
||||
@@ -267,7 +265,7 @@ namespace IRaCIS.Application.Services
|
||||
judgeInfo.VisitInfoList.Add(judgeReadingInfoDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case ReadingCategory.Global:
|
||||
@@ -300,14 +298,14 @@ namespace IRaCIS.Application.Services
|
||||
ArmEnum = item.ArmEnum,
|
||||
VisitTaskId = item.VisitTaskId,
|
||||
GlobalVisitTaskId = taskList[0].Id,
|
||||
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType== GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
{
|
||||
|
||||
Answer = x.Answer,
|
||||
QuestionId = x.QuestionId!.Value,
|
||||
QuestionName = x.QuestionName,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
@@ -322,11 +320,11 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
|
||||
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "",
|
||||
});
|
||||
@@ -337,14 +335,14 @@ namespace IRaCIS.Application.Services
|
||||
var rTwoJudge = new JudgeReadingQuestion()
|
||||
{
|
||||
ArmEnum = twoItem.ArmEnum,
|
||||
|
||||
|
||||
VisitTaskId = twoItem.VisitTaskId,
|
||||
GlobalVisitTaskId = taskList[1].Id,
|
||||
JudgeQuestionList = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
{
|
||||
|
||||
Answer = x.Answer,
|
||||
QuestionId = x.QuestionId==null?default(Guid): x.QuestionId.Value,
|
||||
QuestionId = x.QuestionId == null ? default(Guid) : x.QuestionId.Value,
|
||||
QuestionName = x.QuestionName,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
@@ -365,11 +363,11 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "",
|
||||
});
|
||||
@@ -405,7 +403,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
JudgeResultImagePath = string.Join(',',inDto.JudgeResultImagePathList),
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
@@ -432,19 +430,19 @@ namespace IRaCIS.Application.Services
|
||||
SignTime = DateTime.Now,
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var oncologModule = await _readModuleRepository
|
||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&x.TrialReadingCriterionId==taskInfo.TrialReadingCriterionId&& x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
if (!taskInfo.TrialReadingCriterion.IsGlobalReading&&oncologModule != null)
|
||||
var oncologModule = await _readModuleRepository
|
||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId && x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
if (!taskInfo.TrialReadingCriterion.IsGlobalReading && oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
}
|
||||
|
||||
else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
@@ -457,15 +455,15 @@ namespace IRaCIS.Application.Services
|
||||
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||
|
||||
var oncologModule = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology
|
||||
&&x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
).FirstOrDefaultAsync();
|
||||
|
||||
if (oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
if (oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -534,12 +532,12 @@ namespace IRaCIS.Application.Services
|
||||
else
|
||||
{
|
||||
isGroupAnalysis = true;
|
||||
visitTaskids = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId
|
||||
visitTaskids = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId
|
||||
&& x.TrialReadingCriterionId == visitTask.TrialReadingCriterionId
|
||||
&& x.SouceReadModuleId == visitTask.SouceReadModuleId && x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.Id).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
@@ -559,13 +557,13 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in visitTaskids.Where(x=>x!=visitTask.Id))
|
||||
foreach (var item in visitTaskids.Where(x => x != visitTask.Id))
|
||||
{
|
||||
var armEnum = await _visitTaskRepository.Where(x => x.Id == item).Select(x=>x.ArmEnum).FirstNotNullAsync();
|
||||
var armEnum = await _visitTaskRepository.Where(x => x.Id == item).Select(x => x.ArmEnum).FirstNotNullAsync();
|
||||
await VerifyJudgeResult(visitTask, new List<Guid>() { visitTask.Id, item }, armEnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -573,7 +571,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
private async Task VerifyJudgeResult(VisitTask visitTask,List<Guid> visitTaskids,Arm? groupArm = null)
|
||||
private async Task VerifyJudgeResult(VisitTask visitTask, List<Guid> visitTaskids, Arm? groupArm = null)
|
||||
{
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => new
|
||||
{
|
||||
@@ -605,8 +603,8 @@ namespace IRaCIS.Application.Services
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&& x.TrialReadingCriterionId == visitTask.TrialReadingCriterionId
|
||||
&& x.IsAnalysisCreate == false
|
||||
&& x.SubjectId == visitTask.SubjectId
|
||||
&& x.ReadingCategory == ReadingCategory.Visit && x.VisitTaskNum <= visitTask.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||
&& x.SubjectId == visitTask.SubjectId
|
||||
&& x.ReadingCategory == ReadingCategory.Visit && x.VisitTaskNum <= visitTask.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||
|
||||
|
||||
var globalVisitQuestionQuery = from questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => GlobalVisitTaskIds.Contains(x.VisitTaskId))
|
||||
@@ -619,8 +617,8 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=question.JudgeDifferenceType,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswer.VisitTaskId,
|
||||
};
|
||||
var globalVisitAnswerlist = await globalVisitQuestionQuery.ToListAsync();
|
||||
@@ -629,15 +627,15 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
foreach (var item in taskNums)
|
||||
{
|
||||
List<GroupTaskAnswerDto> groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
|
||||
}
|
||||
@@ -654,22 +652,22 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
};
|
||||
var questionAnswerlist = await query.ToListAsync();
|
||||
|
||||
// 将答案进行分组
|
||||
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = ComputeJudgeResult(groupTasks);
|
||||
}
|
||||
@@ -710,16 +708,16 @@ namespace IRaCIS.Application.Services
|
||||
twoItem.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList()
|
||||
).ToList();
|
||||
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue,x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination, x.JudgeDifferenceValue, x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId!.Value,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue= x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
}
|
||||
|
||||
@@ -762,9 +760,9 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
};
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
};
|
||||
|
||||
var visitTaskQuestions = await query.ToListAsync();
|
||||
|
||||
@@ -772,15 +770,15 @@ namespace IRaCIS.Application.Services
|
||||
lastTask.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
|
||||
).ToList();
|
||||
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId!.Value,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
}
|
||||
@@ -822,7 +820,7 @@ namespace IRaCIS.Application.Services
|
||||
IsGroupDiffArm2 = true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
@@ -853,7 +851,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (visitTask.IsAnalysisCreate)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (groupArm == null)
|
||||
{
|
||||
@@ -902,8 +900,8 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else if (noteEqual)
|
||||
{
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskAnswer1 = item.TaskAnswerList[0];
|
||||
|
||||
Reference in New Issue
Block a user