zs
2025-05-09 7248e9a20635e8c61176531bde570f577aa35e5b
HIAWms/server/src/CMS.Plugin.HIAWms.Application/Implements/WmsPlaceAppService.cs
@@ -1,13 +1,14 @@
using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsPlaces;
using CMS.Plugin.HIAWms.Application.Contracts.Services;
using CMS.Plugin.HIAWms.Domain.WmsPlaces;
using CMS.Plugin.HIAWms.Domain.Shared;
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;
using Volo.Abp.ObjectExtending;
using CMS.Plugin.HIAWms.Domain.Shared.Util;
namespace CMS.Plugin.HIAWms.Application.Implements;
@@ -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;
    }