fix:归档交付物文件
This commit is contained in:
@@ -31,7 +31,7 @@ public enum FileBizTypeEnum {
|
||||
* 云图文件
|
||||
*/
|
||||
@Schema(description = "云图文件", example = "5")
|
||||
CLOUD_FILE(5, "云图文件"),
|
||||
CLOUD_FILE(5, "图片文件"),
|
||||
|
||||
/**
|
||||
* 流程脚本
|
||||
|
||||
@@ -11,4 +11,7 @@ public class CopyFileToTaskReq {
|
||||
|
||||
@Schema(description = "要复制到的文件夹关联uuid")
|
||||
private String parentUuid;
|
||||
|
||||
@Schema(description = "要复制到的文件夹id")
|
||||
private Long parentDirId;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
// 如果文件有后缀,则在文件名和后缀之间插入版本号
|
||||
|
||||
@@ -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("归档文件失败");
|
||||
|
||||
Reference in New Issue
Block a user