From e34f379c22862982c20376c952ab56f9c4ccb163 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期二, 25 六月 2024 08:08:04 +0800
Subject: [PATCH] 修改controller

---
 Wms/Wms/Controllers/StatisticalController.cs |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/Wms/Wms/Controllers/StatisticalController.cs b/Wms/Wms/Controllers/StatisticalController.cs
index 8a87f0e..3ff28b1 100644
--- a/Wms/Wms/Controllers/StatisticalController.cs
+++ b/Wms/Wms/Controllers/StatisticalController.cs
@@ -434,5 +434,39 @@
         }
 
         #endregion
+
+        #region 浜屾ゼ涓氬姟
+        /// <summary>
+        /// 娣诲姞鎵樼洏搴撳瓨鏄庣粏
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult InsertStockDetail(StockDetailDto model)
+        {
+            try
+            {
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+                string userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(userId))
+                {
+                    throw new Exception("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+
+                _stockDetail.InsertStockDetail(model.PalletNo,model.WareHouseNo,model.AreaNo,model.LocatNo,model.PalletStatus,int.Parse(userId));
+
+                return Ok(new { code = 0, count = 0, msg = "娣诲姞鎴愬姛", data = "" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+        #endregion
     }
 }

--
Gitblit v1.8.0