Skip to content

Commit da8c11c

Browse files
committed
fix bug
1 parent 6380479 commit da8c11c

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,6 @@ public void finishFlow() {
147147
}
148148

149149

150-
/**
151-
* 保存流程表单数据
152-
*/
153-
public void updateSnapshot() {
154-
BindDataSnapshot snapshot = new BindDataSnapshot(flowRecord.getSnapshotId(), bindData);
155-
flowBindDataRepository.update(snapshot);
156-
}
157150

158151

159152
/**
@@ -196,15 +189,6 @@ public void loadHistoryRecords() {
196189
}
197190

198191

199-
/**
200-
* 更新流程记录
201-
*/
202-
public void updateFlowRecord() {
203-
flowRecord.setOpinion(opinion);
204-
flowRecordService2.flowRecordRepository.update(flowRecord);
205-
}
206-
207-
208192
/**
209193
* 加载子节点的审批记录
210194
* 即加载后续节点的审批记录

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.codingapi.springboot.flow.domain.FlowNode;
44
import com.codingapi.springboot.flow.domain.FlowWork;
55
import com.codingapi.springboot.flow.record.FlowRecord;
6-
import com.codingapi.springboot.flow.repository.FlowBindDataRepository;
76
import com.codingapi.springboot.flow.repository.FlowProcessRepository;
87
import com.codingapi.springboot.flow.repository.FlowRecordRepository;
98
import com.codingapi.springboot.flow.user.IFlowOperator;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,13 @@ public void save(long recordId, IFlowOperator currentOperator, IBindData bindDat
241241
flowRecordService2.loadFlowNode();
242242
flowRecordService2.verifyFlowNodeEditableState(false);
243243

244-
FlowNodeService flowNodeService = new FlowNodeService(flowOperatorRepository,flowBindDataRepository,flowRecordService2,bindData,Opinion.save(advice));
245-
flowNodeService.updateSnapshot();
246-
flowNodeService.updateFlowRecord();
244+
Opinion opinion = Opinion.save(advice);
245+
FlowRecord flowRecord = flowRecordService2.getFlowRecord();
246+
BindDataSnapshot snapshot = new BindDataSnapshot(flowRecord.getSnapshotId(), bindData);
247+
flowBindDataRepository.update(snapshot);
248+
249+
flowRecord.setOpinion(opinion);
250+
flowRecordService2.flowRecordRepository.update(flowRecord);
247251

248252
}
249253

0 commit comments

Comments
 (0)