修改一版

Uat_Study
he 2022-06-16 16:33:07 +08:00
parent 33c47501f2
commit 9149bdb7ff
3 changed files with 19 additions and 4 deletions

View File

@ -67,6 +67,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string Answer { get; set; }
}
public class GetTrialReadingQuestionDto
{
public Guid Id { get; set; }
public string GroupName { get; set; }
List<GetTrialReadingQuestionOutDto> Questions { get; set; }
}
public class GetTrialReadingQuestionOutDto
{
@ -112,6 +122,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 类型值
/// </summary>
public string TypeValue { get; set; }
public List<GetTrialReadingQuestionOutDto> Childrens { get; set; }
}

View File

@ -80,6 +80,9 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task<List<GetTrialReadingQuestionOutDto>> GetTrialReadingQuestion(GetTrialReadingQuestionInDto inDto)
{
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId).ToListAsync();
//List<GetTrialReadingQuestionDto> groupNames
var result = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.CriterionId)
.ProjectTo<GetTrialReadingQuestionOutDto>(_mapper.ConfigurationProvider).ToListAsync();
return result;
@ -92,11 +95,12 @@ namespace IRaCIS.Application.Services
///// <returns></returns>
//public async Task<IResponseOutput> SubmitVisitTaskQuestions(SubmitVisitTaskQuestionsInDto InDto)
//{
//}
}

View File

@ -249,7 +249,7 @@ namespace IRaCIS.Application.Services
{
var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null)
.Select(x => x.ReadingQuestionCriterionSystemId);
var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.IsCompleteConfig).Include(x=>x.ReadingQuestionSystemList).ToListAsync();
var needAddSystemDataList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.Dictionary.IsEnable).Include(x=>x.ReadingQuestionSystemList).ToListAsync();
List<ReadingQuestionCriterionTrial> needAddCriterionList = new List<ReadingQuestionCriterionTrial>();
List<ReadingQuestionTrial> needAddQuestionList = new List<ReadingQuestionTrial>();
needAddSystemDataList.ForEach(x =>
@ -536,7 +536,6 @@ namespace IRaCIS.Application.Services
{
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == "group")
.Select(x => x.GroupName).ToListAsync();
return result;
}