From b78295e8da96c3e5e76befeef9582ce5273dbb74 Mon Sep 17 00:00:00 2001
From: yeg <1347747024@qq.com>
Date: 星期二, 29 九月 2026 13:10:23 +0800
Subject: [PATCH] 按代码规范检查整改实体注释、Service Javadoc 与分层边界
---
ruoyi-admin/src/main/java/com/battery/business/web/TTestController.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/battery/business/web/TTestController.java b/ruoyi-admin/src/main/java/com/battery/business/web/TTestController.java
index 6ae85f4..5a8cc59 100644
--- a/ruoyi-admin/src/main/java/com/battery/business/web/TTestController.java
+++ b/ruoyi-admin/src/main/java/com/battery/business/web/TTestController.java
@@ -48,6 +48,7 @@
@Autowired
private ITestDataQueryService testDataQueryService;
+ /** 创建或编辑测试时可选的来源选项。 */
@PreAuthorize("@ss.hasAnyPermi('system:test:add,system:test:edit')")
@GetMapping("/options")
public AjaxResult options()
@@ -55,6 +56,7 @@
return success(testService.selectConfigurationOptions());
}
+ /** 按测试状态、接收状态及配置条件分页查询测试列表。 */
@PreAuthorize("@ss.hasPermi('system:test:list')")
@GetMapping("/list")
public TableDataInfo list(TTest test)
@@ -64,6 +66,7 @@
return getDataTable(list);
}
+ /** 按测试主键查询测试配置及其业务状态。 */
@PreAuthorize("@ss.hasPermi('system:test:query')")
@GetMapping("/{testId}")
public AjaxResult getInfo(@PathVariable Long testId)
@@ -71,6 +74,7 @@
return success(testService.selectTestById(testId));
}
+ /** 创建待测试记录;创建人取当前登录用户,初始为未开始接收。 */
@PreAuthorize("@ss.hasPermi('system:test:add')")
@Log(title = "测试管理", businessType = BusinessType.INSERT)
@PostMapping
@@ -84,6 +88,7 @@
return success(testService.selectTestById(testId));
}
+ /** 修改尚未开始接收的测试配置;开始接收后由服务层拒绝。 */
@PreAuthorize("@ss.hasPermi('system:test:edit')")
@Log(title = "测试管理", businessType = BusinessType.UPDATE)
@PutMapping
@@ -96,6 +101,7 @@
return success(testService.selectTestById(test.getTestId()));
}
+ /** 开始接收动作;只改变系统数据归属,不向设备发送控制命令。 */
@PreAuthorize("@ss.hasPermi('system:test:start')")
@Log(title = "测试管理", businessType = BusinessType.UPDATE)
@PutMapping("/start")
@@ -199,7 +205,7 @@
return success(testDataQueryService.cycles(testId));
}
- /** 一次提交编辑、导入或删除;服务端只追加一条修订行为。 */
+ /** 一次提交编辑、导入或删除;三 Sheet 按数据类型分别追加修订,共享同一事务。 */
@PreAuthorize("@ss.hasPermi('system:test:edit')")
@Log(title = "测试控制台数据修订", businessType = BusinessType.UPDATE)
@PostMapping("/{testId}/console-data/actions")
@@ -213,12 +219,14 @@
action.setOperatorId(getUserId()); action.setOperatorName(getUsername());
Long actionId = consoleDataService.submitAction(action,
request.overrides() == null ? java.util.Collections.emptyList() : request.overrides());
- return success().put("actionId", actionId);
+ return success().put("actionId", actionId).put("actionIds", action.getActionIds())
+ .put("importedCount", action.getImportedCount()).put("skippedCount", action.getSkippedCount());
}
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)
--
Gitblit v1.7.1