From 962ab7cab901ac8da67e0cfd054ba7e6fdf53a28 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 14 Aug 2023 09:14:07 +0800 Subject: [PATCH] 1 --- .../Tnb.WarehouseMgr/WareHouseService.cs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 05a1a2a4..e6a50e70 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -529,30 +529,13 @@ namespace Tnb.WarehouseMgr loc.is_use = ((int)EnumCarryStatus.占用).ToString(); } locIts.Add(loc); - //await _db.Updateable().SetColumns(it => new WmsCarryH { is_lock = 0, location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync(); - //var carryCodes = await _db.Queryable().Where(it => it.id == multiList[i].carry_id).ToListAsync(); - //if (carryCodes?.Count > 0) - //{ - // await _db.Updateable().SetColumns(it => new WmsCarryCode { warehouse_id = locWhIdMap[multiList[i].endlocation_id].ToString(), location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync(); - //} + } await _db.Updateable(carryIts).UpdateColumns(it => new { it.is_lock, it.location_id, it.location_code }).ExecuteCommandAsync(); //更新条码的库位和仓库信息 await _db.Updateable(carryCodeIts).UpdateColumns(it => new { it.warehouse_id, it.location_id, it.location_code }).Where(it => multiList.Select(x => x.carry_id).Contains(it.carry_id)).ExecuteCommandAsync(); //更新库位信息,使用状态为 使用,锁定状态为未锁定 await _db.Updateable(locIts).UpdateColumns(it => new { it.is_use, it.is_lock }).Where(it => multiList.Select(x => x.endlocation_id).Contains(it.id)).ExecuteCommandAsync(); - //var multis = disTasks.Select(it => (it.endlocation_id, it.carry_status)).ToList(); - //for (int i = 0; i < multis.Count; i++) - //{ - // var carryStatus = multis[i].carry_status; - // if (multis[i].carry_status == ((int)EnumCarryStatus.空闲).ToString()) - // { - // carryStatus = ((int)EnumCarryStatus.占用).ToString(); - // } - // var cStatus = carryStatus.ParseToInt(); - // await _db.Updateable().SetColumns(it => new BasLocation { is_use = cStatus.ToString(), is_lock = 0 }).Where(it => it.id == multis[i].endlocation_id).ExecuteCommandAsync(); - //} - //更新业务主表的单据状态 foreach (var dt in disTasks) {