From f288ccc545f8cc32bc922c96dfb3cab9a1f92ec6 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期一, 20 四月 2026 00:49:55 +0800
Subject: [PATCH] feat: 初始化WMS前端项目并实现基础功能

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs |   59 +++++++++++++++++++++++++++++------------------------------
 1 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs
index efcaac0..8477545 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/RobotState/Dt_RobotState.cs
@@ -1,4 +1,3 @@
-using Newtonsoft.Json;
 using SqlSugar;
 using WIDESEAWCS_Core.DB.Models;
 
@@ -8,7 +7,7 @@
     /// 鏈烘鎵嬬姸鎬佹暟鎹簱瀹炰綋
     /// </summary>
     /// <remarks>
-    /// 瀵瑰簲鏁版嵁搴撹〃 Dt_RobotState锛屼娇鐢� RowVersion 瀹炵幇涔愯骞跺彂鎺у埗銆�
+    /// 瀵瑰簲鏁版嵁搴撹〃 Dt_RobotState锛屼娇鐢� Version 瀛楁瀹炵幇涔愯骞跺彂鎺у埗銆�
     /// 澶嶆潅瀵硅薄锛圧obotCrane銆丆urrentTask銆佹暟缁勭瓑锛変互 JSON 瀛楃涓插瓨鍌ㄣ��
     /// </remarks>
     [SugarTable(nameof(Dt_RobotState), "鏈烘鎵嬬姸鎬佽〃")]
@@ -23,141 +22,141 @@
         /// <summary>
         /// 鏈烘鎵� IP 鍦板潃锛屽敮涓�绱㈠紩
         /// </summary>
-        [SugarColumn(Length = 50, ColumnDescription = "鏈烘鎵婭P鍦板潃", IsJsonKey = true)]
+        [SugarColumn(Length = 50, ColumnDescription = "鏈烘鎵婭P鍦板潃")]
         public string IPAddress { get; set; } = string.Empty;
 
         /// <summary>
-        /// 琛岀増鏈紝鐢ㄤ簬涔愯骞跺彂鎺у埗
+        /// 鐗堟湰鍙凤紝鐢ㄤ簬涔愯骞跺彂鎺у埗
         /// </summary>
         /// <remarks>
-        /// SqlSugar 浼氳嚜鍔ㄧ鐞嗘瀛楁锛屾瘡娆℃洿鏂版椂鏁版嵁搴撹嚜鍔ㄩ�掑銆�
-        /// 鏇存柊鏃� WHERE RowVersion = @expectedRowVersion锛屾鏌ュ奖鍝嶈鏁板垽鏂槸鍚﹀啿绐併��
+        /// 姣忔鏇存柊鏃惰嚜澧炪�傛洿鏂版椂 WHERE IPAddress = @ip AND Version = @expectedVersion銆�
+        /// 濡傛灉褰卞搷琛屾暟涓� 0锛岃鏄庣増鏈笉鍖归厤锛岃繑鍥� false銆�
         /// </remarks>
-        [SugarColumn(ColumnDescription = "琛岀増鏈紙涔愯閿侊級", IsJsonKey = true)]
-        public byte[] RowVersion { get; set; } = Array.Empty<byte>();
+        [SugarColumn(ColumnDescription = "鐗堟湰鍙凤紙涔愯閿侊級")]
+        public long Version { get; set; }
 
         /// <summary>
         /// 鏄惁宸茶闃呮秷鎭簨浠�
         /// </summary>
-        [SugarColumn(ColumnDescription = "鏄惁宸茶闃呮秷鎭簨浠�", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鏄惁宸茶闃呮秷鎭簨浠�")]
         public bool IsEventSubscribed { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬭繍琛屾ā寮�
         /// </summary>
         /// <remarks>1: 鎵嬪姩妯″紡, 2: 鑷姩妯″紡</remarks>
-        [SugarColumn(ColumnDescription = "杩愯妯″紡", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "杩愯妯″紡", IsNullable = true)]
         public int? RobotRunMode { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬫帶鍒舵ā寮�
         /// </summary>
         /// <remarks>1: 瀹㈡埛绔帶鍒�, 2: 鍏朵粬</remarks>
-        [SugarColumn(ColumnDescription = "鎺у埗妯″紡", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鎺у埗妯″紡", IsNullable = true)]
         public int? RobotControlMode { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬫墜鑷傛姄鍙栧璞$姸鎬�
         /// </summary>
         /// <remarks>0: 鏃犵墿鏂欙紙鎵嬭噦绌洪棽锛�, 1: 鏈夌墿鏂欙紙宸叉姄鍙栬揣鐗╋級</remarks>
-        [SugarColumn(ColumnDescription = "鎵嬭噦鎶撳彇鐘舵��", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鎵嬭噦鎶撳彇鐘舵��", IsNullable = true)]
         public int? RobotArmObject { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬭澶囧熀纭�淇℃伅锛圝SON 搴忓垪鍖栵級
         /// </summary>
-        [SugarColumn(Length = 2000, ColumnDescription = "璁惧淇℃伅JSON", IsJsonKey = true)]
-        public string RobotCraneJson { get; set; } = string.Empty;
+        [SugarColumn(Length = 2000, ColumnDescription = "璁惧淇℃伅JSON", IsNullable = true)]
+        public string? RobotCraneJson { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬪垵濮嬪寲瀹屾垚鍥炲埌寰呮満浣嶇姸鎬�
         /// </summary>
         /// <remarks>Possible values: "Homed", "Homing"</remarks>
-        [SugarColumn(Length = 50, ColumnDescription = "鍥為浂鐘舵��", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 50, ColumnDescription = "鍥為浂鐘舵��", IsNullable = true)]
         public string? Homed { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬪綋鍓嶆鍦ㄦ墽琛岀殑鍔ㄤ綔
         /// </summary>
-        [SugarColumn(Length = 50, ColumnDescription = "褰撳墠鍔ㄤ綔", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 50, ColumnDescription = "褰撳墠鍔ㄤ綔", IsNullable = true)]
         public string? CurrentAction { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬪綋鍓嶈繍琛岀姸鎬�
         /// </summary>
-        [SugarColumn(Length = 50, ColumnDescription = "杩愯鐘舵��", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 50, ColumnDescription = "杩愯鐘舵��", IsNullable = true)]
         public string? OperStatus { get; set; }
 
         /// <summary>
         /// 鏈�杩戜竴娆″彇璐у畬鎴愮殑浣嶇疆鏁扮粍锛圝SON锛�
         /// </summary>
-        [SugarColumn(Length = 500, ColumnDescription = "鍙栬揣浣嶇疆鏁扮粍JSON", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 500, ColumnDescription = "鍙栬揣浣嶇疆鏁扮粍JSON", IsNullable = true)]
         public string? LastPickPositionsJson { get; set; }
 
         /// <summary>
         /// 鏈�杩戜竴娆℃斁璐у畬鎴愮殑浣嶇疆鏁扮粍锛圝SON锛�
         /// </summary>
-        [SugarColumn(Length = 500, ColumnDescription = "鏀捐揣浣嶇疆鏁扮粍JSON", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 500, ColumnDescription = "鏀捐揣浣嶇疆鏁扮粍JSON", IsNullable = true)]
         public string? LastPutPositionsJson { get; set; }
 
         /// <summary>
         /// 鐢垫睜/璐т綅鏉$爜鍒楄〃锛圝SON锛�
         /// </summary>
-        [SugarColumn(Length = 2000, ColumnDescription = "鐢佃姱鏉$爜鍒楄〃JSON", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 2000, ColumnDescription = "鐢佃姱鏉$爜鍒楄〃JSON", IsNullable = true)]
         public string? CellBarcodeJson { get; set; }
 
         /// <summary>
         /// 鏈烘鎵嬪綋鍓嶆鍦ㄦ墽琛岀殑浠诲姟锛圝SON 搴忓垪鍖栵級
         /// </summary>
-        [SugarColumn(Length = 2000, ColumnDescription = "褰撳墠浠诲姟JSON", IsNullable = true, IsJsonKey = true)]
+        [SugarColumn(Length = 2000, ColumnDescription = "褰撳墠浠诲姟JSON", IsNullable = true)]
         public string? CurrentTaskJson { get; set; }
 
         /// <summary>
         /// 鏄惁闇�瑕佹墽琛屾媶鐩樹换鍔�
         /// </summary>
-        [SugarColumn(ColumnDescription = "鏄惁鎷嗙洏浠诲姟", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鏄惁鎷嗙洏浠诲姟")]
         public bool IsSplitPallet { get; set; }
 
         /// <summary>
         /// 鏄惁闇�瑕佹墽琛岀粍鐩樹换鍔�
         /// </summary>
-        [SugarColumn(ColumnDescription = "鏄惁缁勭洏浠诲姟", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鏄惁缁勭洏浠诲姟")]
         public bool IsGroupPallet { get; set; }
 
         /// <summary>
         /// 鏈哄櫒浜哄凡澶勭悊鐨勪换鍔℃�绘暟
         /// </summary>
-        [SugarColumn(ColumnDescription = "宸插鐞嗕换鍔℃�绘暟", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "宸插鐞嗕换鍔℃�绘暟")]
         public int RobotTaskTotalNum { get; set; }
 
         /// <summary>
         /// 鏄惁澶勪簬鍋囩數鑺ˉ鍏呮ā寮�
         /// </summary>
-        [SugarColumn(ColumnDescription = "鏄惁鍋囩數鑺ā寮�", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鏄惁鍋囩數鑺ā寮�")]
         public bool IsInFakeBatteryMode { get; set; }
 
         /// <summary>
         /// 褰撳墠鎵规璧峰缂栧彿
         /// </summary>
-        [SugarColumn(ColumnDescription = "褰撳墠鎵规缂栧彿", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "褰撳墠鎵规缂栧彿")]
         public int CurrentBatchIndex { get; set; } = 1;
 
         /// <summary>
         /// 鎹㈢洏浠诲姟褰撳墠闃舵
         /// </summary>
-        [SugarColumn(ColumnDescription = "鎹㈢洏闃舵", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鎹㈢洏闃舵")]
         public int ChangePalletPhase { get; set; }
 
         /// <summary>
         /// 鏄惁鎵爜NG
         /// </summary>
-        [SugarColumn(ColumnDescription = "鏄惁鎵爜NG", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鏄惁鎵爜NG")]
         public bool IsScanNG { get; set; }
 
         /// <summary>
         /// 鏄惁鐢佃姱鍒颁綅
         /// </summary>
-        [SugarColumn(ColumnDescription = "鐢佃姱鏄惁鍒颁綅", IsJsonKey = true)]
+        [SugarColumn(ColumnDescription = "鐢佃姱鏄惁鍒颁綅")]
         public bool BatteryArrived { get; set; }
     }
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3