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/BllAsnController.cs |  152 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 149 insertions(+), 3 deletions(-)

diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs
index 72f1158..3336b84 100644
--- a/Wms/Wms/Controllers/BllAsnController.cs
+++ b/Wms/Wms/Controllers/BllAsnController.cs
@@ -25,10 +25,11 @@
         private readonly IOperationASNServer _logSvc;                               //鍏ュ簱搴撴搷浣滄棩蹇桽vc 
         private readonly IPalletUnbindServer _palletUnbind;                         //鎵樼洏瑙g粦缁戝畾
         private readonly IAuditLogServer _auditLog;                                 //瀹℃牳璁板綍
+        private readonly IBllLabelBoxNoServer _labelBox;                                 //绠辩爜鏍囩
         #endregion
 
         #region 鏋勯�犲嚱鏁�
-        public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog)
+        public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc,IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc,IOperationASNServer logSvc, IPalletUnbindServer palletUnbind,IAuditLogServer auditLog,IBllLabelBoxNoServer labelBox)
         {
             _arrivalNoticeSvc = arrivalNoticeSvc;
             _PalletBindSvc = palletBindSvc;
@@ -37,6 +38,7 @@
             _logSvc = logSvc;
             _palletUnbind = palletUnbind;
             _auditLog = auditLog;
+            _labelBox = labelBox;
         }
         #endregion
 
@@ -76,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)
         {
@@ -116,7 +137,7 @@
                 }
                 if (strMesage.Contains("-1"))
                 {
-                    return Ok(new { code = 0, msg = strMesage });
+                    return Ok(new { code = 1, msg = strMesage });
                 }
                 else
                 {
@@ -482,7 +503,7 @@
         {
             try
             {
-                var models = _PalletBindSvc.GetLocateList("W01",model.RoadwayNo,model.Row,model.Column,model.Layer,model.LocateNo,model.Page,model.Limit, out int count);
+                var models = _PalletBindSvc.GetLocateList("W01",model.RoadwayNo,model.Row,model.Column,model.Layer,model.LocateNo,model.BindId,model.Page,model.Limit, out int count);
 
                 return Ok(new { code = 0, count, msg = "鑾峰彇鎸囧畾鍌ㄤ綅淇℃伅", data = models });
             }
@@ -843,6 +864,131 @@
         }
 
         #endregion
+
+        #region 绠辩爜鏍囩
+
+        [HttpPost]
+        public IActionResult GetLabelBoxList(LabelBoxInfoVm model)
+        {
+            try
+            {
+                var list = _BoxInfoSvc.GetLabelBoxList(model, out int count);
+                return Ok(new { code = 0, count, msg = "绠辩爜鏍囩鍒楄〃", data = list });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, count = 0, msg = e.Message });
+            }
+        }
+
+        [HttpGet]
+        public IActionResult GetLabelBoxModel(int id)
+        {
+            try
+            {
+                var list = _BoxInfoSvc.GetLabelBoxModel(id);
+                return Ok(new { code = 0, msg = "绠辩爜妯℃澘淇℃伅", data = list });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
+        }
+
+        [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, model.SupplierLot, 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 });
+            }
+        }
+
+        //鏍规嵁鍏ュ簱鍗曞彿杩囧幓鍗曟嵁涓嬫墍鏈夋壒娆″彿
+        [HttpGet]
+        public IActionResult GetLotNoListByAsn(string asnNo)
+        {
+            try
+            {
+                var list = _BoxInfoSvc.GetLotNoListByAsn(asnNo);
+                return Ok(new { code = 0, msg = "鎴愬姛鑾峰彇鍗曟嵁涓嬫墍鏈夋壒娆″彿淇℃伅", data = list });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, count = 0, msg = e.Message });
+            }
+        }
+
+        //鍒犻櫎鍗曟嵁涓嬪崟涓垨澶氫釜鎵规鐨勬爣绛�
+        [HttpPost]
+        public IActionResult DelLabelByAsnNo(LabelBoxInfoVm 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 = "鏈幏鍙栧埌褰撳墠鎿嶄綔浜轰俊鎭�" });
+                }
+                _BoxInfoSvc.DelLabelByAsnNo(model.AsnNo,model.LotNo,int.Parse(userId));
+                return Ok(new { code = 0, msg = "鍒犻櫎鎴愬姛", data = "" });
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, count = 0, msg = e.Message });
+            }
+        }
+        
+
+        #endregion
     }
 
 }

--
Gitblit v1.8.0