修改一版

Uat_Study
he 2022-12-06 10:35:00 +08:00
parent 7eca540440
commit e9e0e37694
2 changed files with 26 additions and 0 deletions

View File

@ -370,6 +370,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
}
public class GetCustomTableQuestionAnswerInDto
{
[NotDefault]
public Guid VisitTaskId { get; set; }
}
public class GetReadingTableQuestionOutDto
{

View File

@ -508,6 +508,27 @@ namespace IRaCIS.Application.Services
}); ;
}
/// <summary>
/// 获取自定义问题以及答案
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<(GetReadingTableQuestionOutDto,bool)> GetCustomTableQuestionAnswer(GetCustomTableQuestionAnswerInDto 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();
return (await this.GetReadingTableQuestion(taskInfo.TrialReadingCriterionId, taskInfo.Id, tableAnswers, tableAnsweRowInfos, true), true);
}
/// <summary>
/// 获取表格问题及答案 只返回表格问题(任务和标准)
/// </summary>