feat:查询算例结果文件和指标提供给flowable

This commit is contained in:
2025-12-09 15:45:14 +08:00
parent 895becd730
commit 2b6b9df7f6
12 changed files with 174 additions and 12 deletions

View File

@@ -25,10 +25,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@@ -178,6 +175,11 @@ public class SimulationRunController implements ISimulationRunFeignClient {
return runService.listSimulationKeyResult(req);
}
@GetMapping(value = "/getSimulationKeyResultFileIds")
public SdmResponse<List<Long>> getSimulationKeyResultFileIds(@RequestParam String runId) {
return runService.getSimulationKeyResultFileIds(runId);
}
/**
* 根据交付物文件id查询相关属性和任务信息
*

View File

@@ -59,6 +59,8 @@ public interface ISimulationRunService extends IService<SimulationRun> {
SdmResponse<PageDataResp<List<SimulationRunKeyResult>>> listSimulationKeyResult(KeyResultReq req);
SdmResponse<List<Long>> getSimulationKeyResultFileIds(String runId);
SdmResponse<PageDataResp<List<KeyResultAndTaskInfoResp>>> queryKeyResultAndTaskInfo(KeyResultReq req);
SdmResponse deleteSimulationKeyResult(KeyResultReq req);

View File

@@ -1016,6 +1016,15 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
return PageUtils.getJsonObjectSdmResponse(runKeyResults, page);
}
@Override
public SdmResponse<List<Long>> getSimulationKeyResultFileIds(String runId) {
List<SimulationRunKeyResult> runKeyResults = simulationKeyResultService.lambdaQuery().eq(SimulationRunKeyResult::getRunId, runId).list();
if (CollectionUtils.isNotEmpty(runKeyResults)) {
return SdmResponse.success(runKeyResults.stream().map(SimulationRunKeyResult::getFileId).collect(Collectors.toList()));
}
return SdmResponse.success(new ArrayList<>());
}
@Override
public SdmResponse<PageDataResp<List<KeyResultAndTaskInfoResp>>> queryKeyResultAndTaskInfo(KeyResultReq req) {
List<KeyResultAndTaskInfoResp> respList = new ArrayList<>();