zs
2025-05-07 4456f43c6c73185a9f7ce46cdcdf94ab2053f02e
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;
    }