Skip to content

Dev #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2025
Merged

Dev #132

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/example-app/example-app-cmd-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-app</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-app/example-app-cmd-meta/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-app</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-app/example-app-query/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-app</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-example</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion example/example-domain/example-domain-leave/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-domain</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-domain/example-domain-user/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-domain</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-example</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion example/example-infra/example-infra-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-infra</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-infra/example-infra-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-infra</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-infra/example-infra-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>example-infra</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion example/example-infra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-example</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion example/example-interface/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-example</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
</parent>

<artifactId>example-interface</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion example/example-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-example</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.4.10</version>
<version>3.4.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</parent>

<artifactId>springboot-example</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>

<name>springboot-example</name>
<description>springboot-example project for Spring Boot</description>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-parent</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>

<url>https://github.com/codingapi/springboot-framewrok</url>
<name>springboot-parent</name>
Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-data-authorization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.codingapi.springboot</groupId>
<artifactId>springboot-parent</artifactId>
<version>3.4.10</version>
<version>3.4.11</version>
</parent>

<name>springboot-starter-data-authorization</name>
Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-data-fast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>springboot-parent</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.4.10</version>
<version>3.4.11</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion springboot-starter-flow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>springboot-parent</artifactId>
<groupId>com.codingapi.springboot</groupId>
<version>3.4.10</version>
<version>3.4.11</version>
</parent>

<name>springboot-starter-flow</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,38 +85,12 @@ public boolean hasCurrentFlowNodeIsDone() {
return historyRecords.stream().filter(item -> !item.isTransfer()).allMatch(FlowRecord::isDone);
}


/**
* 检测当前流程是否已经完成
* 即流程已经进行到了最终节点且审批意见为同意
*/
public boolean hasCurrentFlowIsFinish() {
if (flowSourceDirection == FlowSourceDirection.PASS && flowNode.isOverNode()) {
return true;
}
return false;
}


/**
* 判断当前流程是否为默认的驳回流程
*/
public boolean isDefaultBackRecord() {
return flowSourceDirection == FlowSourceDirection.REJECT && !flowWork.hasBackRelation();
}

/**
* 判断当前流程是否为通过流程
*/
public boolean isPassRecord() {
return flowSourceDirection == FlowSourceDirection.PASS;
}

/**
* 判断当前流程是否为自定义的驳回流程
*/
public boolean isCustomBackRecord() {
return flowSourceDirection == FlowSourceDirection.REJECT && flowWork.hasBackRelation();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -144,28 +144,6 @@ public void loadDefaultBackNode(FlowRecord currentRecord) {
}


/**
* 加载自定义回退节点
*/
public void loadCustomBackNode(FlowNode flowNode, long parentRecordId) {
FlowNode nextNode = this.matcherNextNode(flowNode, true);
if (nextNode == null) {
throw new IllegalArgumentException("next node not found");
}
IFlowOperator flowOperator = currentOperator;
if (nextNode.isAnyOperatorMatcher()) {
// 如果是任意人员操作时则需要指定为当时审批人员为当前审批人员
FlowRecord preFlowRecord = flowRecordRepository.getFlowRecordById(parentRecordId);
while (preFlowRecord.isTransfer() || !preFlowRecord.getNodeCode().equals(nextNode.getCode())) {
preFlowRecord = flowRecordRepository.getFlowRecordById(preFlowRecord.getPreId());
}
flowOperator = preFlowRecord.getCurrentOperator();
}
this.nextNode = nextNode;
this.nextOperator = flowOperator;
this.backOperator = null;
}


/**
* 获取下一个节点
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,8 @@ private void loadNextNode(List<FlowRecord> historyRecords) {
// 审批通过并进入下一节点
if (flowDirectionService.isPassRecord()) {
flowNodeService.loadNextPassNode(flowNode);
// 审批拒绝返回上一节点
} else if (flowDirectionService.isDefaultBackRecord()) {
} else {
flowNodeService.loadDefaultBackNode(flowRecord);
} else {
// 审批拒绝,并且自定了返回节点
flowNodeService.loadCustomBackNode(flowNode, flowRecord.getPreId());
}
this.nextNode = flowNodeService.getNextNode();
}
Expand Down
Loading