yeg
2026-08-31 9bd8e752b5d7ba7177fa16d74565b741699f5c22
ruoyi-system/src/main/java/com/ruoyi/system/service/ITestLiveService.java
@@ -3,6 +3,7 @@
import java.time.Instant;
import java.util.List;
import java.util.Map;
import com.ruoyi.system.domain.TTestIntegrityIssue;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
/** 提供测试控制台的双状态实时事实与鉴权 SSE。 */
@@ -14,7 +15,13 @@
    /** 打开实时 SSE;连接初次发送当前事实,后续只推送最新快照。 */
    SseEmitter stream(Long testId);
    record LiveState(Long testId, String testStatus, String receptionStatus, Instant updatedAt,
            List<LiveSource> sources, List<Map<String, Object>> exceptions) { }
            List<LiveSource> sources, List<Map<String, Object>> exceptions,
            List<TTestIntegrityIssue> integrityIssues)
    {
        public LiveState(Long testId, String testStatus, String receptionStatus, Instant updatedAt,
                List<LiveSource> sources, List<Map<String, Object>> exceptions)
        { this(testId, testStatus, receptionStatus, updatedAt, sources, exceptions, List.of()); }
    }
    record LiveSource(String sourceType, Long sourceId, String batteryNo, String deviceStatus,
            Map<String, Object> latestSnapshot) { }
}