仲裁验证修改
parent
2b24ce723e
commit
999fde1f5c
|
|
@ -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"]);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue