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> /// </summary>
public string QuestionName { get; set; } public string QuestionName { get; set; }
public string PageName { get; set; }
/// <summary> /// <summary>
/// 答案分组 /// 答案分组

View File

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