Uat_Study
he 2022-07-14 16:06:22 +08:00
parent 8a9f48d9b4
commit f365c19d4a
2 changed files with 13 additions and 2 deletions

View File

@ -526,6 +526,7 @@ namespace IRaCIS.Core.Application.Contracts
/// </summary>
public string QuestionName { get; set; }
public string PageName { get; set; }
/// <summary>
/// 答案分组

View File

@ -83,14 +83,14 @@ namespace IRaCIS.Core.Application
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<TrialJudgeQuestion>> GetTrialReadingJudgeList(GetTrialReadingInfoInDto inDto)
public async Task<(List<TrialJudgeQuestion>,object)> GetTrialReadingJudgeList(GetTrialReadingInfoInDto inDto)
{
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
if (trialCriterion == null)
{
throw new BusinessValidationFailedException("请先确认一个项目标准。");
}
return await _readingQuestionTrialRepository
var judgeQuestionList= await _readingQuestionTrialRepository
.WhereIf(trialCriterion.FormType==FormType.SinglePage,x=>x.ReadingCriterionPageId==null)
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null)
.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion && x.TrialId == inDto.TrialId&&x.ReadingQuestionCriterionTrialId== trialCriterion.Id)
@ -100,9 +100,19 @@ namespace IRaCIS.Core.Application
AnswerGroup = x.AnswerGroup,
JudgeType = x.JudgeType,
QuestionId = x.Id,
PageName=x.ReadingCriterionPage.PageName,
QuestionName = x.QuestionName,
ReadingQuestionCriterionTrialId = x.ReadingQuestionCriterionTrialId
}).ToListAsync();
var signTime = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => x.ReadingInfoSignTime).FirstOrDefaultAsync();
return (judgeQuestionList, new
{
IsSign= signTime!=null,
});
}
/// <summary>