From 07cafb66eab758a65b0f4f257ad1361cb8cc78c1 Mon Sep 17 00:00:00 2001
From: admin <qiutairan163@163.com>
Date: 星期二, 11 十一月 2025 11:17:54 +0800
Subject: [PATCH] 首页库存和仓库接口

---
 Wms/Wms/Controllers/StatisticalController.cs |  145 ++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 138 insertions(+), 7 deletions(-)

diff --git a/Wms/Wms/Controllers/StatisticalController.cs b/Wms/Wms/Controllers/StatisticalController.cs
index 83c294e..f027a41 100644
--- a/Wms/Wms/Controllers/StatisticalController.cs
+++ b/Wms/Wms/Controllers/StatisticalController.cs
@@ -7,6 +7,10 @@
 using WMS.IBLL.IDataServer;
 using System.Security.Claims;
 using System.Threading.Tasks;
+using Model.ModelDto.SysDto;
+using WMS.BLL.LogServer;
+using Model.ModelVm.BllTaskVm;
+using Model.ModelVm;
 
 namespace Wms.Controllers
 {
@@ -21,6 +25,8 @@
         private readonly IStockDetailServer _stockDetail; //缁熻鎶ヨ〃
         private readonly IDataBoxInfoServer _dataBoxInfo; //瀵煎嚭
         private readonly IStockInfoServer _stockInfo; //搴撳瓨淇℃伅
+
+
         /// <summary>
         /// 鏋勯�犲嚱鏁�
         /// </summary>
@@ -35,6 +41,76 @@
             _dataBoxInfo = dataBoxInfo;
             _stockInfo = stockInfo; //搴撳瓨淇℃伅
         }
+
+
+        /// <summary>
+        /// 鑾峰彇搴撳瓨鐗╂枡绫诲瀷鍒嗗竷
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetGoodsTypeFb()
+        {
+            IEnumerable<IdNameNumRateDto> dtoIE = _stock.GetGoodsTypeFb();
+            return Ok(new
+            {
+                data = dtoIE,
+                code = 0,
+                msg = "鑾峰彇浠撳簱璇︽儏鎴愬姛"
+            });
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇搴撳瓨璐ㄩ噺鐘舵�佸垎甯�
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetQualityStatusFb()
+        {
+            IEnumerable<IdNameNumRateDto> dtoIE = _stock.GetQualityStatusFb();
+            return Ok(new
+            {
+                data = dtoIE,
+                code = 0,
+                msg = "鑾峰彇浠撳簱璇︽儏鎴愬姛"
+            });
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇浠撳簱鐘跺喌鎬�
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetWareHouseState()
+        {
+            WarehouseStateDto dto = _stock.GetWareHouseState();
+            return Ok(new
+            {
+                data = dto,
+                code = 0,
+                msg = "鑾峰彇浠撳簱姒傚喌鎴愬姛"
+            });
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇浠撳簱鐘跺喌璇︽儏
+        /// </summary>
+        /// <returns></returns>
+        [HttpGet]
+        public IActionResult GetWareHouseStateInfo()
+        {
+            IEnumerable<WarehouseUseDto> dtoIE = _stock.GetWareHouseStateInfo();
+            return Ok(new
+            {
+                data = dtoIE,
+                code = 0,
+                msg = "鑾峰彇浠撳簱璇︽儏鎴愬姛"
+            });
+        }
+
+
 
         #region 搴撳瓨鏄庣粏
 
@@ -51,9 +127,9 @@
         /// <param name="inspectStatus">璐ㄦ鐘舵��</param>
         /// <returns></returns>
         [HttpGet]
-        public async Task<IActionResult> GetInventoryList(string selectType, string skuNo, string skuName, string ownerNo, string ownerName, string lotNo, string status, string inspectStatus)
+        public async Task<IActionResult> GetInventoryList(string selectType, string skuNo, string skuName, string ownerNo, string ownerName, string lotNo, string status, string inspectStatus, string wareHouseNo, string areaNo)
         {
-            List<MateDataStockDto> StockList = await _stock.GetDataStockList(selectType, skuNo, skuName, ownerNo, ownerName, lotNo, status, inspectStatus);
+            List<MateDataStockDto> StockList = await _stock.GetDataStockList(selectType, skuNo, skuName, ownerNo, ownerName, lotNo, status, inspectStatus, wareHouseNo, areaNo);
             return Ok(new
             {
                 data = StockList,
@@ -105,13 +181,13 @@
         /// <param name="inspectStatus">璐ㄩ噺鐘舵��</param>
         /// <returns></returns>
         [HttpGet]
-        public IActionResult GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status, 
-            string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName, 
-            string startTime, string endTIme,string WareHouseNo,string AreaNo)
+        public IActionResult GetBindList(string skuNo, string skuName, string palletNo, string lotNo, string boxNo, string status,
+            string inspectMark, string bitPalletMark, string bitBoxMark, string inspectStatus, string ownerNo, string ownerName,
+            string startTime, string endTIme, string WareHouseNo, string AreaNo)
         {
             try
             {
-                List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark, 
+                List<StockDetailDto> boxInfoList = _stockDetail.GetBindList(skuNo, skuName, palletNo, lotNo, boxNo, status, inspectMark,
                     bitPalletMark, bitBoxMark, inspectStatus, ownerNo, ownerName, startTime, endTIme, WareHouseNo, AreaNo);
                 return Ok(new { data = boxInfoList, code = 0, msg = "鑾峰彇鎵樼洏鏄庣粏鎴愬姛" });
             }
@@ -120,6 +196,40 @@
                 return Ok(new { data = "", code = 0, msg = e.Message });
             }
 
+        }
+        /// <summary>
+        /// 鎵樼洏鏄庣粏澶囨敞
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="demo"></param>
+        /// <param name="userId"></param>
+        /// <exception cref="Exception"></exception>
+        [HttpGet]
+        public IActionResult EditStockDetailDemo(int id, string demo)
+        {
+            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.EditStockDetailDemo(id, demo, int.Parse(userId));
+
+
+                return Ok(new { code = 0, msg = "缂栬緫澶囨敞鎴愬姛" });
+
+            }
+            catch (Exception e)
+            {
+                return Ok(new { code = 1, msg = e.Message });
+            }
         }
 
         /// <summary>
@@ -137,7 +247,7 @@
         /// <param name="inspectStatus">璐ㄩ噺鐘舵��</param>
         /// <returns></returns>
         [HttpGet]
-        public IActionResult GetBoxInfo(string id, string skuNo, string skuName, string palletNo, string lotNo, 
+        public IActionResult GetBoxInfo(string id, string skuNo, string skuName, string palletNo, string lotNo,
             string boxNo, string status, string inspectMark, string bitBoxMark, string inspectStatus, string WareHouseNo, string AreaNo)
         {
             try
@@ -447,5 +557,26 @@
         }
 
         #endregion
+
+        #region#琛ユ墦鏍囩
+        /// <summary>
+        /// 琛ユ墦搴撳瓨鏄庣粏绠辩爜
+        /// </summary>
+        /// <param name="model"></param>
+        /// <returns></returns>
+        [HttpPost]
+        public IActionResult GetBuDaLabelList(BuDaLabelBoxVm model)
+        {
+            try
+            {
+                var list = _dataBoxInfo.GetBuDaLabelList(model.BoxNo);
+                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