Skip to content

Commit 2297e2e

Browse files
committed
update 2.9.19
1 parent 5a75142 commit 2297e2e

File tree

10 files changed

+53
-8
lines changed

10 files changed

+53
-8
lines changed

pom.xml

+1-1
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.18</version>
18+
<version>2.9.19</version>
1919

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

springboot-starter-data-authorization/pom.xml

+1-1
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.18</version>
9+
<version>2.9.19</version>
1010
</parent>
1111

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

springboot-starter-data-fast/pom.xml

+1-1
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.18</version>
8+
<version>2.9.19</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-flow/pom.xml

+1-1
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.18</version>
9+
<version>2.9.19</version>
1010
</parent>
1111

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

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/content/FlowSession.java

+25-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import com.codingapi.springboot.flow.domain.FlowNode;
55
import com.codingapi.springboot.flow.domain.FlowWork;
66
import com.codingapi.springboot.flow.domain.Opinion;
7+
import com.codingapi.springboot.flow.em.FlowSourceDirection;
78
import com.codingapi.springboot.flow.error.NodeResult;
89
import com.codingapi.springboot.flow.error.OperatorResult;
910
import com.codingapi.springboot.flow.pojo.FlowResult;
1011
import com.codingapi.springboot.flow.pojo.FlowSubmitResult;
12+
import com.codingapi.springboot.flow.query.FlowRecordQuery;
1113
import com.codingapi.springboot.flow.record.FlowRecord;
1214
import com.codingapi.springboot.flow.result.MessageResult;
1315
import com.codingapi.springboot.flow.service.FlowService;
@@ -66,9 +68,13 @@ public Object getBean(String beanName) {
6668
}
6769

6870

71+
public <T> T getBean(Class<T> clazz) {
72+
return provider.getBean(clazz);
73+
}
74+
6975

7076
/**
71-
* 获取审批意见
77+
* 获取审批意见
7278
*/
7379
public String getAdvice() {
7480
if (opinion != null) {
@@ -177,6 +183,24 @@ public MessageResult rejectFlow() {
177183
return MessageResult.create(result);
178184
}
179185

186+
/**
187+
* 是否为驳回状态
188+
*
189+
* @return 是否为驳回状态
190+
*/
191+
public boolean isRejectState() {
192+
long preId = flowRecord.getPreId();
193+
if (preId == 0) {
194+
return false;
195+
}
196+
FlowRecordQuery flowRecordQuery = getBean(FlowRecordQuery.class);
197+
FlowRecord preRecord = flowRecordQuery.getFlowRecordById(preId);
198+
if (preRecord != null) {
199+
return preRecord.getFlowSourceDirection() == FlowSourceDirection.REJECT;
200+
}
201+
return false;
202+
}
203+
180204

181205
/**
182206
* 预提交流程

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/content/FlowSessionBeanProvider.java

+7
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ public Object getBean(String beanName) {
2727
return null;
2828
}
2929

30+
public <T> T getBean(Class<T> clazz) {
31+
if (spring != null) {
32+
return spring.getBean(clazz);
33+
}
34+
return null;
35+
}
36+
3037
}

springboot-starter-flow/src/main/java/com/codingapi/springboot/flow/query/FlowRecordQuery.java

+14
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,23 @@
1010
public interface FlowRecordQuery {
1111

1212

13+
/**
14+
* 根据ID获取流程记录
15+
* @param id 流程记录ID
16+
* @return 流程记录
17+
*/
18+
FlowRecord getFlowRecordById(long id);
19+
20+
21+
/**
22+
* 查询所有流程记录
23+
* @param pageRequest 分页参数
24+
* @return 流程记录
25+
*/
1326
Page<FlowRecord> findAll(PageRequest pageRequest);
1427

1528

29+
1630
/**
1731
* 查看个人的未读与待办数据
1832
*

springboot-starter-security/pom.xml

+1-1
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.18</version>
9+
<version>2.9.19</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-security</artifactId>

springboot-starter/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.codingapi.springboot</groupId>
77
<artifactId>springboot-parent</artifactId>
8-
<version>2.9.18</version>
8+
<version>2.9.19</version>
99
</parent>
1010
<artifactId>springboot-starter</artifactId>
1111

Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
------------------------------------------------------
2-
CodingApi SpringBoot-Starter 2.9.17
2+
CodingApi SpringBoot-Starter 2.9.19
33
springboot version (${spring-boot.version})
44
------------------------------------------------------

0 commit comments

Comments
 (0)