From 430f4df6519253ffaf49f2d098ac1df77aa5891e Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 11 九月 2025 14:43:02 +0800
Subject: [PATCH] 销售出库添加一行'制单人'

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