fix:同步关键结果到任务
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -104,6 +104,6 @@ public interface ISimulationRunService extends IService<SimulationRun> {
|
||||
|
||||
SdmResponse<TaskRunPo> detail(SpdmTaskRunReq req);
|
||||
|
||||
SdmResponse synKeyResultToTask(KeyResultReq req);
|
||||
SdmResponse syncKeyResultToTask(KeyResultReq req);
|
||||
|
||||
}
|
||||
@@ -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("算例不存在");
|
||||
|
||||
Reference in New Issue
Block a user