Uat_Study
he 2022-11-15 17:30:04 +08:00
parent 5cf56f529a
commit 5684a7b389
2 changed files with 32 additions and 2 deletions

View File

@ -1068,6 +1068,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[NotDefault]
public Guid QuestionId { get; set; }
public string Type { get; set; }
}
@ -1076,6 +1078,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[NotDefault]
public Guid TrialCriterionId { get; set; }
public string Type { get; set; }
}
public class GetTrialGroupNameListInDto

View File

@ -86,7 +86,7 @@ namespace IRaCIS.Application.Services
var result =await _readingQuestionTrialRepository
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
.Where(x => x.Type == "number")
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateQuestionsOutDto
(){
@ -111,7 +111,7 @@ namespace IRaCIS.Application.Services
var result = await _readingTableQuestionTrialRepository
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
.Where(x=>x.Type== "number")
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateTableQuestionsOutDto
()
@ -125,6 +125,31 @@ 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