更新文件bug修复

This commit is contained in:
2026-01-14 15:28:43 +08:00
parent 4ce2c057cc
commit f1ab7ba107
4 changed files with 11 additions and 7 deletions

View File

@@ -173,7 +173,6 @@ public class FileMetadataInfo implements Serializable {
private String tag10;
@Schema(description= "approvalStatus")
@TableField(value = "approvalStatus", updateStrategy = FieldStrategy.IGNORED)
private String approvalStatus;
// 返回前端 approveType 非0的前端禁止下载、编辑、删除
@@ -182,7 +181,6 @@ public class FileMetadataInfo implements Serializable {
private Integer approveType;
@Schema(description= "tempMetadata")
@TableField(value = "tempMetadata", updateStrategy = FieldStrategy.IGNORED)
private String tempMetadata;
@Schema(description= "cidFlowId:cid审核电子流程id")

View File

@@ -23,7 +23,7 @@ public class UpdateFileReq {
@Schema(description = "文件名")
private String fileName;
@Schema(description = "文件")
@Schema(description = "文件类型")
private Integer fileType;
/**

View File

@@ -1692,6 +1692,7 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
fileMetadataInfo.setRemarks(req.getRemarks());
fileMetadataInfo.setUpdateTime(LocalDateTime.now());
fileMetadataInfo.setUpdaterId(ThreadLocalContext.getUserId());
fileMetadataInfo.setFileType(req.getFileType());
}
fileMetadataInfoService.updateById(fileMetadataInfo);

View File

@@ -30,10 +30,15 @@ public class ModifyMetadataApproveStrategy implements ApproveStrategy {
// 从临时字段获取修改内容并更新
String tempMetadata = metadata.getTempMetadata();
FileMetadataInfo updateInfo = JSONObject.parseObject(tempMetadata, FileMetadataInfo.class);
updateInfo.setTempMetadata(null);
updateInfo.setApprovalStatus(null);
updateInfo.setApproveType(ApproveFileDataTypeEnum.COMPLETED.getCode());
service.updateById(updateInfo);
service.lambdaUpdate().eq(FileMetadataInfo::getId, metadata.getId())
.set(FileMetadataInfo::getProjectId, updateInfo.getProjectId())
.set(FileMetadataInfo::getAnalysisDirectionId, updateInfo.getAnalysisDirectionId())
.set(FileMetadataInfo::getRemarks, updateInfo.getRemarks())
.set(FileMetadataInfo::getTempMetadata, null)
.set(FileMetadataInfo::getApprovalStatus, null)
.set(FileMetadataInfo::getApproveType, ApproveFileDataTypeEnum.COMPLETED.getCode())
.update();
//绑定文件和工况库的关系
List<SimulationPoolInfo> simulationPoolInfoList = updateInfo.getSimulationPoolInfoList();