From c9a1df9c19a64844d05d120ff171f523d77e7823 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 25 四月 2026 22:15:36 +0800
Subject: [PATCH] Merge branch 'xiaoyang' into dev

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
index 03fa684..2a154b9 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
@@ -584,6 +584,26 @@
         }
 
         /// <summary>
+        /// 鏍规嵁鎵樼洏鍙锋煡璇㈠簱瀛樻槑缁嗘暟閲�
+        /// </summary>
+        /// <param name="palletCode">鎵樼洏鍙�</param>
+        /// <returns>搴撳瓨鏄庣粏鏁伴噺</returns>
+        public async Task<WebResponseContent> GetStockDetailCountByPalletCodeAsync(string palletCode)
+        {
+            WebResponseContent content = new WebResponseContent();
+            if (string.IsNullOrWhiteSpace(palletCode))
+                return content.Error("鎵樼洏鍙蜂笉鑳戒负绌�");
+
+            var stockInfo = StockInfoService.Repository.QueryFirst(s => s.PalletCode == palletCode);
+            if (stockInfo == null)
+                return content.Error("鎵樼洏涓嶅瓨鍦�");
+
+            var count = await StockInfoDetailService.Repository.Db.Queryable<Dt_StockInfoDetail>()
+                .CountAsync(d => d.StockId == stockInfo.Id);
+            return content.OK("鏌ヨ鎴愬姛", new { PalletCode = palletCode, DetailCount = count });
+        }
+
+        /// <summary>
         /// 鏍规嵁璁惧鍚嶇О鍜屾墭鐩樺彿瑙f瀽MES璁惧閰嶇疆
         /// </summary>
         /// <param name="deviceName">璁惧鍚嶇О</param>

--
Gitblit v1.9.3