Uat_Study
parent
8a9f48d9b4
commit
f365c19d4a
|
@ -526,6 +526,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string PageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 答案分组
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue