| | |
| | | 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。 */ |
| | |
| | | /** 打开实时 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) { } |
| | | } |