From 6f36d0698a152d89ab7fe30e954a11e09cb08638 Mon Sep 17 00:00:00 2001 From: wulin Date: Wed, 18 Nov 2020 18:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E8=B4=A4=E6=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FlowStartServiceImpl.java | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) 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()); }