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

Loading…
Cancel
Save