fix:同步关键结果到任务

This commit is contained in:
2026-01-21 14:36:45 +08:00
parent b4385edbdc
commit c6a69cb716
3 changed files with 6 additions and 6 deletions

View File

@@ -368,9 +368,9 @@ public class SimulationRunController implements ISimulationRunFeignClient {
/**
* 归档算例下指标图片报告等结果数据到任务下
*/
@PostMapping("/synKeyResultToTask")
public SdmResponse synKeyResultToTask(@RequestBody KeyResultReq req) {
return runService.synKeyResultToTask(req);
@PostMapping("/syncKeyResultToTask")
public SdmResponse syncKeyResultToTask(@RequestBody KeyResultReq req) {
return runService.syncKeyResultToTask(req);
}
}

View File

@@ -104,6 +104,6 @@ public interface ISimulationRunService extends IService<SimulationRun> {
SdmResponse<TaskRunPo> detail(SpdmTaskRunReq req);
SdmResponse synKeyResultToTask(KeyResultReq req);
SdmResponse syncKeyResultToTask(KeyResultReq req);
}

View File

@@ -1539,7 +1539,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
try {
// 获取临时路径中脚本生成的报告
String reportName = "report_" +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) +
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd")) +
".docx";
FileInputStream fileInputStream = new FileInputStream(TEMP_REPORT_PATH + randomId + File.separator + reportName);
fileData = fileInputStream.readAllBytes();
@@ -2040,7 +2040,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
}
@Override
public SdmResponse synKeyResultToTask(KeyResultReq req) {
public SdmResponse syncKeyResultToTask(KeyResultReq req) {
SimulationRun simulationRun = this.lambdaQuery().eq(SimulationRun::getUuid, req.getRunId()).one();
if (simulationRun == null) {
return SdmResponse.failed("算例不存在");