Compare commits
No commits in common. "900f4dfb6462a59088eace03e2799c065c64d471" and "026f63c730b1648da408db07c9c44dab757a7ba5" have entirely different histories.
900f4dfb64
...
026f63c730
|
|
@ -1546,20 +1546,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public QuestionClassify? QuestionClassify { get; set; }
|
public QuestionClassify? QuestionClassify { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetFilterTableQuestionInDto
|
|
||||||
{
|
|
||||||
public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public Guid VisitTaskId { get; set; }
|
|
||||||
|
|
||||||
public Guid QuestionId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 问题分类
|
|
||||||
/// </summary>
|
|
||||||
public QuestionClassify? QuestionClassify { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
public class GetHistoryGlobalInfoOutDto
|
public class GetHistoryGlobalInfoOutDto
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1401,38 +1401,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取单个表格问题及答案 过滤问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<TrialReadQuestionData> GetFilterTableQuestion(GetFilterTableQuestionInDto inDto)
|
|
||||||
{
|
|
||||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
|
||||||
var tableAnswers = await _readingTableQuestionAnswerRepository
|
|
||||||
.ProjectTo<ReadingTableQuestionAnswerInfo>(_mapper.ConfigurationProvider)
|
|
||||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
|
||||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
|
||||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
|
||||||
var questionPage = await GetReadingTableQuestion(
|
|
||||||
new GetReadingTableQuestionOrAnswerInDto()
|
|
||||||
{
|
|
||||||
TrialReadingCriterionId = taskinfo.TrialReadingCriterionId,
|
|
||||||
TaskId = inDto.VisitTaskId,
|
|
||||||
TableAnswers = tableAnswers,
|
|
||||||
TableAnsweRowInfos = tableAnsweRowInfos,
|
|
||||||
OrganInfos = organList,
|
|
||||||
QuestionClassify = inDto.QuestionClassify,
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
var result = questionPage.SinglePage.SelectMany(x => x.Childrens).Where(x => x.Id == inDto.QuestionId).FirstOrDefault();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取自定义问题以及答案
|
/// 获取自定义问题以及答案
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue