仲裁验证修改

Test_IRC_Net8
he 2025-12-10 10:43:19 +08:00
parent 2b24ce723e
commit 999fde1f5c
2 changed files with 11 additions and 1 deletions

View File

@ -565,7 +565,9 @@ namespace IRaCIS.Core.Application.Service
{
if (indto.Id != null)
{
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
var isArbitrationReading = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == indto.ReadingQuestionCriterionTrialId).Select(x => x.IsArbitrationReading).FirstOrDefaultAsync();
if (isArbitrationReading && (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)))
{
//---当前问题已经设置了裁判标准了,修改失败
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);

View File

@ -655,6 +655,14 @@ namespace IRaCIS.Core.Application
});
if (!inDto.IsArbitrationReading)
{
await _readingQuestionTrialRepository.UpdatePartialFromQueryAsync(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId, x => new ReadingQuestionTrial()
{
JudgeType = JudgeTypeEnum.None
});
}
List<TrialCriterionKeyFile> keyFileList = new List<TrialCriterionKeyFile>();
await _trialCriterionKeyFileRepository.BatchDeleteNoTrackingAsync(t => t.TrialCriterionId == inDto.TrialReadingCriterionId);
if (inDto.KeyFileList != null && inDto.KeyFileList.Count > 0)