From 22428c74e4b57c87a979a8f2f199e0e8e34dbb86 Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期六, 28 六月 2025 16:48:09 +0800
Subject: [PATCH] 编写接收SAP下发入库单接口

---
 Wms/Wms/Controllers/PdaCrController.cs |  132 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 131 insertions(+), 1 deletions(-)

diff --git a/Wms/Wms/Controllers/PdaCrController.cs b/Wms/Wms/Controllers/PdaCrController.cs
index 9dea8fb..fbd3020 100644
--- a/Wms/Wms/Controllers/PdaCrController.cs
+++ b/Wms/Wms/Controllers/PdaCrController.cs
@@ -312,7 +312,51 @@
                 }
 
                 var uId = int.Parse(userId);
-                _pdaCrSvc.AddLableByDevanning(model.BoxNo, model.DevanQty,uId);
+                var list = _pdaCrSvc.AddLableByDevanning(model.BoxNo, model.DevanQty,uId);
+
+                return Ok(new { data = list, code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+        #endregion
+
+        #region 纭鏀惰揣
+
+        /// <summary>
+        /// 鏍规嵁鏀惰揣鎵樼洏鑾峰彇鍑哄簱鍗曚俊鎭�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetReceiptSoNoByPallet(PdaReceiptVm model)
+        {
+            try
+            {
+
+                var soNo = _pdaCrSvc.GetReceiptSoNoByPallet(model.PalletNo);
+
+                return Ok(new { data = soNo, code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+
+        /// <summary>
+        /// 纭鏀惰揣
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult ConfirmReceipt(PdaReceiptVm model)
+        {
+            try
+            {
+                _pdaCrSvc.ConfirmReceipt(model.PalletNo, _userManager.UserId);
 
                 return Ok(new { data = "", code = 0, msg = "鎴愬姛" });
             }
@@ -321,6 +365,92 @@
                 return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
             }
         }
+
+        #endregion
+
+
+        #region 鐗╂枡鎷嗘墭
+
+        /// <summary>
+        /// 鏌ヨ绠变俊鎭�
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetBoxInfo(PdaUpPalletVm model)
+        {
+            try
+            {  
+                _pdaCrSvc.GetBoxInfo(model.BoxNo, model.PalletNo);
+
+                return Ok(new { data = "", code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+
+        /// <summary>
+        /// 鐗╂枡鎷嗘墭
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult UpPalletByBox(PdaUpPalletVm model)
+        {
+            try
+            {
+                _pdaCrSvc.UpPalletByBox(model.BoxNo, model.PalletNo,model.PalletNoNew,_userManager.UserId);
+
+                return Ok(new { data = "", code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁鎵樼洏鑾峰彇鎵樼洏涓婄殑鐗╂枡鎵规淇℃伅
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetSelectSkuLotNo(PdaUpPalletVm model)
+        {
+            try
+            {
+                var list = _pdaCrSvc.GetSelectSkuLotNo(model.PalletNo);
+
+                return Ok(new { data = list, code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+
+        /// <summary>
+        /// 鐗╂枡鎷嗘墭 - 鏁伴噺椤电
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult UpPalletByQty(PdaUpPalletVm model)
+        {
+            try
+            {
+                _pdaCrSvc.UpPalletByQty(model.PalletNo, model.PalletNoNew, model.DetailId,model.Qty, _userManager.UserId);
+
+                return Ok(new { data = "", code = 0, msg = "鎴愬姛" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { data = "", code = 1, msg = $"寮傚父锛歿e.Message}" });
+            }
+        }
+
         #endregion
 
     }

--
Gitblit v1.8.0