From 617ee9f1116ff97c3d17070defd21e6d6dc6bbda Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期一, 14 四月 2025 10:08:50 +0800 Subject: [PATCH] 1.期初入库优化 2.产品托码绑定,内箱核对 3.不了优化 --- service/base/WmsBaseMangeer.cs | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/service/base/WmsBaseMangeer.cs b/service/base/WmsBaseMangeer.cs index f36b0e0..e3eadf8 100644 --- a/service/base/WmsBaseMangeer.cs +++ b/service/base/WmsBaseMangeer.cs @@ -113,5 +113,38 @@ return itemInfo; } + + + /// <summary> + /// 鑾峰彇璐т富绫诲瀷 + /// </summary> + /// <param name="ownerId">璐т富ID</param> + /// <returns>璐т富绫诲瀷(BD_OwnerOrg/BD_Customer/BD_Supplier)</returns> + public string GetOwnerType(string ownerId) + { + if (string.IsNullOrEmpty(ownerId)) + throw new ArgumentNullException(nameof(ownerId)); + + if (Db.Queryable<SysOrganization>().Any(x => x.Fid == ownerId)) + { + return "BD_OwnerOrg"; + } + else if (Db.Queryable<MesCustomer>().Any(x => x.Id == Convert.ToInt32(ownerId))) + { + return "BD_Customer"; + } + else if (Db.Queryable<MesSupplier>().Any(x => x.Id == Convert.ToInt32(ownerId))) + { + return "BD_Supplier"; + } + else if (Db.Queryable<SysOrganization>().Any(x => x.Fid == ownerId)) + { + return "BD_OwnerOrg"; + } + + throw new Exception("鏃犳硶纭畾璐т富绫诲瀷锛岃妫�鏌ヨ揣涓籌D鏄惁姝g‘锛�"); + } + + } } \ No newline at end of file -- Gitblit v1.9.3