From ea695f6aee04c35ac660b05f37e6d2d08543b5f9 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期四, 28 八月 2025 09:55:50 +0800
Subject: [PATCH] 部门接口增加组织Id
---
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