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);