| | |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStores; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Dtos.WmsStore; |
| | | using CMS.Plugin.HIAWms.Application.Contracts.Services; |
| | | using CMS.Plugin.HIAWms.Domain.WmsStores; |
| | | using CMS.Plugin.HIAWms.Domain.Shared; |
| | |
| | | using Volo.Abp.Application.Dtos; |
| | | using Volo.Abp.Data; |
| | | using Volo.Abp.ObjectExtending; |
| | | using CmsQueryExtensions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Application.Implements; |
| | | |
| | |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public virtual async Task<PagedResultDto<WmsStoreDto>> GetListAsync(GetWmsStoresInput input) |
| | | public virtual async Task<PagedResultDto<WmsStoreDto>> GetListAsync(GetWmsStoreInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | |
| | | } |
| | | |
| | | var specification = new WmsStoreSpecification(input.Name); |
| | | var count = await _wmsstoreRepository.GetCountAsync(input.Filter, specification); |
| | | var list = await _wmsstoreRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | var store = ObjectMapper.Map<GetWmsStoreInput, WmsStore>(input); |
| | | var count = await _wmsstoreRepository.GetCountAsync(store,input.Filter, specification); |
| | | var list = await _wmsstoreRepository.GetListAsync(store,input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification); |
| | | |
| | | return new PagedResultDto<WmsStoreDto>(count, ObjectMapper.Map<List<WmsStore>, List<WmsStoreDto>>(list)); |
| | | } |
| | |
| | | /// <inheritdoc /> |
| | | public virtual async Task AdjustSortAsync(Guid id, int sort) |
| | | { |
| | | var list = await _wmsstoreRepository.GetListAsync(nameof(WmsStore.Sort)); |
| | | var list = await _wmsstoreRepository.GetListAsync(null,nameof(WmsStore.Sort)); |
| | | if (list != null && list.Any()) |
| | | { |
| | | var initSort = 1; |
| | |
| | | } |
| | | |
| | | /// <inheritdoc /> |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsStoresInput input) |
| | | public async Task<(Dictionary<string, object> Sheets, string FileName)> ExportAsync(GetWmsStoreInput input) |
| | | { |
| | | Check.NotNull(input, nameof(input)); |
| | | |
| | |
| | | } |
| | | |
| | | var specification = new WmsStoreSpecification(input.Name); |
| | | var list = await _wmsstoreRepository.GetListAsync(input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var store = ObjectMapper.Map<GetWmsStoreInput, WmsStore>(input); |
| | | var list = await _wmsstoreRepository.GetListAsync(store, input.Sorting, input.MaxResultCount, input.SkipCount, input.Filter, specification, includeDetails: true); |
| | | var result = ObjectMapper.Map<List<WmsStore>, List<WmsStoreDto>>(list); |
| | | |
| | | var sheets = new Dictionary<string, object> |
| | | { |
| | | ["配置"] = result.Select(x => x.GetExportData()).ToList(), |
| | | ["配置"] = ExportHelper.ConvertListToExportData(result), |
| | | }; |
| | | |
| | | var fileName = result.Count > 1 ? "WmsStore列表" : result.Count == 1 ? result.First()?.StoreCode : "WmsStore模版"; |