Browse Source

根据库存查询库存余额方法修改

master
lvzb 1 year ago
parent
commit
987f0dbc02
  1. 8
      be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs
  2. 4
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs

8
be/Modules/Inventory/src/Win_in.Sfs.Wms.Inventory.Application/Balances/BalanceAppService.cs

@ -484,7 +484,15 @@ public class BalanceAppService
var locationDto = await _locationAclService.GetByCodeAsync(location).ConfigureAwait(false); var locationDto = await _locationAclService.GetByCodeAsync(location).ConfigureAwait(false);
if (locationDto != null) if (locationDto != null)
{ {
if(input.LocationAreas==null)
{
input.LocationAreas = new List<string>();
}
input.LocationAreas.Add(locationDto.AreaCode); input.LocationAreas.Add(locationDto.AreaCode);
if (input.LocationTypes == null)
{
input.LocationTypes = new List<EnumLocationType>();
}
input.LocationTypes.Add(locationDto.Type); input.LocationTypes.Add(locationDto.Type);
} }
} }

4
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Requests/UnplannedIssueRequests/UnplannedIssueRequestForDongyangAppService.cs

@ -107,8 +107,6 @@ public class UnplannedIssueRequestForDongyangAppService : UnplannedIssueRequestA
RecommendBalanceRequestInput input = new RecommendBalanceRequestInput(); RecommendBalanceRequestInput input = new RecommendBalanceRequestInput();
input.ItemCode = detail.ItemCode; input.ItemCode = detail.ItemCode;
input.Locations = new List<string>() { detail.LocationCode }; input.Locations = new List<string>() { detail.LocationCode };
input.LocationAreas = new List<string>() { locationDto.AreaCode };
input.LocationTypes = new List<EnumLocationType> { locationDto.Type };
input.Qty = detail.Qty; input.Qty = detail.Qty;
input.Statuses = new List<EnumInventoryStatus> { EnumInventoryStatus.OK }; input.Statuses = new List<EnumInventoryStatus> { EnumInventoryStatus.OK };
var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false); var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false);
@ -135,8 +133,6 @@ public class UnplannedIssueRequestForDongyangAppService : UnplannedIssueRequestA
RecommendBalanceRequestInput input = new RecommendBalanceRequestInput(); RecommendBalanceRequestInput input = new RecommendBalanceRequestInput();
input.ItemCode = detail.ItemCode; input.ItemCode = detail.ItemCode;
input.Locations = new List<string>() { detail.LocationCode }; input.Locations = new List<string>() { detail.LocationCode };
input.LocationAreas=new List<string>() { locationDto.AreaCode };
input.LocationTypes= new List<EnumLocationType> { locationDto.Type};
input.Qty = detail.Qty; input.Qty = detail.Qty;
input.Statuses=new List<EnumInventoryStatus> { EnumInventoryStatus.OK }; input.Statuses=new List<EnumInventoryStatus> { EnumInventoryStatus.OK };
var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false); var balanceLst = await _balanceAppService.GetRecommendBalancesByLocationsAsync(input).ConfigureAwait(false);

Loading…
Cancel
Save