新增:CID审批电子流结果回调,增加知识库和仿真地图场景

This commit is contained in:
yangyang01000846
2025-11-07 17:24:43 +08:00
parent e84c9df244
commit e92009da91
12 changed files with 221 additions and 28 deletions

View File

@@ -161,11 +161,11 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
ApproveStrategy strategy = approveStrategyFactory.getStrategy(approveMetadataInfo.getApproveType());
boolean result = strategy.handle(context);
return result ? SdmResponse.success("审批状态修改成功") :
SdmResponse.failed("审批状态修改失败");
return result ? SdmResponse.success("仿真知识库审批状态修改成功") :
SdmResponse.failed("仿真知识库审批状态修改失败");
} catch (Exception e) {
log.error("approveDataFile handle error", e);
return SdmResponse.failed("审批处理异常:" + e.getMessage());
return SdmResponse.failed("仿真知识库审批处理异常:" + e.getMessage());
}
}
@@ -844,7 +844,7 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
if (ObjectUtils.isEmpty(dirMetadataInfo)) {
return SdmResponse.failed("文件夹不存在");
}
String oldDirMinioObjectKey = dirMetadataInfo.getObjectKey();
boolean hasWritePermission = fileUserPermissionService.hasFilePermission(dirMetadataInfo.getId(), ThreadLocalContext.getUserId(), Constants.FilePermission.WRITE);
@@ -1499,8 +1499,9 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
// 发起仿真知识库文件审核 true 成功 false失败
private boolean launchFileDataApprove(String templateId, String templateName,String approveContents,int approveAction)
{
boolean result = false;
LaunchApproveReq req = new LaunchApproveReq();
try {
LaunchApproveReq req = new LaunchApproveReq();
// 评审流程模版ID 前端传过来
req.templateId = templateId;
// req.templateId = "P202511041416483446SFON";
@@ -1523,11 +1524,17 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
// req.userId = 1979078323595476993l;
// 审批创建者
req.creator = ThreadLocalContext.getUserId();
// req.creator = 1979078323595476993l;
SdmResponse response = approveFeignClient.launchApproval(req);
if(response.isSuccess()){
result = true;
}
return response.isSuccess();
} catch (Exception e) {
log.error("launchFileDataApprove error :{}",e);
}finally {
if(!result){
log.warn("launchFileDataApprove fileData failed:{}",JSONObject.toJSONString(req));
}
}
return false;
}