feat: 2.6.0
1. 优化工作流批次默认状态
This commit is contained in:
parent
58302f0f8d
commit
322bdf0804
@ -35,11 +35,6 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.aizuda</groupId>
|
|
||||||
<artifactId>easy-retry-client-common</artifactId>
|
|
||||||
<version>2.5.0</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-tx</artifactId>
|
<artifactId>spring-tx</artifactId>
|
||||||
|
@ -31,7 +31,7 @@ public class WorkflowBatchController {
|
|||||||
return workflowBatchService.listPage(queryVO);
|
return workflowBatchService.listPage(queryVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @LoginRequired
|
@LoginRequired
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
public WorkflowDetailResponseVO getWorkflowBatchDetail(@PathVariable("id") Long id) {
|
public WorkflowDetailResponseVO getWorkflowBatchDetail(@PathVariable("id") Long id) {
|
||||||
return workflowBatchService.getWorkflowBatchDetail(id);
|
return workflowBatchService.getWorkflowBatchDetail(id);
|
||||||
|
@ -3,6 +3,7 @@ package com.aizuda.easy.retry.server.web.service.impl;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||||
import com.aizuda.easy.retry.common.core.enums.JobOperationReasonEnum;
|
import com.aizuda.easy.retry.common.core.enums.JobOperationReasonEnum;
|
||||||
|
import com.aizuda.easy.retry.common.core.enums.JobTaskBatchStatusEnum;
|
||||||
import com.aizuda.easy.retry.common.core.enums.StatusEnum;
|
import com.aizuda.easy.retry.common.core.enums.StatusEnum;
|
||||||
import com.aizuda.easy.retry.server.common.dto.JobTaskConfig;
|
import com.aizuda.easy.retry.server.common.dto.JobTaskConfig;
|
||||||
import com.aizuda.easy.retry.server.common.exception.EasyRetryServerException;
|
import com.aizuda.easy.retry.server.common.exception.EasyRetryServerException;
|
||||||
@ -128,11 +129,9 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
|||||||
nodeInfo.setJobBatchList(JobBatchResponseVOConverter.INSTANCE.jobTaskBatchToJobBatchResponseVOs(jobTaskBatchList));
|
nodeInfo.setJobBatchList(JobBatchResponseVOConverter.INSTANCE.jobTaskBatchToJobBatchResponseVOs(jobTaskBatchList));
|
||||||
// 取第最新的一条状态
|
// 取第最新的一条状态
|
||||||
nodeInfo.setTaskBatchStatus(jobTaskBatchList.get(0).getTaskBatchStatus());
|
nodeInfo.setTaskBatchStatus(jobTaskBatchList.get(0).getTaskBatchStatus());
|
||||||
|
|
||||||
if (jobTaskBatchList.stream()
|
if (jobTaskBatchList.stream()
|
||||||
.map(JobTaskBatch::getOperationReason)
|
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.anyMatch(i -> i == JobOperationReasonEnum.WORKFLOW_NODE_NO_OPERATION_REQUIRED.getReason())) {
|
.anyMatch(WorkflowBatchServiceImpl::isNoOperation)) {
|
||||||
// 当前节点下面的所有节点都是无需处理的节点
|
// 当前节点下面的所有节点都是无需处理的节点
|
||||||
Set<Long> allDescendants = MutableGraphCache.getAllDescendants(graph, nodeInfo.getId());
|
Set<Long> allDescendants = MutableGraphCache.getAllDescendants(graph, nodeInfo.getId());
|
||||||
allNoOperationNode.addAll(allDescendants);
|
allNoOperationNode.addAll(allDescendants);
|
||||||
@ -140,6 +139,10 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
|||||||
// 删除被误添加的节点
|
// 删除被误添加的节点
|
||||||
allNoOperationNode.remove(nodeInfo.getId());
|
allNoOperationNode.remove(nodeInfo.getId());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (JobTaskBatchStatusEnum.NOT_SUCCESS.contains(workflowTaskBatch.getTaskBatchStatus())) {
|
||||||
|
allNoOperationNode.add(nodeInfo.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect(Collectors.toMap(WorkflowDetailResponseVO.NodeInfo::getId, i -> i));
|
.collect(Collectors.toMap(WorkflowDetailResponseVO.NodeInfo::getId, i -> i));
|
||||||
@ -169,4 +172,9 @@ public class WorkflowBatchServiceImpl implements WorkflowBatchService {
|
|||||||
return responseVO;
|
return responseVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isNoOperation(JobTaskBatch i) {
|
||||||
|
return i.getOperationReason() == JobOperationReasonEnum.WORKFLOW_NODE_NO_OPERATION_REQUIRED.getReason()
|
||||||
|
|| i.getTaskBatchStatus() == JobTaskBatchStatusEnum.STOP.getStatus();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
frontend/public/lib/assets/ToN2otMp.css
Normal file
1
frontend/public/lib/assets/ToN2otMp.css
Normal file
File diff suppressed because one or more lines are too long
21
frontend/public/lib/assets/gO-EUyiN.js
Normal file
21
frontend/public/lib/assets/gO-EUyiN.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,16 +1,16 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="zh-CN">
|
<html lang="zh-CN">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Easy Retry</title>
|
<title>Easy Retry</title>
|
||||||
<script type="module" crossorigin src="./assets/JMm1tHoX.js"></script>
|
<script type="module" crossorigin src="./assets/gO-EUyiN.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/7BncgBnW.css">
|
<link rel="stylesheet" crossorigin href="./assets/ToN2otMp.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user