From 853f7a71577bd8694c848985e1eb21c74d30eba9 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 21 四月 2026 21:19:23 +0800
Subject: [PATCH] fix(WCS): 修复输送线任务处理逻辑并更新设备映射

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs
index 012d9ad..66e8fe1 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoRepository/RobotStateRepository.cs
@@ -1,6 +1,7 @@
 using Newtonsoft.Json;
 using SqlSugar;
 using WIDESEAWCS_Core.BaseRepository;
+using WIDESEAWCS_Core.Helper;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_Model.Models;
 
@@ -49,7 +50,7 @@
 
             // 涔愯閿侊細WHERE IPAddress = @ip AND Version = @expectedVersion锛岀増鏈尮閰嶆墠鏇存柊
             var affectedRows = Db.Updateable<Dt_RobotState>(newState)
-                .Where(x => x.IPAddress == ipAddress && x.Version == expectedVersion)
+                .Where(x => x.IPAddress == ipAddress)
                 .ExecuteCommand();
 
             return affectedRows > 0;
@@ -126,7 +127,11 @@
                 CurrentBatchIndex = state.CurrentBatchIndex,
                 ChangePalletPhase = state.ChangePalletPhase,
                 IsScanNG = state.IsScanNG,
-                BatteryArrived = state.BatteryArrived
+                BatteryArrived = state.BatteryArrived,
+                CellBarcodeJson = state.CellBarcode.ToJson(),
+                LastPickPositionsJson = state.LastPickPositions.ToJson(),
+                CurrentTaskJson = state.CurrentTask.ToJson(),
+                LastPutPositionsJson = state.LastPutPositions.ToJson(),
             };
 
             // 搴忓垪鍖栧鏉傚璞′负 JSON

--
Gitblit v1.9.3