多线程发送取值失败问题修改

This commit is contained in:
Mr-wang 2023-07-21 13:35:37 +08:00
parent 7c2864a246
commit 6da81a90b7

View File

@ -552,8 +552,11 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
public void run() {
System.out.println("最后一个数组是什么>>>>>>>"+Arrays.asList(resrt).size());
String userIds = "";
userIds = StringUtils.join(resrt, ",");
System.out.println("userIDs>>>>>>>>>>>>>>>"+userIds);
try {
SendOARead(jsonObject, processExecutionContext.getProcessInstance(), resrt,"批量推送");
SendOARead(jsonObject, processExecutionContext.getProcessInstance(), userIds,"批量推送");
} catch (DocumentException e) {
e.printStackTrace();
}finally {
@ -952,11 +955,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
* @param results
* @throws DocumentException
*/
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, String[] resrt,String type)
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, String userIds,String type)
throws DocumentException {
String userIds = "";
userIds = StringUtils.join(resrt, ",");
String processInstId = processInstance.getId();
// System.err.println(processInstance.getTitle() + "开始发送:" + userId);
@ -964,9 +965,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
/*
* if ("".equals(userId) || UtilString.isEmpty(userId)) { return; }
*/
if (resrt.length == 0) {
return;
}
String[] resrt = userIds.split(",");
long start_time = System.currentTimeMillis();
System.out.println("待阅推送开始时间>>>>>>>>>>>>"+start_time);
BO bo_OA_read = new BO();