| | |
| | | import com.ruoyi.system.domain.TTest; |
| | | import com.ruoyi.system.domain.TTestResult; |
| | | import com.ruoyi.system.domain.TTestLogicStepMapping; |
| | | import com.ruoyi.system.domain.TTestConsoleDetail; |
| | | import com.ruoyi.system.domain.TTestDataRevisionAction; |
| | | 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 |
| | |
| | | |
| | | @Autowired |
| | | private ITestConsoleDataService consoleDataService; |
| | | |
| | | @Autowired |
| | | private ITestDataQueryService testDataQueryService; |
| | | |
| | | @PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')") |
| | | @GetMapping("/options") |
| | |
| | | return success(testService.selectTestById(testId)); |
| | | } |
| | | |
| | | /** 人工结束接收动作别名;与停止测试共用原子关闭区间和释放租约事务。 */ |
| | | /** 人工结束接收动作别名;与停止测试共用停止请求并进入不可恢复终态的事务。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:stop')") |
| | | @Log(title = "人工结束接收", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/{testId}/reception/end") |
| | |
| | | return success(testService.selectTestById(testId)); |
| | | } |
| | | |
| | | /** 保存工步图表测试详情当前最新版,不参与测试配置、统计或审计。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:edit')") |
| | | @PutMapping("/{testId}/console-detail") |
| | | public AjaxResult saveConsoleDetail(@PathVariable Long testId, @RequestBody TTestConsoleDetail detail) |
| | | { |
| | | testService.saveConsoleDetail(testId, detail, getUserId(), getUsername()); |
| | | return success(testService.selectTestById(testId)); |
| | | } |
| | | |
| | | /** 返回当前测试某类数据的人工覆盖和删除状态,供刷新后恢复展示。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:query')") |
| | | @GetMapping("/{testId}/console-data/{dataType}/overrides") |
| | |
| | | return success(consoleDataService.selectOverrides(testId, dataType)); |
| | | } |
| | | |
| | | /** 查询当前测试成功接收的检测柜与采集器实时观测。 */ |
| | | @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) |