Skip to content

Commit 0be7a52

Browse files
committed
update field
1 parent d8b711f commit 0be7a52

10 files changed

Lines changed: 48 additions & 18 deletions

File tree

flow-engine-framework/src/main/java/com/codingapi/flow/pojo/response/FlowRecordContent.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ public class FlowRecordContent {
1818
/**
1919
* 工作id
2020
*/
21-
private Long workBackupId;
21+
private Long workflowRuntimeId;
22+
/**
23+
* 流程标题
24+
*/
25+
private String workTitle;
2226
/**
2327
* 流程编码
2428
*/
@@ -114,7 +118,7 @@ public class FlowRecordContent {
114118
public static FlowRecordContent convert(FlowRecord record){
115119
FlowRecordContent content = new FlowRecordContent();
116120
content.setProcessId(record.getProcessId());
117-
content.setWorkBackupId(record.getWorkRuntimeId());
121+
content.setWorkflowRuntimeId(record.getWorkRuntimeId());
118122
content.setWorkCode(record.getWorkCode());
119123
content.setNodeId(record.getNodeId());
120124
content.setNodeType(record.getNodeType());
@@ -139,7 +143,7 @@ public static FlowRecordContent convert(FlowRecord record){
139143
public static FlowRecordContent convert(FlowTodoRecord todoRecord){
140144
FlowRecordContent content = new FlowRecordContent();
141145
content.setProcessId(todoRecord.getProcessId());
142-
content.setWorkBackupId(todoRecord.getWorkBackupId());
146+
content.setWorkflowRuntimeId(todoRecord.getWorkflowRuntimeId());
143147
content.setWorkCode(todoRecord.getWorkCode());
144148
content.setNodeId(todoRecord.getNodeId());
145149
content.setNodeType(todoRecord.getNodeType());

flow-engine-framework/src/main/java/com/codingapi/flow/record/FlowRecord.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ public class FlowRecord {
4848
* 工作id
4949
*/
5050
private long workRuntimeId;
51+
52+
/**
53+
* 流程名称
54+
*/
55+
private String workTitle;
5156
/**
5257
* 流程编码
5358
*/
@@ -263,7 +268,8 @@ public FlowRecord(FlowSession flowSession, int nodeOrder) {
263268
// 获取转交之后的审批人
264269
IFlowOperator currentOperator = flowSession.loadFinalForwardOperator(sourceOperator);
265270
this.workCode = flowSession.getWorkCode();
266-
this.workRuntimeId = flowSession.getBackupId();
271+
this.workRuntimeId = flowSession.getWorkflowRuntimeId();
272+
this.workTitle = flowSession.getWorkflow().getTitle();
267273
this.nodeId = flowSession.getCurrentNodeId();
268274
this.nodeType = flowSession.getCurrentNodeType();
269275
this.nodeName = flowSession.getCurrentNodeName();

flow-engine-framework/src/main/java/com/codingapi/flow/record/FlowTodoRecord.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ public class FlowTodoRecord {
2626
/**
2727
* 工作id
2828
*/
29-
private long workBackupId;
29+
private long workflowRuntimeId;
30+
31+
/**
32+
* 流程名称
33+
*/
34+
private String workTitle;
3035
/**
3136
* 流程编码
3237
*/
@@ -114,7 +119,8 @@ public FlowTodoRecord(FlowRecord flowRecord) {
114119

115120
public void update(FlowRecord flowRecord) {
116121
this.processId = flowRecord.getProcessId();
117-
this.workBackupId = flowRecord.getWorkRuntimeId();
122+
this.workflowRuntimeId = flowRecord.getWorkRuntimeId();
123+
this.workTitle = flowRecord.getWorkTitle();
118124
this.workCode = flowRecord.getWorkCode();
119125
this.nodeId = flowRecord.getNodeId();
120126
this.nodeType = flowRecord.getNodeType();

flow-engine-framework/src/main/java/com/codingapi/flow/session/FlowSession.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class FlowSession {
6363
/**
6464
* 流程备份id
6565
*/
66-
private final long backupId;
66+
private final long workflowRuntimeId;
6767

6868
/**
6969
* 审批意见
@@ -79,7 +79,7 @@ public FlowSession(IRepositoryHolder repositoryHolder,
7979
FormData formData,
8080
FlowRecord currentRecord,
8181
List<FlowRecord> currentNodeRecords,
82-
long backupId,
82+
long workflowRuntimeId,
8383
FlowAdvice advice) {
8484
this.repositoryHolder = repositoryHolder;
8585
this.currentOperator = currentOperator;
@@ -89,7 +89,7 @@ public FlowSession(IRepositoryHolder repositoryHolder,
8989
this.currentRecord = currentRecord;
9090
this.currentNodeRecords = currentNodeRecords;
9191
this.formData = formData;
92-
this.backupId = backupId;
92+
this.workflowRuntimeId = workflowRuntimeId;
9393
this.advice = advice;
9494
}
9595

@@ -229,7 +229,7 @@ public Object getFormData(String fieldCode) {
229229
* @return 新的会话
230230
*/
231231
public FlowSession updateSession(IFlowNode currentNode) {
232-
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, backupId, advice);
232+
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, workflowRuntimeId, advice);
233233
}
234234

235235

@@ -240,7 +240,7 @@ public FlowSession updateSession(IFlowNode currentNode) {
240240
* @return 新的会话
241241
*/
242242
public FlowSession updateSession(IFlowAction currentAction) {
243-
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, backupId, advice);
243+
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, workflowRuntimeId, advice);
244244
}
245245

246246
/**
@@ -250,7 +250,7 @@ public FlowSession updateSession(IFlowAction currentAction) {
250250
* @return 新的会话
251251
*/
252252
public FlowSession updateSession(IFlowOperator currentOperator) {
253-
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, backupId, advice);
253+
return new FlowSession(repositoryHolder,currentOperator, workflow, currentNode, currentAction, formData, currentRecord, currentNodeRecords, workflowRuntimeId, advice);
254254
}
255255

256256
}

flow-engine-starter-infra/src/main/java/com/codingapi/flow/infra/convert/FlowRecordContentConvertor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public class FlowRecordContentConvertor {
1111
public static FlowRecordContent convert(FlowTodoRecordEntity todoRecord){
1212
FlowRecordContent content = new FlowRecordContent();
1313
content.setProcessId(todoRecord.getProcessId());
14-
content.setWorkBackupId(todoRecord.getWorkBackupId());
14+
content.setWorkflowRuntimeId(todoRecord.getWorkflowRuntimeId());
15+
content.setWorkTitle(todoRecord.getWorkTitle());
1516
content.setWorkCode(todoRecord.getWorkCode());
1617
content.setNodeId(todoRecord.getNodeId());
1718
content.setNodeType(todoRecord.getNodeType());
@@ -38,7 +39,8 @@ public static FlowRecordContent convert(FlowTodoRecordEntity todoRecord){
3839
public static FlowRecordContent convert(FlowRecordEntity record){
3940
FlowRecordContent content = new FlowRecordContent();
4041
content.setProcessId(record.getProcessId());
41-
content.setWorkBackupId(record.getWorkRuntimeId());
42+
content.setWorkflowRuntimeId(record.getWorkRuntimeId());
43+
content.setWorkTitle(record.getWorkTitle());
4244
content.setWorkCode(record.getWorkCode());
4345
content.setNodeId(record.getNodeId());
4446
content.setNodeType(record.getNodeType());

flow-engine-starter-infra/src/main/java/com/codingapi/flow/infra/convert/FlowRecordConvertor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public static FlowRecord convert(FlowRecordEntity entity) {
1414
}
1515
return new FlowRecord(entity.getId(),
1616
entity.getWorkRuntimeId(),
17+
entity.getWorkTitle(),
1718
entity.getWorkCode(),
1819
entity.getNodeId(),
1920
entity.getNodeType(),
@@ -66,6 +67,7 @@ public static FlowRecordEntity convert(FlowRecord record) {
6667
entity.setId(record.getId());
6768
}
6869
entity.setWorkRuntimeId(record.getWorkRuntimeId());
70+
entity.setWorkTitle(record.getWorkTitle());
6971
entity.setWorkCode(record.getWorkCode());
7072
entity.setNodeId(record.getNodeId());
7173
entity.setNodeType(record.getNodeType());

flow-engine-starter-infra/src/main/java/com/codingapi/flow/infra/convert/FlowTodoRecordConvertor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public static FlowTodoRecord convert(FlowTodoRecordEntity entity){
1212
return new FlowTodoRecord(
1313
entity.getId(),
1414
entity.getProcessId(),
15-
entity.getWorkBackupId(),
15+
entity.getWorkflowRuntimeId(),
16+
entity.getWorkTitle(),
1617
entity.getWorkCode(),
1718
entity.getNodeId(),
1819
entity.getNodeType(),
@@ -43,7 +44,8 @@ public static FlowTodoRecordEntity convert(FlowTodoRecord record){
4344
entity.setId(record.getId());
4445
}
4546
entity.setProcessId(record.getProcessId());
46-
entity.setWorkBackupId(record.getWorkBackupId());
47+
entity.setWorkflowRuntimeId(record.getWorkflowRuntimeId());
48+
entity.setWorkTitle(record.getWorkTitle());
4749
entity.setWorkCode(record.getWorkCode());
4850
entity.setNodeId(record.getNodeId());
4951
entity.setNodeType(record.getNodeType());

flow-engine-starter-infra/src/main/java/com/codingapi/flow/infra/entity/FlowRecordEntity.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ public class FlowRecordEntity {
1717
* 工作id
1818
*/
1919
private Long workRuntimeId;
20+
/**
21+
* 流程标题
22+
*/
23+
private String workTitle;
2024
/**
2125
* 流程编码
2226
*/

flow-engine-starter-infra/src/main/java/com/codingapi/flow/infra/entity/FlowTodoRecordEntity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ public class FlowTodoRecordEntity {
2525
/**
2626
* 工作id
2727
*/
28-
private Long workBackupId;
28+
private Long workflowRuntimeId;
29+
/**
30+
* 流程标题
31+
*/
32+
private String workTitle;
2933
/**
3034
* 流程编码
3135
*/

flow-frontend

Submodule flow-frontend updated 55 files

0 commit comments

Comments
 (0)