Skip to content

Commit a50655d

Browse files
committed
update 2.9.28
1 parent b89edde commit a50655d

File tree

17 files changed

+201
-19
lines changed

17 files changed

+201
-19
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>2.9.27</version>
18+
<version>2.9.28</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.9.27</version>
9+
<version>2.9.28</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-data-authorization</artifactId>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>2.9.27</version>
8+
<version>2.9.28</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>springboot-parent</artifactId>
88
<groupId>com.codingapi.springboot</groupId>
9-
<version>2.9.27</version>
9+
<version>2.9.28</version>
1010
</parent>
1111

1212
<name>springboot-starter-flow</name>

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/FlowNode.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ public FlowRecord createRecord(long workId,
217217
String title,
218218
IFlowOperator createOperator,
219219
IFlowOperator currentOperator,
220-
BindDataSnapshot snapshot) {
220+
BindDataSnapshot snapshot,
221+
boolean isWaiting) {
221222

222223
// 当前操作者存在委托人时,才需要寻找委托人
223224
IFlowOperator flowOperator = currentOperator;
@@ -239,7 +240,7 @@ public FlowRecord createRecord(long workId,
239240
record.setPreId(preId);
240241
record.setTitle(title);
241242
record.setTimeoutTime(this.loadTimeoutTime());
242-
record.setFlowType(FlowType.TODO);
243+
record.setFlowType(isWaiting?FlowType.WAITING:FlowType.TODO);
243244
record.setErrMessage(null);
244245
record.setSnapshotId(snapshot.getId());
245246
return record;

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/domain/Opinion.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public class Opinion {
3333
public static final int RESULT_REJECT = 3;
3434
// 审批结果 抄送
3535
public static final int RESULT_CIRCULATE = 4;
36+
// 审批结果 等待
37+
public static final int RESULT_WAITING = 5;
38+
3639

3740
/**
3841
* 审批意见
@@ -88,6 +91,10 @@ public static Opinion transfer(String advice) {
8891
return new Opinion(advice, RESULT_TRANSFER, TYPE_DEFAULT);
8992
}
9093

94+
public static Opinion waiting(String advice) {
95+
return new Opinion(advice, RESULT_WAITING, TYPE_DEFAULT);
96+
}
97+
9198
public static Opinion unSignAutoSuccess() {
9299
return new Opinion("非会签自动审批", RESULT_PASS, TYPE_AUTO);
93100
}
@@ -104,6 +111,10 @@ public boolean isSuccess() {
104111
return result == RESULT_PASS;
105112
}
106113

114+
public boolean isWaiting() {
115+
return result == RESULT_WAITING;
116+
}
117+
107118
public boolean isReject() {
108119
return result == RESULT_REJECT;
109120
}

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/em/FlowType.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ public enum FlowType {
2020
/**
2121
* 转办
2222
*/
23-
TRANSFER;
23+
TRANSFER,
24+
/**
25+
* 等待执行
26+
*/
27+
WAITING;
2428

2529

2630
public static FlowType parser(String type){

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/record/FlowRecord.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,13 @@ public boolean isFinish() {
321321
return this.flowStatus == FlowStatus.FINISH;
322322
}
323323

324+
/**
325+
* 是否等待
326+
*/
327+
public boolean isWaiting() {
328+
return this.flowType == FlowType.WAITING;
329+
}
330+
324331
/**
325332
* 是否是待办
326333
*/

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowDirectionService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ public void bindHistoryRecords(List<FlowRecord> historyRecords) {
4040
* 解析当前的审批方向
4141
*/
4242
public void loadFlowSourceDirection() {
43-
if (opinion.isSuccess()) {
43+
if (opinion.isSuccess() || opinion.isWaiting()) {
4444
flowSourceDirection = FlowSourceDirection.PASS;
4545
}
4646
if (opinion.isReject()) {
4747
flowSourceDirection = FlowSourceDirection.REJECT;
4848
}
4949
}
5050

51-
5251
/**
5352
* 重新加载审批方向
5453
* 根据会签结果判断是否需要重新设置审批方向

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/service/FlowNodeService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ private List<FlowRecord> createNextRecord() {
264264
String recordTitle = nextNode.generateTitle(flowSession);
265265
recordList = new ArrayList<>();
266266
for (IFlowOperator operator : operators) {
267-
FlowRecord record = nextNode.createRecord(workId, flowWork.getCode(), processId, preId, recordTitle, createOperator, operator, snapshot);
267+
FlowRecord record = nextNode.createRecord(workId, flowWork.getCode(), processId, preId, recordTitle, createOperator, operator, snapshot, opinion.isWaiting());
268268
recordList.add(record);
269269
}
270270
}
@@ -294,7 +294,7 @@ private List<FlowRecord> errMatcher(FlowNode currentNode, IFlowOperator currentO
294294
for (IFlowOperator operator : operators) {
295295
FlowSession content = new FlowSession(flowRecord, flowWork, currentNode, createOperator, operator, snapshot.toBindData(), opinion, historyRecords);
296296
String recordTitle = currentNode.generateTitle(content);
297-
FlowRecord record = currentNode.createRecord(flowWork.getId(), flowWork.getCode(), processId, preId, recordTitle, createOperator, operator, snapshot);
297+
FlowRecord record = currentNode.createRecord(flowWork.getId(), flowWork.getCode(), processId, preId, recordTitle, createOperator, operator, snapshot, opinion.isWaiting());
298298
recordList.add(record);
299299
}
300300
return recordList;
@@ -312,7 +312,7 @@ private List<FlowRecord> errMatcher(FlowNode currentNode, IFlowOperator currentO
312312
if (!matcherOperators.isEmpty()) {
313313
for (IFlowOperator matcherOperator : matcherOperators) {
314314
String recordTitle = node.generateTitle(content);
315-
FlowRecord record = node.createRecord(flowWork.getId(), flowWork.getCode(), processId, preId, recordTitle, createOperator, matcherOperator, snapshot);
315+
FlowRecord record = node.createRecord(flowWork.getId(), flowWork.getCode(), processId, preId, recordTitle, createOperator, matcherOperator, snapshot, opinion.isWaiting());
316316
recordList.add(record);
317317
}
318318
}

0 commit comments

Comments
 (0)