修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ad01628e48
commit
a7cfc1714a
|
@ -1574,7 +1574,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public class GetCalculateQuestionsOutDto: ReadingQuestionSystemView
|
||||
{
|
||||
|
||||
public List<ReadingTableQuestionSystemView> TableQuestions { get; set; }
|
||||
public List<ReadingTableQuestionTrial> TableQuestions { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetSystemCalculateQuestionsOutDto : ReadingQuestionSystemView
|
||||
{
|
||||
|
||||
public List<ReadingTableQuestionSystem> TableQuestions { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCalculateQuestionsOutDto>> GetCalculateQuestions(GetCalculateQuestionsInDto inDto)
|
||||
public async Task<(List<GetCalculateQuestionsOutDto>,bool)> GetCalculateQuestions(GetCalculateQuestionsInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionTrialRepository
|
||||
|
||||
|
@ -98,7 +98,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
.OrderBy(x => x.ShowOrder)
|
||||
.ProjectTo<GetCalculateQuestionsOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
||||
var tablequestion=await _readingTableQuestionTrialRepository.Where(x=>x.TrialCriterionId==inDto.TrialCriterionId).ToListAsync();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
x.TableQuestions = tablequestion.Where(y => y.ReadingQuestionId == x.Id).ToList();
|
||||
});
|
||||
|
||||
return (result,true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -107,7 +115,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCalculateQuestionsOutDto>> GetSystemCalculateQuestions(GetSystemCalculateQuestionsInDto inDto)
|
||||
public async Task<List<GetSystemCalculateQuestionsOutDto>> GetSystemCalculateQuestions(GetSystemCalculateQuestionsInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionSystemRepository
|
||||
|
||||
|
@ -115,7 +123,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
.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<GetCalculateQuestionsOutDto>(_mapper.ConfigurationProvider).ToListAsync() ;
|
||||
.ProjectTo<GetSystemCalculateQuestionsOutDto>(_mapper.ConfigurationProvider).ToListAsync() ;
|
||||
|
||||
|
||||
var tablequestion = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).ToListAsync();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
||||
x.TableQuestions = tablequestion.Where(y => y.ReadingQuestionId == x.Id).ToList();
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -225,12 +225,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
.ForMember(d => d.DependShowOrder, u => u.MapFrom(s => s.DependParentQuestion.ShowOrder));
|
||||
|
||||
CreateMap<ReadingQuestionTrial, GetCalculateQuestionsOutDto>()
|
||||
.ForMember(d => d.TableQuestions, u => u.MapFrom(s => s.ReadingTableQuestionTrialList));
|
||||
CreateMap<ReadingQuestionTrial, GetCalculateQuestionsOutDto>();
|
||||
|
||||
|
||||
CreateMap<ReadingQuestionSystem, GetCalculateQuestionsOutDto>()
|
||||
.ForMember(d => d.TableQuestions, u => u.MapFrom(s => s.ReadingTableQuestionTrialList));
|
||||
CreateMap<ReadingQuestionSystem, GetCalculateQuestionsOutDto>();
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingTableQuestionTrialView>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore())
|
||||
|
|
Loading…
Reference in New Issue