wanshenmean
2026-03-27 c1aabd3aaa92b072591fc368d81ab2cc37a0aa14
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
@@ -102,6 +102,8 @@
        public async Task<WebResponseContent> GroupPalletAsync(StockDTO stock)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
            var now = DateTime.Now;
            var details = stock.Details.Select(item => new Dt_StockInfoDetail
            {
@@ -143,6 +145,11 @@
                return result ? content.OK("组盘成功") : content.Error("组盘失败");
            });
        }
            catch (Exception ex)
            {
                return content.Error($"组盘失败: {ex.Message}");
            }
        }
        /// <summary>
        /// 换盘
@@ -150,6 +157,8 @@
        public async Task<WebResponseContent> ChangePalletAsync(StockDTO stock)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
            if (stock == null ||
                string.IsNullOrWhiteSpace(stock.TargetPalletNo) ||
                string.IsNullOrWhiteSpace(stock.SourcePalletNo) ||
@@ -200,6 +209,11 @@
                return content.OK("换盘成功");
            });
        }
            catch (Exception ex)
            {
                return content.Error($"换盘失败: {ex.Message}");
            }
        }
        /// <summary>
        /// 拆盘
@@ -207,6 +221,8 @@
        public async Task<WebResponseContent> SplitPalletAsync(StockDTO stock)
        {
            WebResponseContent content = new WebResponseContent();
            try
            {
            if (stock == null || string.IsNullOrWhiteSpace(stock.SourcePalletNo))
                return content.Error("源托盘号不能为空");
@@ -239,6 +255,11 @@
                return content.OK("拆盘成功");
            });
        }
            catch (Exception ex)
            {
                return content.Error($"拆盘失败: {ex.Message}");
            }
        }
        /// <summary>
        /// 堆垛机换盘后更新库存信息(清空库位信息)