fix:归档交付物文件

This commit is contained in:
2026-02-03 14:33:12 +08:00
parent dfc1b60142
commit 0ee4b469b2
4 changed files with 14 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ public enum FileBizTypeEnum {
* 云图文件
*/
@Schema(description = "云图文件", example = "5")
CLOUD_FILE(5, "图文件"),
CLOUD_FILE(5, "文件"),
/**
* 流程脚本

View File

@@ -11,4 +11,7 @@ public class CopyFileToTaskReq {
@Schema(description = "要复制到的文件夹关联uuid")
private String parentUuid;
@Schema(description = "要复制到的文件夹id")
private Long parentDirId;
}

View File

@@ -1421,7 +1421,7 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
String oldDirMinioObjectKey = sourceMetadataInfo.getObjectKey();
// 要挪到的task文件夹
FileMetadataInfo targetParentMetadataInfo = fileMetadataInfoService.lambdaQuery().eq(FileMetadataInfo::getRelatedResourceUuid, req.getParentUuid()).one();
FileMetadataInfo targetParentMetadataInfo = fileMetadataInfoService.lambdaQuery().eq(FileMetadataInfo::getId, req.getParentDirId()).one();
String originalName = sourceMetadataInfo.getOriginalName();
// 如果文件有后缀,则在文件名和后缀之间插入版本号

View File

@@ -2373,7 +2373,15 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
// 图片/曲线/报告结果同步
CopyFileToTaskReq copyFileToTaskReq = new CopyFileToTaskReq();
copyFileToTaskReq.setSourceFileId(keyResult.getFileId());
copyFileToTaskReq.setParentUuid(simulationRun.getTaskId());
String dirName = FileBizTypeEnum.CLOUD_FILE.getDirName();
if (KeyResultTypeEnum.CURVE.getKeyResultType().equals(keyResult.getKeyResultType())) {
dirName = FileBizTypeEnum.CURVE_FILE.getDirName();
} else if (KeyResultTypeEnum.DOCUMENT.getKeyResultType().equals(keyResult.getKeyResultType())) {
dirName = FileBizTypeEnum.REPORT_FILE.getDirName();
}
Long parentDirId = getParentDirId(simulationRun.getTaskId(), dirName);
copyFileToTaskReq.setParentDirId(parentDirId);
SdmResponse response = dataFeignClient.copyFileToTask(copyFileToTaskReq);
if (!response.isSuccess()) {
return SdmResponse.failed("归档文件失败");