wanshenmean
2026-03-30 63d0a623484d720923201d647bac6ea99f88bb62
Code/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs
@@ -232,8 +232,6 @@
                    if (await StockInfo_HtyService.Repository.AddDataAsync(CreateStockHistory(new[] { sourceStock, targetStock }, "换盘")) <= 0)
                        return content.Error("换盘历史记录保存失败");
                    detailEntities.ForEach(d => d.StockId = targetStock.Id);
                    // 调用MES解绑源托盘电芯
                    var unbindRequest = new UnBindContainerRequest
                    {
@@ -249,6 +247,7 @@
                        return content.Error($"换盘成功,但MES解绑失败: {unbindResult?.Data?.Msg ?? unbindResult?.ErrorMessage ?? "未知错误"}");
                    }
                    detailEntities.ForEach(d => d.StockId = targetStock.Id);
                    var result = await StockInfoDetailService.Repository.UpdateDataAsync(detailEntities);
                    if (!result) return content.Error("换盘失败");