From 1b3d57f133b494114c1cdd30627c7057eecdf1b1 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期一, 28 七月 2025 10:02:51 +0800
Subject: [PATCH] 修复时间戳解析和数据验证逻辑

---
 config/modbus_config.json |   42 ++++++++++++++++++++++++------------------
 1 files changed, 24 insertions(+), 18 deletions(-)

diff --git a/config/modbus_config.json b/config/modbus_config.json
index af48705..0a3b1f4 100644
--- a/config/modbus_config.json
+++ b/config/modbus_config.json
@@ -1,15 +1,15 @@
 {
   "ConfigVersion": "1.0",
-  "ProjectName": "GSModbus閫氱敤閰嶇疆",
-  "Description": "閫氱敤Modbus TCP閫氫俊閰嶇疆鏂囦欢",
-  
+  "ProjectName": "娑﹁揪椤圭洰",
+  "Description": "娑﹁揪椤圭洰TCP閫氫俊閰嶇疆鏂囦欢",
+
   "Connection": {
-    "IpAddress": "192.168.3.250",
+    "IpAddress": "192.168.1.231",
     "Port": 502,
     "ConnectionTimeoutMs": 5000,
     "OperationTimeoutMs": 3000
   },
-  
+
   "Communication": {
     "HeartbeatIntervalMs": 1000,
     "DataPollingIntervalMs": 500,
@@ -17,7 +17,7 @@
     "ReconnectDelayMs": 3000,
     "MaxRetryCount": 3
   },
-  
+
   "OutputAddresses": {
     "Description": "MES鍙戦�佺粰PLC鐨勫湴鍧�閰嶇疆",
     "HeartbeatAddress": {
@@ -27,11 +27,11 @@
     },
     "DataConfirmationAddress": {
       "Address": 6001,
-      "DataType": "Byte", 
+      "DataType": "Byte",
       "Description": "MES鏁版嵁璇诲彇纭鍦板潃"
     }
   },
-  
+
   "InputAddresses": {
     "Description": "浠嶱LC璇诲彇鐨勫湴鍧�閰嶇疆",
     "ControlSignals": {
@@ -50,7 +50,7 @@
         "Description": "PLC鏁版嵁鍑嗗灏辩华淇″彿"
       }
     },
-    
+
     "ProductData": {
       "ProductModel": {
         "Address": 6004,
@@ -90,13 +90,13 @@
         "Address": 6026,
         "DataType": "Timestamp",
         "Length": 7,
-        "Format": "YYYYMMDDHHMMSS",
+        "Format": "YYYYMMDDHHMM",
         "Encoding": "BigEndian",
         "DisplayName": "璁板綍鏃堕棿",
-        "Description": "鏁版嵁璁板綍鏃堕棿鎴�"
+        "Description": "鏁版嵁璁板綍鏃堕棿鎴筹紝澶х妯″紡瀛樺偍锛屼竴涓瓧鑺備袱涓瓧绗︼紝鏍煎紡锛氬勾鏈堟棩鏃跺垎锛�12浣嶏級"
       }
     },
-    
+
     "MeasurementData": {
       "MinInstallSize": {
         "Address": 6033,
@@ -123,7 +123,7 @@
         "DataType": "Integer",
         "Length": 2,
         "Scale": 0.01,
-        "Unit": "mm", 
+        "Unit": "mm",
         "DecimalPlaces": 2,
         "DisplayName": "琛岀▼",
         "Description": "鎵ц鍣ㄨ绋嬫祴閲忓��"
@@ -180,7 +180,7 @@
       }
     }
   },
-  
+
   "DataTypes": {
     "Description": "鏀寔鐨勬暟鎹被鍨嬪畾涔�",
     "Byte": "鍗曞瓧鑺傛暟鍊� (0-255)",
@@ -190,19 +190,25 @@
     "Float": "娴偣鏁�",
     "Boolean": "甯冨皵鍊�"
   },
-  
+
   "UI": {
     "WindowTitle": "GSModbus - 閫氱敤MES涓嶱LC閫氫俊绯荤粺",
     "AutoStartPolling": false,
     "LogLevel": "Info",
     "MaxLogLines": 1000
   },
-  
+
   "Database": {
     "Enabled": true,
     "Type": "Oracle",
-    "ConnectionString": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.246)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = wr_dev; Password=wrdev",
+    "ConnectionString": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.223)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = rdmes_dev; Password=rdmesdev",
     "AutoCreateTables": true,
-    "DataRetentionDays": 90
+    "DataRetentionDays": 90,
+    "Tables": {
+      "ModbusDataTable": "MODBUS_DATA",
+      "CommunicationLogTable": "COMMUNICATION_LOG",
+      "ErrorLogTable": "ERROR_LOG",
+      "StatisticsTable": "STATISTICS"
+    }
   }
 }
\ No newline at end of file

--
Gitblit v1.9.3