fix:查询性能指标id修改

This commit is contained in:
2026-01-15 16:54:51 +08:00
parent 26708a15da
commit 8e3607bc33
4 changed files with 6 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ public class PerformanceExportExcelParam {
/**
* 任务id
*/
private Integer taskId;
private String taskId;
/**
* 算例id

View File

@@ -43,7 +43,7 @@ public class SimulationPerformanceController implements ISimuluationPerformanceF
*/
@GetMapping("/getTaskPerformance")
@Operation(summary = "获取任务性能指标")
public SdmResponse getTaskPerformance(@NotNull @RequestParam Integer taskId) {
public SdmResponse getTaskPerformance(@NotNull @RequestParam String taskId) {
return simulationPerformanceService.getTaskPerformance(taskId);
}

View File

@@ -20,7 +20,7 @@ import java.util.List;
* @since 2025-10-14
*/
public interface ISimulationPerformanceService extends IService<SimulationPerformance> {
SdmResponse getTaskPerformance(Integer taskId);
SdmResponse getTaskPerformance(String taskId);
SdmResponse<List<PerformanceResp>> getRunPerformance(String runId);
/**

View File

@@ -52,8 +52,8 @@ public class SimulationPerformanceServiceImpl extends ServiceImpl<SimulationPerf
@Override
public SdmResponse getTaskPerformance(Integer taskId) {
SimulationTask simulationTask = simulationTaskService.lambdaQuery().eq(SimulationTask::getId, taskId).one();
public SdmResponse getTaskPerformance(String taskId) {
SimulationTask simulationTask = simulationTaskService.lambdaQuery().eq(SimulationTask::getUuid, taskId).one();
if (simulationTask == null) {
return SdmResponse.failed("未查询到任务");
}
@@ -138,7 +138,7 @@ public class SimulationPerformanceServiceImpl extends ServiceImpl<SimulationPerf
public SdmResponse exportPerformance(PerformanceExportExcelFormat performanceExportExcelFormat, HttpServletResponse httpServletResponse) {
SdmResponse response = new SdmResponse();
PerformanceExportExcelParam params = performanceExportExcelFormat.getParams();
Integer taskId = params.getTaskId();
String taskId = params.getTaskId();
String runId = params.getRunId();
if (taskId == null && runId == null) {
log.error("taskId和runId不能都为空");