From ecb386a4201213c6635f28f9e9e02e3faf217b51 Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期六, 16 三月 2024 11:08:34 +0800
Subject: [PATCH] 修改储位图例柱状图以及圆形图显示数据问题。

---
 Wms/Wms/Controllers/PdaAsnController.cs |  210 ++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 194 insertions(+), 16 deletions(-)

diff --git a/Wms/Wms/Controllers/PdaAsnController.cs b/Wms/Wms/Controllers/PdaAsnController.cs
index 409b128..9fdbda8 100644
--- a/Wms/Wms/Controllers/PdaAsnController.cs
+++ b/Wms/Wms/Controllers/PdaAsnController.cs
@@ -5,6 +5,7 @@
 using Model.ModelVm.PdaVm;
 using System;
 using System.Security.Claims;
+using WMS.Entity.BllAsnEntity;
 using WMS.IBLL.IPdaServer;
 
 namespace Wms.Controllers
@@ -37,6 +38,33 @@
                 var models = _PdaAsnSvc.GetArrivalNotices(model);
 
                 return Ok(new { code = 0, msg = "鍏ュ簱鍗曚俊鎭�", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁鍏ュ簱鍗曡幏鍙栧叆搴撴�诲崟淇℃伅
+        /// </summary>
+        /// <param name="model">ASNNo:鍏ュ簱鍗曞彿</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetArrivalNotice(ArrivalNoticeVm model)
+        {
+            try
+            {
+                var models = _PdaAsnSvc.GetArrivalNotice(model);
+
+                if (models == null)
+                {
+                    return Ok(new { code = 1, msg = "鍏ュ簱鍗曚俊鎭�", data = models });
+                }
+                else
+                {
+                    return Ok(new { code = 0, msg = "鍏ュ簱鍗曚俊鎭�", data = models });
+                }
             }
             catch (Exception e)
             {
@@ -132,29 +160,18 @@
         }
 
         /// <summary>
-        /// 缁戝畾鎵樼洏
+        /// 鏍规嵁鎵樼洏鍙锋垨绠辩爜鑾峰彇鎵樼洏淇℃伅
         /// </summary>
-        /// <param name="model"></param>
+        /// <param name="model">PalletNo:鎵樼洏鍙�</param>
         /// <returns></returns>
         [HttpPost]
-        public IActionResult BindPallet(PdaPalletBindVm model) 
+        public IActionResult GetPalletBindInfo(BllPalletBind 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
-                } 
-                _PdaAsnSvc.BindPallet(model, int.Parse(UserId),model.Origin);
+                var models = _PdaAsnSvc.GetPalletBindInfo(model);
 
-                return Ok(new { code = 0, msg = "缁戝畾鎴愬姛!" });
-                
+                return Ok(new { code = 0, msg = "鎵樼洏淇℃伅", data = models });
             }
             catch (Exception e)
             {
@@ -186,6 +203,47 @@
                 model.CreateUser = int.Parse(UserId);
 
                 var strMsg = _PdaAsnSvc.DelBoxInfo(model);
+
+                if (strMsg == "")
+                {
+                    return Ok(new { code = 0, msg = "鍒犻櫎缁勬墭鎴愬姛!" });
+                }
+                else
+                {
+                    return Ok(new { code = 1, msg = strMsg });
+                }
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+
+        }
+
+        /// <summary>
+        /// 鍒犻櫎鎵樼洏淇℃伅
+        /// </summary>
+        /// <param name="model">ID\鎵樼洏鍙�</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult DelPalletBind(BllPalletBind 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+
+                model.CreateUser = int.Parse(UserId);
+
+                var strMsg = _PdaAsnSvc.DelPalletBind(model);
 
                 if (strMsg == "")
                 {
@@ -352,6 +410,26 @@
                 return Ok(new { code = 1, msg = e.Message });
             }
         }
+
+        /// <summary>
+        /// 楠岃瘉鍌ㄤ綅(鍦扮爜)鏄惁鍙敤
+        /// </summary>
+        /// <param name="model">LocatNo鍌ㄤ綅鍦板潃</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult CheckLocatNo(PalletBindVm model) 
+        {
+            try
+            {
+                var result = _PdaAsnSvc.CheckLocatNo(model.LocatNo);
+
+                return Ok(new { code = 0, msg = "楠岃瘉鎴愬姛!", data = result });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
         #endregion
 
         #region 闆剁鍏ュ簱
@@ -410,5 +488,105 @@
         }
 
         #endregion
+
+        #region 缁勬墭
+        /// <summary>
+        /// 鏍规嵁绠辩爜鑾峰彇鏍囩绠辩爜淇℃伅
+        /// </summary>
+        /// <param name="model">BoxNo:绠卞彿</param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetBindBoxInfos(BoxInfoVm model)
+        {
+            try
+            {
+                var models = _PdaAsnSvc.GetBindBoxInfos(model);
+
+                return Ok(new { code = 0, msg = "鏍囩绠辩爜淇℃伅", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+        [HttpPost]
+        public IActionResult GetBindArrivalNoticeDetails(ArrivalNoticeVm model)
+        {
+            try
+            {
+                var models = _PdaAsnSvc.GetBindArrivalNoticeDetails(model);
+
+                return Ok(new { code = 0, msg = "鍏ュ簱鍗曟槑缁嗕俊鎭�", data = models });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+        /// <summary>
+        /// 缁戝畾鎵樼洏
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult BindPallet(PdaPalletBindVm 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+                _PdaAsnSvc.BindPallet(model, int.Parse(UserId), model.Origin);
+
+                return Ok(new { code = 0, msg = "缁戝畾鎴愬姛!" });
+
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+        #endregion
+
+        #region 骞冲簱鍏ュ簱
+        /// <summary>
+        /// 骞冲簱纭鍏ュ簱
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult ConfirmInStock(PalletBindVm 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("鏈幏鍙栧埌鐢ㄦ埛淇℃伅");
+                }
+                model.CreateUser = int.Parse(UserId);
+                _PdaAsnSvc.ConfirmInStock(model);
+
+                return Ok(new { code = 0, msg = "鍏ュ簱鎴愬姛!" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.8.0