yeg
2026-08-30 b985e6140e7f395ead7dc55e41e6b16d97f9f02b
ruoyi-device/src/main/java/com/ruoyi/device/simulator/InMemoryBtsSimulatorStateStore.java
@@ -41,8 +41,13 @@
    public synchronized void save(SimulatorState state, List<CollectorHistoryAppend> historyAppends)
    {
        for (CollectorHistoryAppend append : historyAppends)
            collectorHistory.computeIfAbsent(append.collectorCode(), key -> new ArrayList<>())
                    .addAll(append.records());
        {
            ArrayList<CollectorMeasurementRecord> history = collectorHistory.computeIfAbsent(
                    append.collectorCode(), key -> new ArrayList<>());
            history.addAll(append.records());
            int overflow = history.size() - (int) MAX_HISTORY_RECORDS;
            if (overflow > 0) history.subList(0, overflow).clear();
        }
        this.state = state;
    }