From 41d3d785b88d168e93b6c41c6f99374b2e3a1ca3 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 4 Aug 2022 16:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs index 1eb3379ed..064deaf6b 100644 --- a/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs +++ b/IRaCIS.Core.Application/Service/QC/TrialQCQuestionService.cs @@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Contracts { await VerifyIsQCConfirmedAsync(trialId); - var maxShowOrder = await _trialQcQuestionRepository.Where(x => x.TrialId == trialId).MaxAsync(x => x.ShowOrder); + var maxShowOrder = await _trialQcQuestionRepository.Where(x => x.TrialId == trialId).OrderByDescending(x=>x.ShowOrder).Select(x => x.ShowOrder).FirstOrDefaultAsync(); batchList.ForEach(x => { x.ShowOrder= maxShowOrder++;