From a3b4b75eb85821f4d87fc589b69343ca666223cb Mon Sep 17 00:00:00 2001 From: ltx <1006158920@qq.com> Date: Tue, 13 Oct 2026 09:02:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=97=B6=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E5=9B=9E=E5=A1=AB=E5=8E=9F=E8=AF=84=E5=88=86=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=89=8B=E5=B7=A5=E5=BD=95=E5=85=A5=E5=80=BC=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_Event.Application/Judge/JudgeScoringController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/YD_Event.Application/Judge/JudgeScoringController.cs b/YD_Event.Application/Judge/JudgeScoringController.cs index 251d6f0..dc93f53 100644 --- a/YD_Event.Application/Judge/JudgeScoringController.cs +++ b/YD_Event.Application/Judge/JudgeScoringController.cs @@ -364,7 +364,7 @@ public class JudgeScoringController : IDynamicApiController var source = draft ?? submitted; var details = source == null ? new List() - : await _detailRepository.GetListAsync(x => x.ScoreSheetId == source.Id); + : await _detailRepository.GetListAsync(x => x.ScoreSheetId == source.Id && !x.DeleteMark); var legacyInteraction = roleType == "T" && (ctx.Config.RuleType.ToUpperInvariant() is "FREESTYLE_DOUBLE_SYNC" or "FREESTYLE_QUAD_SYNC") ? details.FirstOrDefault(x => x.ItemCode == "REQ_INTERACTION") : null; @@ -434,6 +434,9 @@ public class JudgeScoringController : IDynamicApiController Items = definitions.Select(definition => { var line = preview.Lines.FirstOrDefault(x => string.Equals(x.ItemCode, definition.ItemCode, StringComparison.OrdinalIgnoreCase)); + // 修正时必须回填原评分单的手工录入值。预览用于重算自动项,不能作为历史录入的唯一来源。 + var savedInput = definition.IsAuto ? null : details.FirstOrDefault(x => + !x.IsAutoGenerated && string.Equals(x.ItemCode, definition.ItemCode, StringComparison.OrdinalIgnoreCase)); return new JudgeScoreItemDto { ScoreRuleItemId = definition.Item.Id, @@ -463,8 +466,8 @@ public class JudgeScoringController : IDynamicApiController RequiredTarget = definition.RequiredTarget, RequiredAsCategory = definition.RequiredAsCategory, Sort = definition.Item.Sort, - InputValue = line?.InputValue, - CountValue = line?.CountValue, + InputValue = savedInput?.InputValue ?? line?.InputValue, + CountValue = savedInput?.CountValue ?? line?.CountValue, Subtotal = line?.Subtotal ?? 0m }; }).ToList(),