修改子线程
This commit is contained in:
parent
5b5e4caf6a
commit
4603665d8b
@ -194,8 +194,8 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
|
||||
|
||||
}
|
||||
initFlowRecordAnsy(resultRecords);
|
||||
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
||||
initFlowRecordAnsy(resultRecords, noticeStaff);
|
||||
|
||||
|
||||
return R.ok("发起成功").put("data", flowStart);
|
||||
}
|
||||
@ -328,8 +328,8 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
break;
|
||||
}
|
||||
}
|
||||
initFlowRecordAnsy(resultRecords);
|
||||
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
||||
initFlowRecordAnsy(resultRecords, noticeStaff);
|
||||
//dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
||||
return R.ok("发起成功").put("data", flowStart);
|
||||
}
|
||||
//isInsert表示是否中途加人
|
||||
@ -808,9 +808,9 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
return R.ok().put("data",staffEntity);
|
||||
}
|
||||
|
||||
private void initFlowRecordAnsy(List<ResultRecord> resultRecords){
|
||||
private void initFlowRecordAnsy(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
|
||||
if(resultRecords.size() > 0){
|
||||
ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords);
|
||||
ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff);
|
||||
Thread thread = new Thread(threadInitFlowRecord);
|
||||
thread.start();
|
||||
threads.add(thread);
|
||||
@ -820,10 +820,11 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
|
||||
public class ThreadInitFlowRecord implements Runnable{
|
||||
List<ResultRecord> resultRecords;
|
||||
List<StaffSimpleInfo> noticeStaff;
|
||||
|
||||
public ThreadInitFlowRecord(List<ResultRecord> resultRecords){
|
||||
public ThreadInitFlowRecord(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
|
||||
this.resultRecords = resultRecords;
|
||||
|
||||
this.noticeStaff = noticeStaff;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -839,6 +840,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
|
||||
}
|
||||
ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo);
|
||||
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
||||
//threads.remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user