From aefdecd0aa3226b7d00d1dc764241b82658b3be8 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 06 三月 2026 10:41:02 +0800
Subject: [PATCH] 添加机器人客户端;更新 WCS 缓存及任务

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json |   54 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
index a6fcc1f..b0bc7d6 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -1,5 +1,5 @@
 {
-  "urls": "http://*:9291", //web鏈嶅姟绔彛锛屽鏋滅敤IIS閮ㄧ讲锛屾妸杩欎釜鍘绘帀
+  "urls": "http://*:9292", //web鏈嶅姟绔彛锛屽鏋滅敤IIS閮ㄧ讲锛屾妸杩欎釜鍘绘帀
   "Logging": {
     "LogLevel": {
       "Default": "Information",
@@ -41,19 +41,53 @@
   "DBSeedEnable": false,
   "QuartzDBSeedEnable": false,
   "LogDeubgEnable": false, //鏄惁璁板綍璋冭瘯鏃ュ織
-  "PrintSql": true, //鎵撳嵃SQL璇彞
-  "LogAOPEnable": true, //鏄惁璁板綍AOP鏃ュ織
+  "PrintSql": false, //鎵撳嵃SQL璇彞
+  "LogAOPEnable": false, //鏄惁璁板綍AOP鏃ュ織
   "WebSocketEnable": true, //鏄惁寮�鍚疻ebSocket鏈嶅姟
   "WebSocketPort": 9296, //WebSocket鏈嶅姟绔彛
   "SocketServer": {
     "Enabled": true, //鏄惁鍚敤Socket鏈嶅姟鍣�
-    "Port": 2000,  //鐩戝惉绔彛
+    "Port": 2000, //鐩戝惉绔彛
     "IpAddress": "0.0.0.0", //鐩戝惉鍦板潃锛�
-    "Backlog": 1000,   //鏈�澶ц繛鎺ユ暟 
-    "EncodingName": "utf-8",  //缂栫爜鏂瑰紡
-    "AutoDetectEncoding": true,   //鏄惁鑷姩妫�娴嬬紪鐮�
-    "IdleTimeoutSeconds": 300,   //绌洪棽瓒呮椂鏃堕棿锛屽崟浣嶇锛�0琛ㄧず涓嶈秴鏃�
-    "EnableHeartbeat": true,   //鏄惁鍚敤蹇冭烦妫�娴�
-    "LogFilePath": "socketserver.log"  //鏃ュ織鏂囦欢璺緞
+    "Backlog": 1000, //鏈�澶ц繛鎺ユ暟 
+    "EncodingName": "utf-8", //缂栫爜鏂瑰紡
+    "AutoDetectEncoding": true, //鏄惁鑷姩妫�娴嬬紪鐮�
+    "IdleTimeoutSeconds": 0, //绌洪棽瓒呮椂鏃堕棿锛屽崟浣嶇锛�0琛ㄧず涓嶈秴鏃�
+    "EnableHeartbeat": true, //鏄惁鍚敤蹇冭烦妫�娴�
+    "LogFilePath": "socketserver.log" //鏃ュ織鏂囦欢璺緞
+  },
+  "CheckPalletPositions": [
+    {
+      "Code": "11068",
+      "WarehouseId": 1
+    }
+  ],
+  "RedisConfig": {
+    "Enabled": true, //鏄惁鍚敤Redis锛宖alse鏃朵粎浣跨敤鍐呭瓨缂撳瓨
+    "ConnectionString": "127.0.0.1:6379,password=P@ssw0rd,defaultDatabase=0,connectTimeout=5000,abortConnect=false", //Redis杩炴帴瀛楃涓�
+    "InstanceName": "WIDESEAWCS:", //瀹炰緥鍚嶇О锛岀敤浜庡尯鍒嗕笉鍚屽簲鐢�
+    "DefaultDatabase": 0, //榛樿鏁版嵁搴撶储寮曪紙0-15锛�
+    "EnableSentinel": false, //鏄惁鍚敤鍝ㄥ叺妯″紡
+    "SentinelMasterName": "mymaster", //鍝ㄥ叺涓昏妭鐐瑰悕绉�
+    "SentinelEndpoints": [], //鍝ㄥ叺鑺傜偣鍦板潃鍒楄〃锛屽 ["sentinel1:26379","sentinel2:26379"]
+    "PoolSize": 10, //杩炴帴姹犲ぇ灏�
+    "ConnectRetry": 3, //杩炴帴澶辫触閲嶈瘯娆℃暟
+    "SerializerType": "Newtonsoft", //搴忓垪鍖栨柟寮忥細Newtonsoft
+    "FallbackToMemory": true, //Redis涓嶅彲鐢ㄦ椂鏄惁闄嶇骇鍒板唴瀛樼紦瀛�
+    "KeyPrefix": "wcs:", //鍏ㄥ眬Key鍓嶇紑锛岀敤浜庨殧绂讳笉鍚岀郴缁熺殑鏁版嵁
+    "EnableL1Cache": false, //鏄惁鍚敤L1鍐呭瓨缂撳瓨灞傘�傜鐢ㄥ悗鍙娇鐢≧edis锛岄�傜敤浜庨渶瑕佸閮ㄤ慨鏀筊edis鏁版嵁鐨勫満鏅�
+    "EnableAutoSync": false, //鏄惁鍚敤Redis鍒板唴瀛樼紦瀛樼殑鑷姩鍚屾
+    "SyncIntervalSeconds": 30, //鑷姩鍚屾闂撮殧鏃堕棿锛堢锛夛紝寤鸿30-60绉�
+    "SyncBatchSize": 1000, //鍚屾鏃跺崟娆℃壒閲忚幏鍙栫殑Redis key鏁伴噺涓婇檺
+    "SyncExcludePrefixes": [ "wcs:Code:SocketDevices:" ], //鎺掗櫎璁惧鐘舵�乲ey涓嶅弬涓庤嚜鍔ㄥ悓姝ワ紙闃叉瑕嗙洊鏈湴淇敼锛�
+    "Monitoring": {
+      "Enabled": false, //鏄惁鍚敤鐩戞帶
+      "SlowLogThresholdMs": 100, //鎱㈡煡璇㈤槇鍊硷紙姣锛�
+      "HealthCheckIntervalSeconds": 30 //鍋ュ悍妫�鏌ラ棿闅旓紙绉掞級
+    },
+    "Eviction": {
+      "DefaultExpirationSeconds": 3600, //榛樿缂撳瓨杩囨湡鏃堕棿锛堢锛�
+      "MaxMemoryPolicy": "allkeys-lru" //鍐呭瓨娣樻卑绛栫暐锛歛llkeys-lru, volatile-lru, noeviction绛�
+    }
   }
 }

--
Gitblit v1.9.3