Browse Source

修改提示

dev_DY_CC
郑勃旭 12 months ago
parent
commit
4322d5cbc9
  1. 53
      be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs

53
be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Inventories/BalanceController.cs

@ -499,33 +499,40 @@ public class BalanceController : AbpController
{ {
var productionLineItemDto = await _productionLineItemAppService.GetByProductLineCodeAndItemCodeAsync(productLine, itemCode).ConfigureAwait(false); var productionLineItemDto = await _productionLineItemAppService.GetByProductLineCodeAndItemCodeAsync(productLine, itemCode).ConfigureAwait(false);
var locationList = new List<string>(); if (productionLineItemDto != null )
if (productionLineItemDto.RawLocationCodeListJson != null&&
productionLineItemDto.RawLocationCodeListJson.Length > 0)
{ {
var temp=JsonSerializer.Deserialize<List<string>>(productionLineItemDto.RawLocationCodeListJson); var locationList = new List<string>();
locationList.AddRange(temp); if (productionLineItemDto.RawLocationCodeListJson != null &&
} productionLineItemDto.RawLocationCodeListJson.Length > 0)
{
var temp = JsonSerializer.Deserialize<List<string>>(productionLineItemDto.RawLocationCodeListJson);
locationList.AddRange(temp);
}
if (productionLineItemDto.ProductLocationCodeListJson != null && if (productionLineItemDto.ProductLocationCodeListJson != null &&
productionLineItemDto.ProductLocationCodeListJson.Length > 0) productionLineItemDto.ProductLocationCodeListJson.Length > 0)
{ {
var temp = JsonSerializer.Deserialize<List<string>>(productionLineItemDto.ProductLocationCodeListJson); var temp = JsonSerializer.Deserialize<List<string>>(productionLineItemDto.ProductLocationCodeListJson);
locationList.AddRange(temp); locationList.AddRange(temp);
} }
//获取可用库存 //获取可用库存
var input = new RecommendBalanceRequestInput var input = new RecommendBalanceRequestInput
{ {
ItemCode = itemCode, ItemCode = itemCode,
Qty = decimal.MaxValue, Qty = decimal.MaxValue,
Statuses = new EditableList<EnumInventoryStatus> { EnumInventoryStatus.OK }, Statuses = new EditableList<EnumInventoryStatus> { EnumInventoryStatus.OK },
Locations = locationList, Locations = locationList,
IsPackingCode = isPackingCode IsPackingCode = isPackingCode
}; };
var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false); var usableList = await _balanceAppService.GetUsableListAsync(input).ConfigureAwait(false);
return await SortByFifoAsync(usableList).ConfigureAwait(false); return await SortByFifoAsync(usableList).ConfigureAwait(false);
}
else
{
throw new UserFriendlyException($"未找到 生产线【{productLine}】零件【{itemCode}】关系");
}
} }
/// <summary> /// <summary>

Loading…
Cancel
Save