修改一版
parent
7eca540440
commit
e9e0e37694
|
@ -370,6 +370,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetCustomTableQuestionAnswerInDto
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetReadingTableQuestionOutDto
|
public class GetReadingTableQuestionOutDto
|
||||||
{
|
{
|
||||||
|
|
|
@ -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>
|
||||||
/// 获取表格问题及答案 只返回表格问题(任务和标准)
|
/// 获取表格问题及答案 只返回表格问题(任务和标准)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue