From 3a33dd4767b20bd233714d35e1b0912f91e3546a Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期三, 21 二月 2024 10:49:22 +0800
Subject: [PATCH] PDA托盘绑定增加托盘验证

---
 Wms/Wms/Controllers/BllAsnController.cs |   79 +++++++++++++++++++++++++++++++++++++--
 1 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index fee616f..868e979 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -78,6 +78,25 @@
             }
         }
 
+        /// <summary>
+        /// 鑾峰彇鍏ュ簱鍗曟槑缁嗗墿浣欐墦鍗版暟閲�
+        /// </summary>
+        /// <param name="id"></param>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetAsnDetailQtyList(int id)
+        {
+            try
+            {
+                var models = _arrivalNoticeSvc.GetAsnDetailQtyList(id);
+
+                return Ok(new { code = 0, msg = "鍏ュ簱鍗曟槑缁嗕俊鎭�", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
         [HttpPost]
         public IActionResult GetMaterialsList(GetMaterialsVm model)
         {
@@ -118,7 +137,7 @@
                 }
                 if (strMesage.Contains("-1"))
                 {
-                    return Ok(new { code = 0, msg = strMesage });
+                    return Ok(new { code = 1, msg = strMesage });
                 }
                 else
                 {
@@ -849,11 +868,11 @@
         #region 绠辩爜鏍囩
 
         [HttpPost]
-        public IActionResult GetLabelBoxList(LabelBoxVm model)
+        public IActionResult GetLabelBoxList(LabelBoxInfoVm model)
         {
             try
             {
-                var list = _labelBox.GetLabelBoxList(model, out int count);
+                var list = _BoxInfoSvc.GetLabelBoxList(model, out int count);
                 return Ok(new { code = 0, count, msg = "绠辩爜鏍囩鍒楄〃", data = list });
             }
             catch (Exception e)
@@ -867,7 +886,7 @@
         {
             try
             {
-                var list = _labelBox.GetLabelBoxModel(id);
+                var list = _BoxInfoSvc.GetLabelBoxModel(id);
                 return Ok(new { code = 0, msg = "绠辩爜妯℃澘淇℃伅", data = list });
             }
             catch (Exception e)
@@ -876,6 +895,58 @@
             }
         }
 
+        [HttpPost]
+        public IActionResult AddLabelBox(AddLabelBoxInfoVm model)
+        {
+            try
+            {
+                //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(userId))
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var list = _BoxInfoSvc.AddLabelBox(model.Id, model.IsReset, decimal.Parse(model.ArriveQty),  model.ProductionTime, model.ExpirationTime, model.StoreTime, int.Parse(userId));
+                return Ok(new { code = 0,  msg = "鐢熸垚绠辩爜鏍囩鎴愬姛", data = list });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, count = 0, msg = e.Message });
+            }
+        }
+
+
+        [HttpPost]
+        public IActionResult GetBuDaLabelList(BuDaLabelBoxVm model)
+        {
+            try
+            {
+                //鑾峰彇褰撳墠鐧诲綍鐨勭敤鎴稩D
+                var claimsIdentity = this.User.Identity as ClaimsIdentity;
+                if (claimsIdentity == null)
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var userId = claimsIdentity.FindFirst(ClaimTypes.Name)?.Value;
+                if (string.IsNullOrWhiteSpace(userId))
+                {
+                    return Ok(new { code = 1, msg = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                var list = _BoxInfoSvc.GetBuDaLabelList(model.BoxNo, model.EndBoxNo, model.BoxNo2, model.EndBoxNo2,model.Type,int.Parse(userId));
+                return Ok(new { code = 0, msg = "鑾峰彇琛ユ墦绠辩爜鏍囩淇℃伅", data = list });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, count = 0, msg = e.Message });
+            }
+        }
+
+
 
         #endregion
     }

--
Gitblit v1.8.0