From ad64840cc04dac2278ca02f22ddc02b1a218e9cf Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 15 四月 2026 22:44:18 +0800
Subject: [PATCH] feat(机器人任务): 实现换盘任务假电芯补充逻辑

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Robot.cs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Robot.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Robot.cs
index 82b24b2..c897ea3 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Robot.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Robot.cs
@@ -100,7 +100,7 @@
                     if (string.IsNullOrWhiteSpace(stockPalletCode))
                         return WebResponseContent.Instance.Error("婧愭墭鐩樺彿涓嶈兘涓虹┖");
 
-                    stockInfo = await _stockInfoService.GetStockInfoAsync(stockPalletCode);
+                    stockInfo = await _stockInfoService.Repository.QueryDataNavFirstAsync(x => x.PalletCode == stockPalletCode);
                     if (stockInfo == null)
                         return WebResponseContent.Instance.Error($"鎵樼洏[{stockPalletCode}]搴撳瓨涓嶅瓨鍦�");
 
@@ -134,6 +134,7 @@
                     return WebResponseContent.Instance.Error($"鏈烘鎵媨taskName}浠诲姟鍒涘缓澶辫触");
 
                 var wmstaskDto = _mapper.Map<WMSTaskDTO>(task) ?? new WMSTaskDTO();
+                wmstaskDto.TaskQuantity = stock.Details?.Sum(d => d.Quantity) ?? 0;
                 return WebResponseContent.Instance.OK($"鏈烘鎵媨taskName}浠诲姟鍒涘缓鎴愬姛", wmstaskDto);
             }
             catch (Exception ex)

--
Gitblit v1.9.3