From 7d1966d204f90971cd5e51a4d185f1f61ee54215 Mon Sep 17 00:00:00 2001 From: Mr-wang Date: Mon, 4 Sep 2023 17:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9agentid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pubEvent/ProcessEndAfterEvent_new.java | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java index e464a1a2..815d6121 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent_new.java @@ -214,7 +214,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute ProcessInstance instanceById = processExecutionContext.getProcessInstance(); if (bo_act_coe_publish1 != null && instanceById != null) { System.err.println(instanceById.getTitle() + "推送OA待阅执行开始====>"); - long sendUserstartTime = System.currentTimeMillis(); + long startTime = System.currentTimeMillis(); ArrayList sendList = new ArrayList(); // 发送全集团 if ("1".equals(bo_act_coe_publish1.getString("SEND_SCOP"))) { @@ -263,7 +263,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute long countTime = System.currentTimeMillis(); System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size() + " 计算用时===>" - + (countTime - sendUserstartTime) + "毫秒"); + + (countTime - startTime) + "毫秒"); /* * for (String user : sendList) { try { SendOARead(jsonObject, instanceById, * user, "批量推送"); } catch (Exception e) { // TODO: handle exception } } @@ -283,7 +283,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute long startTimes = System.currentTimeMillis(); String[] users = new_uid.split(","); for (String uid: - users) { + users) { BO bo = new BO(); bo.set("USER_ID",uid); bo.set("PROCESSID",processExecutionContext.getProcessInstance().getId()); @@ -294,10 +294,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute SDK.getBOAPI().createDataBO("BO_EU__OA_MONITOR",bo,UserContext.fromUID(ta.getTarget())); } System.out.println("new_uid>>>>>>>>>>>>>>"+users.length); - - long startTime = System.currentTimeMillis(); - - int length = 200; + int length = 100; int ys = users.length%length; /** * 这个是以300人作为一个发送单位去放到list中并发送待阅数据 @@ -310,9 +307,9 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute for (int i=0;i list = new LinkedList(); for (int i=0;i