fix[project]: 修复数据查询指标时,只能查询非算例指标的问题

This commit is contained in:
2026-04-01 19:25:19 +08:00
parent 281e5b69d7
commit 0a007200f0
3 changed files with 8 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ public class SimulationAnalysisController {
@PostMapping("/performanceList")
@Operation(summary = "指标", description = "指标")
public SdmResponse performanceList(@RequestBody SpdmAnalysisPerformanceListReq req) {
req.setIsExportFlag(false);
return taskService.analysisPerformanceList(req);
}

View File

@@ -142,4 +142,7 @@ public class SpdmAnalysisPerformanceListReq extends BaseEntity {
private String discipline;
// 是否导出标志
private Boolean isExportFlag = false;
}

View File

@@ -1972,7 +1972,9 @@ public class TaskServiceImpl implements ITaskService {
}
} else {
// 不传runId 为导出任务下的指标 筛除掉算例下的指标
performanceNodePoList = performanceNodePoList.stream().filter(performance -> StringUtils.isEmpty(performance.getRunId())).toList();
if (req.getIsExportFlag()) {
performanceNodePoList = performanceNodePoList.stream().filter(performance -> StringUtils.isEmpty(performance.getRunId())).toList();
}
}
if (CollectionUtils.isEmpty(performanceNodePoList)) {
log.info("指标查询中未查询到指标3");
@@ -4554,6 +4556,7 @@ public class TaskServiceImpl implements ITaskService {
SpdmAnalysisPerformanceListReq spdmAnalysisPerformanceListReq = new SpdmAnalysisPerformanceListReq();
BeanUtils.copyProperties(req.getParams(), spdmAnalysisPerformanceListReq);
spdmAnalysisPerformanceListReq.setTaskNodeId(req.getParams().getTaskId());
spdmAnalysisPerformanceListReq.setIsExportFlag(true);
SdmResponse response = analysisPerformanceList(spdmAnalysisPerformanceListReq);
if (ObjectUtils.isEmpty(response)) {
log.error("exportRunByScript未查询到任务1");