diff --git a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java index 54355c12..ed91db23 100644 --- a/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java +++ b/src/main/java/com/lz/modules/flow/service/impl/FlowStartServiceImpl.java @@ -106,8 +106,6 @@ public class FlowStartServiceImpl extends ServiceImpl threadInitFlowRecords = new ArrayList<>(); - ThreadInitFlowRecord threadInitFlowRecord; - Thread thread; @@ -812,9 +810,9 @@ public class FlowStartServiceImpl extends ServiceImpl resultRecords, List noticeStaff){ if(resultRecords.size() > 0){ - threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff); - threadInitFlowRecords.add(threadInitFlowRecord);//防止提前回收 - thread = new Thread(threadInitFlowRecord); + ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff); + threadInitFlowRecords.add(threadInitFlowRecord); + Thread thread = new Thread(threadInitFlowRecord); thread.start(); } @@ -822,12 +820,12 @@ public class FlowStartServiceImpl extends ServiceImpl resultRecords; - List noticeStaff; + List resultRecords = new ArrayList<>(); + List noticeStaff = new ArrayList<>(); public ThreadInitFlowRecord(List resultRecords, List noticeStaff){ - this.resultRecords = resultRecords; - this.noticeStaff = noticeStaff; + this.resultRecords.addAll(resultRecords); + this.noticeStaff.addAll(noticeStaff); } @Override @@ -836,20 +834,12 @@ public class FlowStartServiceImpl extends ServiceImpl