From a04ee7ab3b4cb4e4bb73cda632233f043e7422f9 Mon Sep 17 00:00:00 2001 From: 南骏 池 <chiffly@163.com> Date: 星期五, 16 五月 2025 08:31:31 +0800 Subject: [PATCH] 1.条码拆分实现无线打印拆分条码. --- 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