This commit is contained in:
wulin 2020-11-18 18:36:45 +08:00
parent a3ef1860d4
commit 9d982c4ae3

View File

@ -103,7 +103,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
@Autowired
private DingtalkBusiness dingtalkBusiness;
List<ThreadInitFlowRecord> threadInitFlowRecords = new ArrayList<>();
@ -811,7 +810,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
private void initFlowRecordAnsy(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
if(resultRecords.size() > 0){
ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff);
threadInitFlowRecords.add(threadInitFlowRecord);
Thread thread = new Thread(threadInitFlowRecord);
thread.start();
@ -824,7 +823,9 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
List<StaffSimpleInfo> noticeStaff = new ArrayList<>();
public ThreadInitFlowRecord(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
this.resultRecords.addAll(resultRecords);
CollectionUtils.addAll(this.resultRecords, new Object[resultRecords.size()]);
Collections.copy(resultRecords, resultRecords);
//this.resultRecords.addAll(resultRecords);
this.noticeStaff.addAll(noticeStaff);
}
@ -842,7 +843,6 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
}
//ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo);
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
threadInitFlowRecords.remove(this);
}
}
}