Uat_Study
parent
5684a7b389
commit
afad336bb9
|
@ -1052,6 +1052,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid QuestionId { get; set; }
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
public string QuestionName{ get; set; }
|
public string QuestionName{ get; set; }
|
||||||
|
|
||||||
|
public List<CalculateQuestion> TableQuestions { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class CalculateQuestion
|
||||||
|
{
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public string QuestionName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace IRaCIS.Application.Services
|
||||||
#region 获取计算问题
|
#region 获取计算问题
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取数值问题
|
/// 获取问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -95,12 +95,30 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var tablequestion = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId && x.Type == "number").Select(x =>
|
||||||
|
new
|
||||||
|
{
|
||||||
|
QuestionId= x.Id,
|
||||||
|
x.ReadingQuestionId,
|
||||||
|
x.QuestionName
|
||||||
|
}).ToListAsync();
|
||||||
|
result.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.TableQuestions = tablequestion.Where(y => x.QuestionId == y.ReadingQuestionId).Select(y => new CalculateQuestion()
|
||||||
|
{
|
||||||
|
|
||||||
|
QuestionId = y.QuestionId,
|
||||||
|
QuestionName = y.QuestionName
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
});
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取表格数值问题
|
/// 获取表格问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -125,30 +143,7 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取标准所有表格数值问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<GetCalculateTableQuestionsOutDto>> GetCalculateAllTableQuestions(GetCalculateQuestionsInDto inDto)
|
|
||||||
{
|
|
||||||
|
|
||||||
var result = await _readingTableQuestionTrialRepository
|
|
||||||
|
|
||||||
.Where(x => x.TrialCriterionId == inDto.TrialCriterionId)
|
|
||||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
|
||||||
.OrderBy(x => x.ShowOrder)
|
|
||||||
.Select(x => new GetCalculateTableQuestionsOutDto
|
|
||||||
()
|
|
||||||
{
|
|
||||||
TableQuestionId = x.Id,
|
|
||||||
TableQuestionName = x.QuestionName
|
|
||||||
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue