数据存储查询

This commit is contained in:
2025-12-12 16:30:36 +08:00
parent 70580652b0
commit d67e56554e
4 changed files with 19 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ public class DataStorageAnalysisController {
return SdmResponse.success(result);
} catch (Exception e) {
log.error("获取文件空间占用失败", e);
return SdmResponse.failed("获取文件空间占用失败");
return SdmResponse.success();
}
}

View File

@@ -69,7 +69,8 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> response = simuluationNodeFeignClient.getAllNodeByProjectIdAndType(uuid, queryNodeType);
Long tenantId = ThreadLocalContext.getTenantId();
if (!response.isSuccess()) {
return SdmResponse.failed("获取节点信息失败");
log.error("获取节点信息失败");
return SdmResponse.success();
}
List<AllNodeByProjectIdAndTypeResp> nodeLists = response.getData();
@@ -92,7 +93,8 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
.eq(FileMetadataInfo::getTenantId, tenantId)
.list().stream().collect(Collectors.toMap(FileMetadataInfo::getRelatedResourceUuid, FileMetadataInfo::getId));
if (CollectionUtils.isEmpty(uuidToDirIdMap)) {
return SdmResponse.failed("获取节点信息失败");
log.error("获取节点信息失败");
return SdmResponse.success();
}
// fileMetadIds: uuid对应的fileid结合
@@ -136,8 +138,6 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
});
}
return SdmResponse.success(result);
}

View File

@@ -1011,6 +1011,7 @@ package com.sdm.flowable.delegate.handler;
import com.alibaba.fastjson2.JSONObject;
import com.sdm.common.common.SdmResponse;
import com.sdm.common.common.ThreadLocalContext;
import com.sdm.common.entity.flowable.executeConfig.ExportWordScriptExecuteConfig;
import com.sdm.common.entity.req.data.GetFileBaseInfoReq;
import com.sdm.common.entity.req.data.UploadFilesReq;
@@ -1070,8 +1071,14 @@ public class ExportWordScriptHandler implements ExecutionHandler<Map<String, Obj
// 获取当前流程实例参数
String runId = (String) execution.getVariable("runId");
Long userId = (Long) execution.getVariable("userId");
String userName = (String) execution.getVariable("userName");
Long tenantId = (Long) execution.getVariable("tenantId");
ThreadLocalContext.setUserId(userId);
ThreadLocalContext.setUserName(userName);
ThreadLocalContext.setTenantId(tenantId);
String processDefinitionId = execution.getProcessDefinitionId();
log.info("ExportWordScriptHandler 开始执行 runId:{},processDefinitionId:{}, beforeNodeId:{}, currentNodeId:{},fileRegularStr:{}", runId,processDefinitionId, beforeNodeId, currentNodeId,fileRegularStr);
log.info("ExportWordScriptHandler 开始执行 runId:{},userId:{},userName:{},tenantId:{},processDefinitionId:{}, beforeNodeId:{}, currentNodeId:{},fileRegularStr:{}", runId,userId,userName,tenantId,processDefinitionId, beforeNodeId, currentNodeId,fileRegularStr);
ProjecInfoReq projecInfoReq = buildprojectInfoReq(params);
log.info("ExportWordScriptHandler的请求参数 projectInfoReq:{}", projecInfoReq);
@@ -1196,7 +1203,11 @@ public class ExportWordScriptHandler implements ExecutionHandler<Map<String, Obj
log.info("上传文件参数:{}", req);
// 调用上传文件的方法
// 注意:这里应该处理返回值
dataFeignClient.uploadFiles(req);
SdmResponse sdmResponse = dataFeignClient.uploadFiles(req);
if (!sdmResponse.isSuccess()) {
log.error("上传文件失败: {}", sdmResponse.getMessage());
throw new RuntimeException("上传文件失败:");
}
log.info("结果文件已上传到MinIO: {}", resultFilePath);
} catch (Exception e) {
log.error("上传结果文件到MinIO失败: {}", resultFilePath, e);

View File

@@ -18,7 +18,7 @@ import org.springframework.stereotype.Service;
@Slf4j
public class SimulationExternalServiceImpl implements ISimulationExternalService {
@Value("${thirdparty.api.freeLinkUrl}")
@Value("${thirdparty.api.freeLinkUrl:}")
private String freeLinkUrl;
@Autowired