From 1fa00ea4fc87341d04dcd4c11da1267c0081050a Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Thu, 25 Jul 2024 17:41:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=AD=96=E7=95=A5=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs | 4 ++-- WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs index f98efeda..2c36b037 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr.Entities/Consts/WmsWareHouseConst.cs @@ -544,8 +544,8 @@ public const string POLICY_YCLINSTOCK = "WISP202407250001"; /// - /// 原材料仓出库策略 + /// 原材料仓先进先出 /// - public const string POLICY_YCLOUTSTOCK = "WOSP202407250002"; + public const string POLICY_YCLOUTSTOCK = "WOSP202407250001"; } } diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index ad46c634..118053b5 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -467,7 +467,8 @@ namespace Tnb.WarehouseMgr Expression> whereExpr = whereExprable.ToExpression(); - WmsInstockPolicies policy = await cyDb.Queryable().Where(it => it.status == 1).FirstAsync(); + WmsOutstockPolicies policy = await cyDb.Queryable().Where(it => it.status == 1 && (string.IsNullOrEmpty(input.PolicyCode) || + it.bill_code == input.PolicyCode)).FirstAsync(); if (policy == null) { throw new AppFriendlyException("没有可用策略", 500);