|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | } | 
|---|