From 7248e9a20635e8c61176531bde570f577aa35e5b Mon Sep 17 00:00:00 2001 From: zs <zhousong@weben-smart.com> Date: 周五, 09 5月 2025 15:02:51 +0800 Subject: [PATCH] 添加组盘入库 --- HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs b/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs index 4dcc903..2615a9d 100644 --- a/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs +++ b/HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs @@ -4,6 +4,7 @@ using CMS.Plugin.HIAWms.Domain.Shared.WmsPlaces; using CMS.Plugin.HIAWms.Domain.WmsPlaces; using CmsQueryExtensions; +using System.Text.RegularExpressions; using Volo.Abp; using Volo.Abp.Application.Dtos; using Volo.Abp.Data; @@ -316,6 +317,11 @@ { Check.NotNull(input, nameof(input)); Check.NotNullOrWhiteSpace(input.PlaceNo, "缂栧彿", WmsPlaceConsts.MaxCodeLength); + string pattern = @"^\d+-\d+$"; + if (input.StorageTypeNo == Domain.Shared.Enums.PlaceTypeEnum.YUANLIAOKUWEI && !Regex.IsMatch(input.PlaceNo, pattern)) + { + throw new UserFriendlyException("搴撲綅缂栧彿鏍煎紡閿欒"); + } Check.Length(input.Remark, "澶囨敞", WmsPlaceConsts.MaxRemarkLength); return Task.CompletedTask; } -- Gitblit v1.9.3