From 8057a06476a413534a9cf9a897e398d0f525c0a3 Mon Sep 17 00:00:00 2001 From: Mr-wang Date: Fri, 21 Jul 2023 13:39:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E7=BA=BF=E7=A8=8B=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=88=B6=E5=BA=A6=E5=BE=85=E9=98=85=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/coe/pal/datamigration/CopyJob.java | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java index 360447df..80eab476 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/CopyJob.java @@ -120,22 +120,29 @@ public class CopyJob implements IJob { ArrayList list = new ArrayList<>(); - for (String user_id:sendList){ + /* for (String user_id:sendList){ - BO bo_eu_require_data = SDK.getBOAPI().query("BO_EU_HAS_BEEN_SEND", true).addQuery("PROCESS_ID = ", cc).addQuery("USER_ID=",user_id).detail(); + BO bo_eu_require_data = SDK.getBOAPI().query("BO_ACT_DATAID", true).addQuery("PROCESSID = ", cc).addQuery("USER_ID=",user_id).detail(); if (bo_eu_require_data!=null){ }else { - list.add(user_id); + BO bo_eu_Read = SDK.getBOAPI().query("BO_ACT_ALREADY_DATAID", true).addQuery("PROCESSID = ", cc).addQuery("USER_ID=",user_id).detail(); + if (bo_eu_Read!=null){ + + }else { + list.add(user_id); + } } - } + }*/ + list.add("10036614"); + list.add("10056870"); new_uid = new_uid.join(",", list); long startTimes = System.currentTimeMillis(); String[] users = new_uid.split(","); System.out.println("new_uid>>>>>>>>>>>>>>"+users.length); - int length = 100; + int length = 1; int ys = users.length%length; /** * 这个是以300人作为一个发送单位去放到list中并发送待阅数据 @@ -148,9 +155,9 @@ public class CopyJob implements IJob { for (int i=0;i lists = new LinkedList(); + for (int i=0;i>>>>>>"+Arrays.asList(resrt).size()); + String userIds = ""; + userIds = StringUtils.join(resrt, ","); + System.out.println("userIDs>>>>>>>>>>>>>>>"+userIds); + /*try { + SendOARead(jsonObject, processInstance, userIds,"批量推送"); + } catch (DocumentException e) { + e.printStackTrace(); + }*/ try { - SendOARead(jsonObject, processInstance, resrt,"批量推送"); + SendOARead(jsonObject, processInstance, userIds,"批量推送"); } catch (DocumentException e) { e.printStackTrace(); }finally { @@ -502,11 +518,9 @@ public class CopyJob implements IJob { * @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); @@ -514,12 +528,10 @@ public class CopyJob implements IJob { /* * if ("".equals(userId) || UtilString.isEmpty(userId)) { return; } */ - if (resrt.length == 0) { - return; - } long start_time = System.currentTimeMillis(); System.out.println("待阅推送开始时间>>>>>>>>>>>>"+start_time); BO bo_OA_read = new BO(); + String[] resrt = userIds.split(","); bo_OA_read.set("FIR_NUMS",resrt.length); bo_OA_read.set("START_TIME",start_time); jsonObject.put("userList", userIds); @@ -529,6 +541,7 @@ public class CopyJob implements IJob { + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); + SDK.getLogAPI().consoleInfo(xmlStr); String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement();