fix 编辑时校验移除

This commit is contained in:
2026-03-30 17:49:46 +08:00
parent 33c0304e55
commit ad53820425

View File

@@ -87,7 +87,7 @@ public class GainfoOutsourceRequest : IValidatableObject
yield return new ValidationResult($"工号[{Code}]不能包含中文", new[] { nameof(Code) }); yield return new ValidationResult($"工号[{Code}]不能包含中文", new[] { nameof(Code) });
} }
if (Code.StartsWith("LS")) if (!Id.HasValue && Code.StartsWith("LS"))
{ {
yield return new ValidationResult($"工号[{Code}]不能以LS开头", new[] { nameof(Code) }); yield return new ValidationResult($"工号[{Code}]不能以LS开头", new[] { nameof(Code) });
} }