This commit is contained in:
he
2023-03-17 14:35:06 +08:00
parent b818c05525
commit c737c494a7
4 changed files with 56 additions and 7 deletions
@@ -550,10 +550,16 @@ namespace IRaCIS.Core.Application.Contracts
public int? ParentQuestionShowOrder { get; set; }
public string Answer { get; set; } = string.Empty;
}
public class TrialAdditionaQuestion: TrialReadQuestion
{
public List<TrialAdditionaQuestion> Childrens { get; set; } = new List<TrialAdditionaQuestion>();
public string Answer { get; set; } = string.Empty;
}
public class TrialJudgeQuestion
{
@@ -243,7 +243,16 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingQuestionCriterionTrial, GetTrialReadingInfoOutDto>();
CreateMap<ReadingQuestionTrial, TrialAdditionaQuestion>()
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
.ForMember(d => d.ParentQuestionGenre, u => u.MapFrom(s => s.ParentReadingQuestionTrial.QuestionGenre))
.ForMember(d => d.ParentDictionaryCode, u => u.MapFrom(s => s.ParentReadingQuestionTrial.DictionaryCode))
.ForMember(t => t.ParentQuestionName, u => u.MapFrom(c => c.ParentReadingQuestionTrial.QuestionName))
.ForMember(t => t.RelevanceShowOrder, u => u.MapFrom(c => c.RelevanceReadingQuestionTrial.ShowOrder))
.ForMember(t => t.ParentQuestionShowOrder, u => u.MapFrom(c => c.ParentReadingQuestionTrial.ShowOrder));
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))