yeg
2026-09-01 0fcd0642efdff8d4e0584fa991aaea2178bc932b
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TTestController.java
@@ -25,6 +25,7 @@
import com.ruoyi.system.domain.TTestDataOverride;
import com.ruoyi.system.service.ITTestService;
import com.ruoyi.system.service.ITestConsoleDataService;
import com.ruoyi.system.service.ITestDataQueryService;
/** 测试管理 Controller。 */
@RestController
@@ -36,6 +37,9 @@
    @Autowired
    private ITestConsoleDataService consoleDataService;
    @Autowired
    private ITestDataQueryService testDataQueryService;
    @PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')")
    @GetMapping("/options")
@@ -161,6 +165,30 @@
        return success(consoleDataService.selectOverrides(testId, dataType));
    }
    /** 只查询已归属并持久化到当前测试的检测柜 record。 */
    @PreAuthorize("@ss.hasPermi('system:test:query')")
    @GetMapping("/{testId}/data/records")
    public AjaxResult persistedRecords(@PathVariable Long testId)
    {
        return success(testDataQueryService.records(testId));
    }
    /** 只查询当前测试持久化采样汇总出的工步事实。 */
    @PreAuthorize("@ss.hasPermi('system:test:query')")
    @GetMapping("/{testId}/data/steps")
    public AjaxResult persistedSteps(@PathVariable Long testId)
    {
        return success(testDataQueryService.steps(testId));
    }
    /** 只查询当前测试持久化采样汇总出的循环事实。 */
    @PreAuthorize("@ss.hasPermi('system:test:query')")
    @GetMapping("/{testId}/data/cycles")
    public AjaxResult persistedCycles(@PathVariable Long testId)
    {
        return success(testDataQueryService.cycles(testId));
    }
    /** 一次提交编辑、导入或删除;服务端只追加一条修订行为。 */
    @PreAuthorize("@ss.hasPermi('system:test:edit')")
    @Log(title = "测试控制台数据修订", businessType = BusinessType.UPDATE)