From 869c05c7904694743da8bab8bd325960d1789a9f Mon Sep 17 00:00:00 2001 From: "yang.lee" Date: Thu, 9 Nov 2023 15:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=A2=84=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=89=A7=E8=A1=8C=E5=90=8E=EF=BC=8C=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E5=BA=93=E4=BD=8D=E5=8D=A0=E7=94=A8=E8=B5=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 6 +++++- WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs | 2 +- WarehouseMgr/Tnb.WarehouseMgr/WmsPDAInStockService.cs | 2 +- WarehouseMgr/Tnb.WarehouseMgr/WmsPDAScanInStockService.cs | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 9a50c27f..7c8ea061 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -255,7 +255,7 @@ namespace Tnb.WarehouseMgr .InnerJoin((a, b, c, d) => a.endlocation_id == d.id && d.is_use == "0") .Where(a => a.status == WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID && !string.IsNullOrWhiteSpace(a.startlocation_id)) .OrderBy(a => new { priority = SqlFunc.Desc(a.priority), a.bill_code }) - .Select((a, b, c,d) => new WmsPretaskH + .Select((a, b, c, d) => new WmsPretaskH { move_num = c.move_num, third_eqp_type = c.third_eqp_type, @@ -925,6 +925,10 @@ namespace Tnb.WarehouseMgr Expression> whereExp = input.CarryIds?.Count > 0 ? it => input.CarryIds.Contains(it.id) : it => it.id == input.CarryId; _ = await _db.Updateable().SetColumns(setCarryColumnsExp).Where(whereExp).ExecuteCommandAsync(); } + if (input.CarryStartLocationId.IsNullOrWhiteSpace() == false) + { + _ = await _db.Updateable().SetColumns(setLocaionColumbExp).Where(it => input.LocationIds.Contains(it.id)).ExecuteCommandAsync(); + } //根据所有库位更新库位的锁定状态为“锁定” if (setLocaionColumbExp != null && input.LocationIds?.Count > 0) { diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs index 90845eb4..ce05775b 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs @@ -466,7 +466,7 @@ namespace Tnb.WarehouseMgr _ = await _db.Insertable(carryCodes).ExecuteCommandAsync(); await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput, it => new WmsCarryH { carry_code = instock!.carry_code!, is_lock = 1, carry_status = ((int)EnumCarryStatus.占用).ToString(), location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode }, - it => new BasLocation { is_lock = 1, is_use = ((int)EnumCarryStatus.占用).ToString() }); + it => new BasLocation { is_lock = 1 }); if (instockCOdes?.Count > 0) { _ = await _db.Updateable().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCOdes.Select(x => x.bill_d_id).Contains(it.id)).ExecuteCommandAsync(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAInStockService.cs index 72119a86..1ba5f236 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAInStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAInStockService.cs @@ -264,7 +264,7 @@ namespace Tnb.WarehouseMgr // 更新临时条码表 状态is_end await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput, it => new WmsCarryH { carry_code = input.data[nameof(WmsCarryH.carry_code)].ToString()!, is_lock = 1, carry_status = ((int)EnumCarryStatus.占用).ToString(), location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode, source_id = input.data[nameof(WmsOutstockH.source_id)].ToString(), source_code = input.data[nameof(WmsOutstockH.source_code)].ToString() }, - it => new BasLocation { is_lock = 1, is_use = ((int)EnumCarryStatus.占用).ToString() }); + it => new BasLocation { is_lock = 1 }); if (instockCOdes?.Count > 0) { _ = await _db.Updateable().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCOdes.Select(x => x.bill_d_id).Contains(it.id)).ExecuteCommandAsync(); diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAScanInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAScanInStockService.cs index 236fff07..86b3c6ac 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAScanInStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsPDAScanInStockService.cs @@ -308,7 +308,7 @@ namespace Tnb.WarehouseMgr //回更状态 await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput, it => new WmsCarryH { carry_code = instock!.carry_code!, is_lock = 1, carry_status = ((int)EnumCarryStatus.占用).ToString(), location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode }, - it => new BasLocation { is_lock = 1, is_use = ((int)EnumCarryStatus.占用).ToString() }); + it => new BasLocation { is_lock = 1 }); _ = await _db.Updateable().SetColumns(it => new WmsInstockD { line_status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => instockCode.bill_d_id == it.id).ExecuteCommandAsync(); _ = await _db.Updateable().SetColumns(it => new WmsInstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == instock!.id).ExecuteCommandAsync();