From 0bb73d4cccd49e09c033ad0378da94f6ebbc280e Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 09 二月 2026 08:58:21 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/MJGL/Sc_MouldOutRequestBillController.cs |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/MJGL/Sc_MouldOutRequestBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldOutRequestBillController.cs
index 349edb9..54fb7d7 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldOutRequestBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldOutRequestBillController.cs
@@ -500,6 +500,52 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿鍑哄簱鐢宠鍗� - 鎵樻暟鍙樻洿鍔熻兘
+        [Route("Sc_MouldOutRequestBillController/UpdatePallet")]
+        [HttpPost]
+    
+        public object UpdatePallet([FromBody] JObject data)
+        {
+            try
+            {
+                long hmainid = data["hmainid"]?.ToObject<long>() ?? 0;
+                int newPallet = data["newPallet"]?.ToObject<int>() ?? 0;
+                string operatorName = data["operator"]?.ToString() ?? "";
+
+                if (hmainid <= 0)
+                    return new { code = "0", count = 0, Message = "鍗曟嵁ID涓嶈兘涓虹┖锛�" };
+
+                if (newPallet <= 0)
+                    return new { code = "0", count = 0, Message = "鎵樻暟蹇呴』澶т簬0锛�" };
+
+                // 鐩存帴鏇存柊鎵樻暟
+                string updateSql = $@"
+                    UPDATE Sc_MouldOutRequestBillMain 
+                    SET HPackQtys = {newPallet} 
+                    WHERE HInterID = {hmainid}";
+
+                oCn.RunProc(updateSql);
+
+                return new
+                {
+                    code = "1",
+                    count = 1,
+                    Message = "鎵樻暟淇敼鎴愬姛锛�"
+                };
+            }
+            catch (Exception e)
+            {
+                return new
+                {
+                    code = "0",
+                    count = 0,
+                    Message = "淇敼澶辫触锛�" + e.Message
+                };
+            }
+        }
+        #endregion
+
+
         #region  鍣ㄥ叿鍑哄簱鐢宠鍗� 浣滃簾/鍙嶄綔搴�
         /// <summary>
         /// 浣滃簾/鍙嶄綔搴� 鍣ㄥ叿鍑哄簱鐢宠鍗�

--
Gitblit v1.9.1