库位载具数,灭菌入库单号

This commit is contained in:
2024-09-03 16:23:52 +08:00
parent 9f1806e852
commit df654b1523
5 changed files with 24 additions and 14 deletions

View File

@@ -183,19 +183,19 @@ namespace Tnb.WarehouseMgr
// 自动发货
if (!input.isManual)
{
endLocations = await _db.Queryable<BasLocation>().Where(r => _wareHouseService.GetFloor1OutstockLocation().Contains(r.id) && r.is_lock == 0 && r.is_use == "0").ToListAsync();
//endLocations = await _db.Queryable<BasLocation>().Where(r => _wareHouseService.GetFloor1OutstockLocation().Contains(r.id) && r.is_lock == 0 && r.is_use == "0").ToListAsync();
if (endLocations.Count < items_pretask.Count)
{
throw new AppFriendlyException("一楼没有足够的未锁定且空闲的出库工位", 500);
}
//if (endLocations.Count < items_pretask.Count)
//{
// throw new AppFriendlyException("一楼没有足够的未锁定且空闲的出库工位", 500);
//}
List<BasLocation> endLocations_temp = await _db.Queryable<BasLocation>().Where(r => r.region_id == WmsWareHouseConst.REGION_CPOutstockCache_ID && r.is_lock == 0 && r.is_use == "0").ToListAsync();
//List<BasLocation> endLocations_temp = await _db.Queryable<BasLocation>().Where(r => r.region_id == WmsWareHouseConst.REGION_CPOutstockCache_ID && r.is_lock == 0 && r.is_use == "0").ToListAsync();
if (endLocations_temp.Count < items_pretask.Count)
{
throw new AppFriendlyException($"三楼发货时,没有可用的暂存库位可以使用,需要下发任务{items_pretask.Count}条,可用的暂存库位只有{endLocations_temp.Count}条", 500);
}
//if (endLocations_temp.Count < items_pretask.Count)
//{
// throw new AppFriendlyException($"三楼发货时,没有可用的暂存库位可以使用,需要下发任务{items_pretask.Count}条,可用的暂存库位只有{endLocations_temp.Count}条", 500);
//}
}
//人工发货
else
@@ -232,7 +232,7 @@ namespace Tnb.WarehouseMgr
}
List<BasLocation> locations = await _db.Queryable<BasLocation>()
.InnerJoin<WmsElevatorcacheArea>((a, b) => a.id == b.location_id)
.Where((a, b) => b.name == YCLInnerTransfer.value).OrderBy("a.location_code,a.is_lock,a.is_use,task_nums").ToListAsync();
.Where((a, b) => b.name == YCLInnerTransfer.value).OrderBy("a.is_lock,a.is_use,carry_count,a.location_code").ToListAsync();
endLocation = locations.FirstOrDefault();