Merge branch 'main' of http://carsafe.uicp.cn/toolchaintechnologycenter/spdm-backend
This commit is contained in:
@@ -173,7 +173,7 @@ public class FileMetadataInfo implements Serializable {
|
||||
private String tag10;
|
||||
|
||||
@Schema(description= "approvalStatus")
|
||||
@TableField(value = "approvalStatus", updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "approvalStatus")
|
||||
private String approvalStatus;
|
||||
|
||||
// 返回前端 approveType 非0的,前端禁止下载、编辑、删除
|
||||
@@ -182,7 +182,7 @@ public class FileMetadataInfo implements Serializable {
|
||||
private Integer approveType;
|
||||
|
||||
@Schema(description= "tempMetadata")
|
||||
@TableField(value = "tempMetadata", updateStrategy = FieldStrategy.IGNORED)
|
||||
@TableField(value = "tempMetadata")
|
||||
private String tempMetadata;
|
||||
|
||||
@Schema(description= "cidFlowId:cid审核电子流程id")
|
||||
|
||||
@@ -23,7 +23,7 @@ public class UpdateFileReq {
|
||||
@Schema(description = "文件名")
|
||||
private String fileName;
|
||||
|
||||
@Schema(description = "文件名")
|
||||
@Schema(description = "文件类型")
|
||||
private Integer fileType;
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -72,6 +72,9 @@ public class HpcHandler implements ExecutionHandler<Map<String, Object>,HPCExecu
|
||||
String currentNodeId =execution.getCurrentActivityId();
|
||||
String masterFileRegularStr = config.getMasterFileRegularStr();
|
||||
String inputFilesRegularStr = config.getInputFilesRegularStr();
|
||||
if(StringUtils.isBlank(masterFileRegularStr)){
|
||||
throw new RuntimeException("Hpc任务执行失败,主求解文件规则不能是空");
|
||||
}
|
||||
CoreLogger.info("beforeNodeId:{},currentNodeId:{},masterFileRegularStr:{},inputFilesRegularStr:{}",beforeNodeId,currentNodeId,masterFileRegularStr,inputFilesRegularStr);
|
||||
// 初始化用户/租户信息
|
||||
initUserInfo(execution);
|
||||
@@ -138,6 +141,13 @@ public class HpcHandler implements ExecutionHandler<Map<String, Object>,HPCExecu
|
||||
Long userId = (Long) execution.getVariable("userId");
|
||||
String userName = (String) execution.getVariable("userName");
|
||||
Long tenantId = (Long) execution.getVariable("tenantId");
|
||||
log.info("Hpc流程发起,用户id:{},租户id:{}",userId,tenantId);
|
||||
if(Objects.isNull(tenantId)){
|
||||
tenantId=ThreadLocalContext.getTenantId();
|
||||
}
|
||||
if(Objects.isNull(userId)){
|
||||
tenantId=ThreadLocalContext.getUserId();
|
||||
}
|
||||
ThreadLocalContext.setUserId(userId);
|
||||
ThreadLocalContext.setUserName(userName);
|
||||
ThreadLocalContext.setTenantId(tenantId);
|
||||
|
||||
@@ -153,7 +153,7 @@ public class PbsServiceDecorator implements IPbsServiceDecorator {
|
||||
if (response.isSuccess() && StringUtils.isNotEmpty(response.getData())) {
|
||||
jobId = response.getData();
|
||||
}
|
||||
if(StringUtils.isNotEmpty(jobId)){
|
||||
if(StringUtils.isBlank(jobId)){
|
||||
log.error("Hpc执行失败返回结果:{}",JSONObject.toJSONString(response));
|
||||
throw new RuntimeException("Hpc执行失败,返回jobId空");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user