From 57451dc26944cb99f9b16c81044d44f7fce681c9 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期一, 27 四月 2026 10:36:44 +0800
Subject: [PATCH] fix: keep flow topology independent from capacity

---
 src/main/java/com/zy/ai/service/impl/FlowTopologySnapshotServiceImpl.java |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/zy/ai/service/impl/FlowTopologySnapshotServiceImpl.java b/src/main/java/com/zy/ai/service/impl/FlowTopologySnapshotServiceImpl.java
index fe94885..e7bbf87 100644
--- a/src/main/java/com/zy/ai/service/impl/FlowTopologySnapshotServiceImpl.java
+++ b/src/main/java/com/zy/ai/service/impl/FlowTopologySnapshotServiceImpl.java
@@ -50,7 +50,7 @@
         Integer targetStationId = capacity.getStationId();
         Integer bufferCapacity = defaultInt(capacity.getBufferCapacity());
         List<Integer> adjacentStationIds = sortedList(adjacencyMap == null ? null : adjacencyMap.get(targetStationId));
-        List<Integer> flowStationIds = buildFlowStationIds(targetStationId, adjacentStationIds, bufferCapacity);
+        List<Integer> flowStationIds = buildFlowStationIds(targetStationId, adjacentStationIds);
         List<AutoTuneStationRuntimeItem> flowRuntimeItems = filterRuntimeByStationIds(stationRuntimeSnapshot, flowStationIds);
         RuntimeCount runtimeCount = calculateRuntimeCount(flowRuntimeItems);
 
@@ -143,18 +143,13 @@
     }
 
     private List<Integer> buildFlowStationIds(Integer targetStationId,
-                                             List<Integer> adjacentStationIds,
-                                             Integer bufferCapacity) {
+                                             List<Integer> adjacentStationIds) {
         LinkedHashSet<Integer> stationIds = new LinkedHashSet<>();
         if (targetStationId != null) {
             stationIds.add(targetStationId);
         }
         stationIds.addAll(sortedList(adjacentStationIds));
-        List<Integer> flowStationIds = new ArrayList<>(stationIds);
-        if (bufferCapacity == null || bufferCapacity <= 0 || flowStationIds.size() <= bufferCapacity) {
-            return flowStationIds;
-        }
-        return new ArrayList<>(flowStationIds.subList(0, bufferCapacity));
+        return new ArrayList<>(stationIds);
     }
 
     private List<AutoTuneStationRuntimeItem> filterRuntimeByStationIds(List<AutoTuneStationRuntimeItem> runtimeItems,

--
Gitblit v1.9.1