| | |
| | | @Autowired |
| | | private ITestDataQueryService testDataQueryService; |
| | | |
| | | /** 创建或编辑测试时可选的来源选项。 */ |
| | | @PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')") |
| | | @GetMapping("/options") |
| | | public AjaxResult options() |
| | |
| | | return success(testService.selectConfigurationOptions()); |
| | | } |
| | | |
| | | /** 按测试状态、接收状态及配置条件分页查询测试列表。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(TTest test) |
| | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** 按测试主键查询测试配置及其业务状态。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:query')") |
| | | @GetMapping("/{testId}") |
| | | public AjaxResult getInfo(@PathVariable Long testId) |
| | |
| | | return success(testService.selectTestById(testId)); |
| | | } |
| | | |
| | | /** 创建待测试记录;创建人取当前登录用户,初始为未开始接收。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:add')") |
| | | @Log(title = "测试管理", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | return success(testService.selectTestById(testId)); |
| | | } |
| | | |
| | | /** 修改尚未开始接收的测试配置;开始接收后由服务层拒绝。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:edit')") |
| | | @Log(title = "测试管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | return success(testService.selectTestById(test.getTestId())); |
| | | } |
| | | |
| | | /** 开始接收动作;只改变系统数据归属,不向设备发送控制命令。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:start')") |
| | | @Log(title = "测试管理", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/start") |
| | |
| | | public record ConsoleDataActionRequest(String dataType, String operationType, String scopeSummary, |
| | | String identitySummary, String changesSummary, String reason, List<DataRevisionItem> overrides) { } |
| | | |
| | | /** 整体删除测试及其全部子数据;不可恢复,不写操作日志、修订或墓碑。 */ |
| | | @PreAuthorize("@ss.hasPermi('system:test:remove')") |
| | | @DeleteMapping("/{testIds}") |
| | | public AjaxResult remove(@PathVariable Long[] testIds) |