From 971e03ccbe5124d4761f56e71025453d1d4742bc Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 17 九月 2025 14:17:08 +0800
Subject: [PATCH] 111

---
 service/base/WmsBaseMangeer.cs |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/service/base/WmsBaseMangeer.cs b/service/base/WmsBaseMangeer.cs
index e3eadf8..b3bbe50 100644
--- a/service/base/WmsBaseMangeer.cs
+++ b/service/base/WmsBaseMangeer.cs
@@ -31,6 +31,20 @@
             string barcode, string sectionCode, string stockId, string stockOrgId,
             string billNo, string transactionNo)
         {
+            // 鍙傛暟楠岃瘉
+            if (string.IsNullOrEmpty(edtUserNo))
+                throw new ArgumentException("鎿嶄綔浜哄伐鍙蜂笉鑳戒负绌�", nameof(edtUserNo));
+            if (string.IsNullOrEmpty(barcode))
+                throw new ArgumentException("鐗╂枡鏉$爜涓嶈兘涓虹┖", nameof(barcode));
+            if (string.IsNullOrEmpty(sectionCode))
+                throw new ArgumentException("搴撲綅缂栫爜涓嶈兘涓虹┖", nameof(sectionCode));
+            if (string.IsNullOrEmpty(stockId))
+                throw new ArgumentException("浠撳簱ID涓嶈兘涓虹┖", nameof(stockId));
+            if (string.IsNullOrEmpty(stockOrgId))
+                throw new ArgumentException("搴撳瓨缁勭粐ID涓嶈兘涓虹┖", nameof(stockOrgId));
+            if (string.IsNullOrEmpty(transactionNo))
+                throw new ArgumentException("浜嬪姟绫诲瀷涓嶈兘涓虹┖", nameof(transactionNo));
+
             var outputMsg = "";
             var outputStatus = -1;
 
@@ -46,7 +60,7 @@
                     new("@pi_sectionCode", SqlDbType.NVarChar, 100) { Value = sectionCode },
                     new("@pi_stockId", SqlDbType.NVarChar, 100) { Value = stockId },
                     new("@pi_stockOrgId", SqlDbType.NVarChar, 100) { Value = stockOrgId },
-                    new("@pi_billno", SqlDbType.NVarChar, 100) { Value = billNo },
+                    new("@pi_billno", SqlDbType.NVarChar, 100) { Value = string.IsNullOrEmpty(billNo) ? DBNull.Value : billNo },
                     new("@pi_transaction_no", SqlDbType.NVarChar, 10) { Value = transactionNo },
                     new("@pi_val1", SqlDbType.NVarChar, 100) { Value = DBNull.Value }, // 棰勭暀鎵╁睍瀛楁
                     new("@pi_val2", SqlDbType.NVarChar, 100) { Value = DBNull.Value }, // 棰勭暀鎵╁睍瀛楁
@@ -122,8 +136,9 @@
         /// <returns>璐т富绫诲瀷(BD_OwnerOrg/BD_Customer/BD_Supplier)</returns>
         public string GetOwnerType(string ownerId)
         {
+            // 濡傛灉 ownerId 涓虹┖锛岃繑鍥為粯璁ょ殑璐т富绫诲瀷
             if (string.IsNullOrEmpty(ownerId))
-                throw new ArgumentNullException(nameof(ownerId));
+                return "BD_OwnerOrg"; // 榛樿涓虹粍缁囩被鍨�
 
             if (Db.Queryable<SysOrganization>().Any(x => x.Fid == ownerId))
             {

--
Gitblit v1.9.3