Merge remote-tracking branch 'origin/main'

This commit is contained in:
2025-12-08 16:29:55 +08:00
3 changed files with 17 additions and 4 deletions

View File

@@ -72,7 +72,7 @@ public class KeyResultReq extends BaseReq {
private MultipartFile file;
@Schema(description = "是否仅曲线上传文件")
private boolean onlyFile;
private boolean onlyFile = false;
/**
* -------------------------------------------------上传交付物使用参数------------------------------------------------

View File

@@ -578,6 +578,8 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
// 解析流程模板中的节点结构,初始化流程节点表
SdmResponse<FlowTemplateResp> flowTemplateResp = flowFeignClient.queryFlowTemplateInfo(simulationRun.getFlowTemplate());
if (flowTemplateResp.getData() != null) {
simulationRun.setProcessDefinitionId(flowTemplateResp.getData().getProcessDefinitionId());
this.updateById(simulationRun);
try {
List<FlowNodeDto> flowNodeDtoList = new ArrayList<>();
ProcessDefinitionDTO definitionDTO = JSON.parseObject(flowTemplateResp.getData().getTemplateContent(), ProcessDefinitionDTO.class);
@@ -609,12 +611,23 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
if (!flowFeignClient.batchAddSimulationFlowNode(addReq).isSuccess()) {
return SdmResponse.failed("新增流程节点失败:{}");
}
// 子算例继承父算例的用户输入参数
if (StringUtils.isNotBlank(simulationRun.getParentId())) {
SimulationRun parentRun = this.lambdaQuery().eq(SimulationRun::getUuid, simulationRun.getParentId()).one();
SdmResponse<ProcessInstanceDetailResponse> parentResp = flowableFeignClient.getProcessAndNodeDetailByInstanceId(parentRun.getProcessDefinitionId(), parentRun.getFlowInstanceId(), parentRun.getUuid());
if (parentResp.getData() != null && CollectionUtils.isNotEmpty(parentResp.getData().getNodes())) {
for (FlowNodeDto flowNodeDto : flowNodeDtoList) {
parentResp.getData().getNodes().stream().filter(i -> StringUtils.equals(i.getId(), flowNodeDto.getNodeId()) && ObjectUtils.isNotEmpty(i.getUserParam())).findFirst().ifPresent(i -> {
Map<String, Object> params = new HashMap<>(i.getUserParam());
flowableFeignClient.saveParamsByDefinitionId(simulationRun.getProcessDefinitionId(), flowNodeDto.getNodeId(), simulationRun.getUuid(), params);
});
}
}
}
} catch (Exception e) {
log.error("解析流程模板json文件失败,flowTemplateId:{}", simulationRun.getFlowTemplate(), e);
throw new RuntimeException("解析流程模板json文件失败:" + e.getMessage(), e);
}
simulationRun.setProcessDefinitionId(flowTemplateResp.getData().getProcessDefinitionId());
this.updateById(simulationRun);
}
}
return SdmResponse.success(simulationRun.getUuid());

View File

@@ -366,7 +366,7 @@ public class SimulationSystemConfigServiceImpl extends BaseService implements IS
queryWrapper.eq(SysFormConfigure::getTenantId, ThreadLocalContext.getTenantId());
List<SysFormConfigure> list = formConfigureService.list(queryWrapper);
if (CollectionUtils.isEmpty(list)) {
return SdmResponse.failed("自定义表单列表为空,请初始化");
return SdmResponse.success();
}
PageInfo<SysFormConfigure> page = new PageInfo<>(list);