修改
This commit is contained in:
@@ -593,6 +593,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SetTrialReadingCriterionInDto
|
||||
|
||||
@@ -85,7 +85,15 @@ namespace IRaCIS.Core.Application
|
||||
[HttpPost]
|
||||
public async Task<List<TrialJudgeQuestion>> GetTrialReadingJudgeList(GetTrialReadingInfoInDto inDto)
|
||||
{
|
||||
return await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion && x.TrialId == inDto.TrialId)
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
||||
if (trialCriterion == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("请先确认一个项目标准。");
|
||||
}
|
||||
return 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)
|
||||
.Select(x => new TrialJudgeQuestion()
|
||||
{
|
||||
AnswerCombination = x.AnswerCombination,
|
||||
|
||||
Reference in New Issue
Block a user