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 690438fe..21af1566 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 @@ -823,9 +823,9 @@ public class FlowStartServiceImpl extends ServiceImpl noticeStaff = new ArrayList<>(); public ThreadInitFlowRecord(List resultRecords, List noticeStaff){ - CollectionUtils.addAll(this.resultRecords, new Object[resultRecords.size()]); - Collections.copy(resultRecords, resultRecords); - //this.resultRecords.addAll(resultRecords); + //CollectionUtils.addAll(this.resultRecords, new Object[resultRecords.size()]); + //Collections.copy(resultRecords, resultRecords); + this.resultRecords.addAll(resultRecords); this.noticeStaff.addAll(noticeStaff); } @@ -835,12 +835,21 @@ public class FlowStartServiceImpl extends ServiceImpl 0){ + for (ResultRecord resultRecord:resultRecords + ) { - resultRecordService.initFlowRecord(resultRecord.getId()); + resultRecordService.initFlowRecord(resultRecord.getId()); + } + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + e.printStackTrace(); + } } + //ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo); dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType()); }