From e67beb20f7e42ae26c08166209d75b71ce42e650 Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 20 Jul 2023 15:50:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=BD=90=E5=A5=97=E5=87=BA?= =?UTF-8?q?=E5=BA=93=EF=BC=8C=E6=8B=BC=E6=8E=A5=E6=9F=A5=E8=AF=A2=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=BC=8F=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.WarehouseMgr/WmsOutStockService.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs index 1e6c5334..d6c26e3a 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsOutStockService.cs @@ -368,16 +368,17 @@ namespace Tnb.WarehouseMgr { List carryMats = new(); List carryCodes = new(); - var whereExp = Expressionable.Create() - .And((a, b, c) => a.is_lock == 0) - .And((a, b, c) => !string.IsNullOrEmpty(a.location_id)) - .And((a, b, c) => a.status == (int)EnumCarryStatus.占用) - .And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString()); + foreach (var os in outStockDList) { - whereExp.And((a, b, c) => b.material_id == os.material_id) - .AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch); + var whereExp = Expressionable.Create() + .And((a, b, c) => a.is_lock == 0) + .And((a, b, c) => !string.IsNullOrEmpty(a.location_id)) + .And((a, b, c) => a.status == (int)EnumCarryStatus.占用) + .And((a, b, c) => c.is_type == ((int)EnumLocationType.存储库位).ToString()) + .And((a, b, c) => b.material_id == os.material_id) + .AndIF(!string.IsNullOrEmpty(os.code_batch), (a, b, c) => b.code_batch == os.code_batch); var carryCodesPart = await _db.Queryable().InnerJoin((a, b) => a.id == b.carry_id).InnerJoin((a, b, c) => a.location_id == c.id) .Where(whereExp.ToExpression())