This commit is contained in:
he
2023-04-25 15:52:21 +08:00
parent 371cc24520
commit 4309ee627a
4 changed files with 55 additions and 8 deletions
@@ -1247,10 +1247,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// </summary>
public JudgeTypeEnum JudgeType { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
public int ShowOrder { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
/// <summary>
/// 数值类型
@@ -248,18 +248,63 @@ namespace IRaCIS.Application.Services
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
JudgeType = y.ReadingQuestionTrial.JudgeType,
Type = y.ReadingQuestionTrial.Type,
ShowOrder= y.ReadingQuestionTrial.ShowOrder,
Type = y.ReadingQuestionTrial.Type,
TypeValue = y.ReadingQuestionTrial.TypeValue,
ValueType = y.ReadingQuestionTrial.ValueType,
IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion,
Answer =y.Answer,
}).ToList()
}).ToListAsync();
var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync();
result.TaskList.ForEach(x =>
{
x.CrterionDictionaryGroup = ReadingCommon.GetCrterionDictionaryGroup(x.IsConvertedTask);
});
if (x.BeforeQuestionList.Count() != globalQuestionList.Count())
{
var beforeQuestionIds = x.BeforeQuestionList.Select(x => x.QuestionId).ToList();
globalQuestionList.ForEach(y =>
{
if (!beforeQuestionIds.Contains(y.Id))
{
x.BeforeQuestionList.Add(new GlobalQuestionInfo()
{
QuestionId = y.Id,
QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us),
QuestionEnName = y.QuestionEnName,
AnswerGroup = y.AnswerGroup,
QuestionType = y.QuestionType,
LimitEdit = y.LimitEdit,
MaxAnswerLength = y.MaxAnswerLength,
FileType = y.FileType,
QuestionGenre = y.QuestionGenre,
ShowOrder=y.ShowOrder,
DictionaryCode = y.DictionaryCode,
GlobalReadingShowType = y.GlobalReadingShowType,
AnswerCombination = y.AnswerCombination,
JudgeType = y.JudgeType,
Type = y.Type,
TypeValue = y.TypeValue,
ValueType = y.ValueType,
IsJudgeQuestion = y.IsJudgeQuestion,
Answer = string.Empty,
});
}
});
}
x.BeforeQuestionList = x.BeforeQuestionList.OrderBy(y => y.ShowOrder).ToList();
});
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();