From 58cf80ac4a1f537f531aaea37211903a9603c73a Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 27 三月 2026 12:32:16 +0800
Subject: [PATCH] feat(RouterService): 改造 GetAllWholeRouters 使用缓存

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
index 2d4332c..8e419e8 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/Service/RouterService.cs
@@ -430,8 +430,10 @@
         public List<object> GetAllWholeRouters()
         {
             List<object> data = new List<object>();
-            // 鏌ヨ鎵�鏈夎矾鐢�
-            List<Dt_Router> allRouters = BaseDal.QueryData(x => true);
+            // 浠庣紦瀛樺姞杞藉叆鍙g被鍨嬪拰鍑哄彛绫诲瀷鐨勫叏閲忚矾鐢辨暟鎹苟鍚堝苟
+            List<Dt_Router> inRouters = GetAllRoutersFromCache(RouterInOutType.In.ObjToInt());
+            List<Dt_Router> outRouters = GetAllRoutersFromCache(RouterInOutType.Out.ObjToInt());
+            List<Dt_Router> allRouters = inRouters.Concat(outRouters).ToList();
             // 鏌ヨ鎵�鏈夌粨鏉熺殑璺敱锛屽苟鎸塈d鎺掑簭
             List<Dt_Router> dt_Routers = allRouters.Where(x => x.IsEnd).OrderBy(x => x.Id).ToList();
 

--
Gitblit v1.9.3