| | |
| | | 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 count = await _wmsplaceRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsplaceRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | 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); |
| | | |
| | | return new PagedResultDto<WmsPlaceDto>(count, ObjectMapper.Map<List<WmsPlace>, List<WmsPlaceDto>>(list)); |
| | | } |
| | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsplaceRepository.GetListAsync(nameof(WmsPlace.Sort)); |
| | | var list = await _wmsplaceRepository.GetListAsync(null,nameof(WmsPlace.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | |
| | | } |
| | | |
| | | /// <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 list = await _wmsplaceRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | 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); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["配置"] = result.Select(x => x.GetExportData()).ToList(), |
| | | ["配置"] = ExportHelper.ConvertListToExportData(result), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsPlace列表" : result.Count == 1 ? result.First()?.PlaceNo : "WmsPlace模版"; |