master
liuwf 1 year ago
parent fc13dea344
commit c9014a6c6f

@ -2434,19 +2434,21 @@ namespace Khd.Core.Wcs.Wcs
{
row = location.locRow - 1;//5
}
//对应的浅库位
WmsBaseLocation? wmsBaseLocation = AllWmsBaseLocations
.Where(t => t.locRow == row)
.Where(t => t.locColumn == location.locColumn)
.Where(t => t.warehouseId == location.warehouseId).FirstOrDefault();
if (wmsBaseLocation != null && !string.IsNullOrEmpty(wmsBaseLocation.containerCode) && wmsBaseLocation.locationStatus == "1")
{
// 浅库位有托盘
WmsRawStock? wmsRawStock = dbContext.WmsRawStock.FirstOrDefault(t => t.locationCode == wmsBaseLocation.locationCode);
if (wmsRawStock != null)
{
// 寻找目的库位
WmsBaseLocation? toLocation = AllWmsBaseLocations.Where(t => t.warehouseId == location.warehouseId)
.Where(t => t.locDeep == 1)
.Where(t => string.IsNullOrEmpty(t.containerCode)).FirstOrDefault();
.Where(t => string.IsNullOrEmpty(t.containerCode) && t.locationStatus == "1").FirstOrDefault();
toLocation ??= AllWmsBaseLocations.Where(t => t.warehouseId == location.warehouseId)
.Where(t => t.warehouseId != location.locationId)
.Where(t => string.IsNullOrEmpty(t.containerCode))
@ -2514,12 +2516,12 @@ namespace Khd.Core.Wcs.Wcs
_logger.Info($"{wmsBaseLocation.locationCode}库位状态异常,无法移库");
continue;
}
else
{
Console.WriteLine(DateTime.Now + $":{location.locationCode}浅库位状态异常,无法移库");
_logger.Info($"{location.locationCode}浅库位状态异常,无法移库");
continue;
}
//else
//{
// Console.WriteLine(DateTime.Now + $":{location.locationCode}浅库位状态异常,无法移库");
// _logger.Info($"{location.locationCode}浅库位状态异常,无法移库");
// continue;
//}
}
wcsTask = new WcsTask()
{

Loading…
Cancel
Save