修改一版
This commit is contained in:
@@ -76,6 +76,17 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
||||
{
|
||||
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
||||
|
||||
var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion)
|
||||
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
||||
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
||||
|
||||
if (judgeCount == 0&&(inDto.ArbitrationRule== ArbitrationRule.Visit|| inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||
{
|
||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||
}
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial()
|
||||
{
|
||||
ArbitrationRule = inDto.ArbitrationRule,
|
||||
|
||||
Reference in New Issue
Block a user