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

IRC_NewDev
hang 2024-10-24 18:05:43 +08:00
commit 5023f5ed31
3 changed files with 12 additions and 3 deletions

View File

@ -1766,7 +1766,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[NotDefault]
public Guid QuestionId { get; set; }
public string Type { get; set; }
public string Type { get; set; } = string.Empty;
public List<string> TypeList { get; set; } = new List<string>();
}

View File

@ -150,7 +150,10 @@ namespace IRaCIS.Core.Application.Service
var result = await _readingTableQuestionTrialRepository
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.WhereIf(inDto.TypeList.Count() > 0, x => inDto.TypeList.Contains(x.Type))
.OrderBy(x => x.ShowOrder)
.ProjectTo<GetCalculateTableQuestionsOutDto>(_mapper.ConfigurationProvider, new
{
@ -172,7 +175,8 @@ namespace IRaCIS.Core.Application.Service
var result = await _readingTableQuestionSystemRepository
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.WhereIf(inDto.TypeList.Count() > 0, x => inDto.TypeList.Contains(x.Type))
.OrderBy(x => x.ShowOrder)
.ProjectTo<GetCalculateTableQuestionsOutDto>(_mapper.ConfigurationProvider, new
{

View File

@ -232,9 +232,11 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingTableQuestionSystem, GetCalculateTableQuestionsOutDto>()
.ForMember(d => d.QuestionId, u => u.MapFrom(s => s.Id))
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
CreateMap<ReadingTableQuestionTrial, GetCalculateTableQuestionsOutDto>()
.ForMember(d => d.QuestionId, u => u.MapFrom(s => s.Id))
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName));
@ -265,6 +267,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadingQuestionSystem, ReadingQuestionTrial>()
.ForMember(d => d.CreateUser, u => u.Ignore())
.ForMember(d => d.ReadingTableQuestionTrialList, u => u.Ignore())
.ForMember(d => d.ReadingQuestionSystemId, u => u.MapFrom(s => s.Id));
CreateMap<ReadingTableAnswerRowInfo, TableAnsweRowInfo>()