diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs index a7babf41a..d0c19e6a6 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceManager.cs @@ -451,14 +451,14 @@ public class BalanceManager : DomainService, IBalanceManager { expression = expression.And(p => p.ExpireDate > DateTime.Now); } - //筛选有效库区 - if (validLocationAreas.Any() ) - { - if (!string.IsNullOrEmpty(validLocationAreas[0])) - { - expression = expression.And(p => validLocationAreas.Contains(p.LocationArea)); - } - } + //筛选有效库区 2023-6-29 李智慧 王旭 袁静雯 确认不需要做区域校验 + //if (validLocationAreas.Any()) + //{ + // if (!string.IsNullOrEmpty(validLocationAreas[0])) + // { + // expression = expression.And(p => validLocationAreas.Contains(p.LocationArea)); + // } + //} var allBalances = await (await _balanceRepository.GetDbSetAsync().ConfigureAwait(false)) .Where(expression) @@ -606,7 +606,7 @@ public class BalanceManager : DomainService, IBalanceManager Logger.LogDebug($"{traceId}:RequestQty:{requestQty},RemainQty:{remainingQty},AvailableQty:{balanceQty},RecommendQty:{recommendQty}"); return recommendQty; } - + /// /// 计算推荐库位 /// diff --git a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs index aafbf6dba..85dc6083d 100644 --- a/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs +++ b/be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Domain/Balances/BalanceValidateExtension.cs @@ -108,13 +108,12 @@ public static class BalanceValidateExtension /// public static List SortByFifo(this List balances) { - return balances .OrderBy(p => p.Lot) - .ThenBy(p => p.ArriveDate) - .ThenByDescending(p => p.Qty) - .ThenBy(p => p.LocationCode) - .ThenBy(p => p.PackingCode) + //.ThenBy(p => p.ArriveDate) + //.ThenByDescending(p => p.Qty) + //.ThenBy(p => p.LocationCode) + //.ThenBy(p => p.PackingCode) .ToList(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs index 2de4b8ab2..84c8f5aa8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/BackFlusNotes/IBackFlushNoteAppService.cs @@ -9,5 +9,5 @@ ISfsStoreMasterReadOnlyAppServiceBase> CreateManyAsync(List inputs); - Task> GetListByProductRecycleNumber(string number); + Task> GetListByProductRecycleNumberAsync(string number); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs index 07e300af2..506fbad1a 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/BackFlushNotes/BackFlushNoteAppService.cs @@ -32,7 +32,7 @@ public class BackFlushNoteAppService : { var entities = ObjectMapper.Map, List>(inputs); - entities = await ProcessingBackFlushNoteData(entities).ConfigureAwait(false); + entities = await ProcessingBackFlushNoteDataAsync(entities).ConfigureAwait(false); entities = await _backFlushNoteManager.CreateManyAsync(entities).ConfigureAwait(false); @@ -42,7 +42,7 @@ public class BackFlushNoteAppService : } [HttpGet("by-product-recyle-number")] - public async Task> GetListByProductRecycleNumber(string number) + public async Task> GetListByProductRecycleNumberAsync(string number) { var entities = await _repository.GetListAsync(t => t.ProductRecycleNumber == number, true) .ConfigureAwait(false); @@ -54,12 +54,12 @@ public class BackFlushNoteAppService : /// 处理数据 /// /// - private async Task> ProcessingBackFlushNoteData(List backFlushNotes) + private async Task> ProcessingBackFlushNoteDataAsync(List backFlushNotes) { if (backFlushNotes != null && backFlushNotes.Count > 0) { var itemCodes = backFlushNotes.Select(t => t.ItemCode); - List itemBasicDtos = await _itemBasicAppService.GetByCodesAsync(itemCodes).ConfigureAwait(false); + var itemBasicDtos = await _itemBasicAppService.GetByCodesAsync(itemCodes).ConfigureAwait(false); backFlushNotes.ForEach(t => { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs index 042e52d93..d6a62e406 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/CountNotes/CountNoteAppService.cs @@ -95,6 +95,8 @@ public class CountNoteAppService : detail.LocationGroup = locationDto.LocationGroupCode; detail.LocationErpCode = locationDto.ErpLocationCode; detail.WarehouseCode = locationDto.WarehouseCode; + detail.PackingCode=detail.PackingCode ?? ""; + detail.Lot = detail.Lot ?? ""; detail.ItemCode = itemcBasicDto.Code; detail.ItemDesc1 = itemcBasicDto.Desc1; diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs index e927211b9..c26fbd720 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Requests/CountAdjustRequestEventHandler.cs @@ -50,6 +50,12 @@ public class CountAdjustRequestEventHandler { if (entity.DirectCreateNote) { + entity.Details.ForEach(p => + { + p.PackingCode = p.PackingCode ?? ""; + p.Lot = p.Lot ?? ""; + p.ContainerCode = p.ContainerCode ?? ""; + }); await ThawBalancesAsync(entity).ConfigureAwait(false); var note = await BuildCountAdjustNoteCreateInputAsync(entity).ConfigureAwait(false);