| | |
| | | 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; |
| | | |
| | |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsPlaceDto>> GetListAsync(GetWmsPlacesInput input) |
| | | public virtual async Task<PagedResultDto<WmsPlaceDto>> GetListAsync(GetWmsMaterialInfoInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | |
| | | } |
| | | |
| | | var specification = new WmsPlaceSpecification(input.Name); |
| | | var place = ObjectMapper.Map<GetWmsPlacesInput, WmsPlace>(input); |
| | | var place = ObjectMapper.Map<GetWmsMaterialInfoInput, WmsPlace>(input); |
| | | var count = await _wmsplaceRepository.GetCountAsync(place,input.Filter, specification); |
| | | var list = await _wmsplaceRepository.GetListAsync(place, input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | |
| | | wmsplace.RedundantField2 = input.RedundantField2; |
| | | wmsplace.RedundantField3 = input.RedundantField3; |
| | | wmsplace.Remark = input.Remark; |
| | | wmsplace.IsDisabled = input.IsDisabled; |
| | | |
| | | await _wmsplaceRepository.UpdateAsync(wmsplace); |
| | | |
| | |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsPlacesInput input) |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsMaterialInfoInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | |
| | | } |
| | | |
| | | var specification = new WmsPlaceSpecification(input.Name); |
| | | var place = ObjectMapper.Map<GetWmsPlacesInput, WmsPlace>(input); |
| | | var place = ObjectMapper.Map<GetWmsMaterialInfoInput, WmsPlace>(input); |
| | | var list = await _wmsplaceRepository.GetListAsync(place, input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsPlace>, List<WmsPlaceDto>>(list); |
| | | |
| | |
| | | { |
| | | 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; |
| | | } |