IRC_NewDev
he 2024-08-28 13:33:55 +08:00
parent cdd8250a0c
commit f902e44303
1 changed files with 3 additions and 2 deletions

View File

@ -1379,7 +1379,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var trialQuestionIdList = list.Select(t => t.TrialQCQuestionConfigureId); var trialQuestionIdList = list.Select(t => t.TrialQCQuestionConfigureId);
var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync(); var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync();
var beforeAnswerList = await _dbContext.TrialQCQuestionAnswer.Where(x => x.SubjectVisitId == firstEntity.SubjectVisitId && x.CurrentQCEnum == firstEntity.CurrentQCEnum && x.QCProcessEnum == firstEntity.QCProcessEnum) var beforeAnswerList = await _dbContext.TrialQCQuestionAnswer.Where(x => x.SubjectVisitId == firstEntity.SubjectVisitId && x.CurrentQCEnum == firstEntity.CurrentQCEnum && x.QCProcessEnum == firstEntity.QCProcessEnum)
.Select(u => new { u.TrialQCQuestionConfigureId, u.Answer }).ToListAsync(); .Select(u => new { u.TrialQCQuestionConfigureId, u.Answer }).ToListAsync();
@ -1402,6 +1402,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
QcQuestionAnswerList = answerList.Join(trialQuestionNameList, t => t.TrialQCQuestionConfigureId, u => u.TrialQCQuestionConfigureId, (t, u) => new QcQuestionAnswerList = answerList.Join(trialQuestionNameList, t => t.TrialQCQuestionConfigureId, u => u.TrialQCQuestionConfigureId, (t, u) => new
{ {
t.Answer, t.Answer,
u.QuestionName, u.QuestionName,
u.ShowOrder u.ShowOrder
}).OrderBy(t => t.ShowOrder).ToList(), }).OrderBy(t => t.ShowOrder).ToList(),
@ -2808,7 +2809,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//获取问题名称 组合成数组 //获取问题名称 组合成数组
var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).IgnoreQueryFilters().Select(t => new var quesionList = await _dbContext.ReadingQuestionTrial.Where(t => taskQuestionAnswerList.Select(k => k.ReadingQuestionTrialId).Contains(t.Id)).IgnoreQueryFilters().Select(t => new
{ {
t.QuestionName, QuestionName=_userInfo.IsEn_Us?t.QuestionEnName: t.QuestionName,
t.QuestionEnName, t.QuestionEnName,
QuestionId = t.Id, QuestionId = t.Id,
t.DictionaryCode, t.DictionaryCode,