From 95584843043327d4fa12481f0cf3e6c0785fcc26 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 15 九月 2025 09:54:27 +0800
Subject: [PATCH] 其他出库增加库存

---
 service/Wom/WomdaaManager.cs        |   31 +++++++++++++++++++++++++++++++
 Controllers/Wom/WomdaaController.cs |   24 ++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 0 deletions(-)

diff --git a/Controllers/Wom/WomdaaController.cs b/Controllers/Wom/WomdaaController.cs
index f5dee1c..3b5c3ca 100644
--- a/Controllers/Wom/WomdaaController.cs
+++ b/Controllers/Wom/WomdaaController.cs
@@ -151,6 +151,30 @@
     }
 
     /// <summary>
+    ///     鐢熶骇棰嗘枡鐐瑰嚮鐗╂枡鏄庣粏鑾峰彇鐩稿叧鏉$爜淇℃伅
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("GetBarKwByItemCK")]
+    public ResponseResult GetBarKwByItemCK(dynamic unity)
+    {
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            resultInfos.tbBillList = m.GetBarKwByItemCK(unity);
+            return new ResponseResult
+            {
+                status = 0,
+                message = "OK",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    /// <summary>
     ///     鑾峰彇鎵�鏈�
     /// </summary>
     /// <returns></returns>
diff --git a/service/Wom/WomdaaManager.cs b/service/Wom/WomdaaManager.cs
index 547ff5b..320e506 100644
--- a/service/Wom/WomdaaManager.cs
+++ b/service/Wom/WomdaaManager.cs
@@ -397,6 +397,37 @@
 
     }
 
+    /// <summary>
+    /// 鑾峰彇鐗╂枡鐩稿叧鏉$爜淇℃伅
+    /// </summary>
+    /// <param name="unity"></param>
+    /// <returns></returns>
+    /// <exception cref="Exception"></exception>
+    public dynamic GetBarKwByItemCK(dynamic unity)
+    {
+        if (unity == null)
+            throw new ArgumentNullException(nameof(unity), "鍙傛暟瀵硅薄涓嶈兘涓簄ull");
+
+        if (string.IsNullOrEmpty(unity.itemId?.ToString()))
+            throw new ArgumentException("鐗╂枡ID涓嶈兘涓虹┖", nameof(unity.itemId));
+
+        try
+        {
+            var parameters = new List<SugarParameter>
+            {
+                new SugarParameter("@itemId", unity.itemId),
+                new SugarParameter("@inP1", unity.type),
+                new SugarParameter("@inP2", unity.billNo)
+            };
+
+            return Db.Ado.SqlQuery<dynamic>("EXEC prc_pda_scll_selBarMx @itemId,@inP1,@inP2", parameters);
+        }
+        catch (Exception ex)
+        {
+            throw new Exception($"鑾峰彇鏉$爜淇℃伅澶辫触锛歿ex.Message}");
+        }
+
+    }
 
     public dynamic ProductBinding(dynamic query)
     {

--
Gitblit v1.9.3