待阅以线程形式推送

This commit is contained in:
Mr-wang 2023-07-10 13:21:55 +08:00
parent 1743a0d58e
commit 597ae08e50

View File

@ -388,13 +388,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
* user, "批量推送"); } catch (Exception e) { // TODO: handle exception } }
*/
new_uid = new_uid.join(",", sendList);
if (StringUtils.isNotEmpty(new_uid
)) {
new_uid = new_uid.substring(0, new_uid.length() - 1);
}
long startTimes = System.currentTimeMillis();
System.out.println("new_userid ==========>>>>>>>>>"+new_uid);
String[] users = new_uid.split(",");
System.out.println("new_uid>>>>>>>>>>>>>>"+users.length);
int length = 300;
int ys = users.length%length;
/**
@ -417,6 +413,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
* 创建线程发送待阅数据
*/
course(list,startTime,jsonObject,processExecutionContext);
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
}else {
int size = users.length/length;
int flag = 0;
@ -435,9 +432,12 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
* 创建线程发送待阅数据
*/
course(list,startTime,jsonObject,processExecutionContext);
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
}
/*int toIndex = 200;
int listSize = sendList.size();
boolean shutdown = false;
@ -606,17 +606,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
int i=0;
for (String[] resrt:list
) {
if ((list.size()-1)==i){
long endTime = System.currentTimeMillis();
long time = endTime - startTime;
long itmes = time/1000/60/60;
BO bo_eu_pal_read_log = SDK.getBOAPI().query("BO_EU_PAL_READ_LOG", true).addQuery("PROCESSID = ", processExecutionContext.getProcessInstance().getId()).detail();
bo_eu_pal_read_log.set("ENDTIMES",endTime);
bo_eu_pal_read_log.set("TIMECOUNT",itmes);
SDK.getBOAPI().update("BO_EU_PAL_READ_LOG",bo_eu_pal_read_log);
}
System.out.println("最后一个数组是什么>>>>>>>"+Arrays.asList(resrt).size());
try {
SendOARead(jsonObject, processExecutionContext.getProcessInstance(), resrt,"批量推送");
} catch (DocumentException e) {