子贤曾

This commit is contained in:
wulin 2020-11-18 18:43:08 +08:00
parent 9d982c4ae3
commit 6f36d0698a

View File

@ -823,9 +823,9 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
List<StaffSimpleInfo> noticeStaff = new ArrayList<>(); List<StaffSimpleInfo> noticeStaff = new ArrayList<>();
public ThreadInitFlowRecord(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){ public ThreadInitFlowRecord(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
CollectionUtils.addAll(this.resultRecords, new Object[resultRecords.size()]); //CollectionUtils.addAll(this.resultRecords, new Object[resultRecords.size()]);
Collections.copy(resultRecords, resultRecords); //Collections.copy(resultRecords, resultRecords);
//this.resultRecords.addAll(resultRecords); this.resultRecords.addAll(resultRecords);
this.noticeStaff.addAll(noticeStaff); this.noticeStaff.addAll(noticeStaff);
} }
@ -835,12 +835,21 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
//String newNo = oldNo + "_initFlowRecord" ;//+ resultRecord.getStaffId() + "_" + resultRecord.getId(); //String newNo = oldNo + "_initFlowRecord" ;//+ resultRecord.getStaffId() + "_" + resultRecord.getId();
//ch.qos.logback.classic.Logger.threadLocalNo.set(newNo); //ch.qos.logback.classic.Logger.threadLocalNo.set(newNo);
log.info("开始批量初始化流程,数量{}", resultRecords.size()); log.info("开始批量初始化流程,数量{}", resultRecords.size());
for (ResultRecord resultRecord:resultRecords int i = 10;
) { while(i > 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); //ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo);
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType()); dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
} }