diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index d54db278..bf0cf3c6 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java index 9738cc7f..65f69bbd 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishClientWeb.java @@ -5014,8 +5014,8 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java index e8941956..f5b84da2 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent.java @@ -779,7 +779,8 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); try { - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent2.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent2.java index c253f1c1..f86aa7b4 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent2.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent2.java @@ -850,8 +850,8 @@ public class ProcessEndAfterEvent2 { ""; System.out.println("xmlStr>>>>>>>>"+xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); System.out.println("rootElement>>>>>>"+rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent3.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent3.java index 0b02d120..59e6efa7 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent3.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent3.java @@ -639,8 +639,8 @@ public class ProcessEndAfterEvent3 extends ExecuteListener implements ExecuteLis + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent4.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent4.java index ac581cd1..aa061328 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent4.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent4.java @@ -622,8 +622,8 @@ public class ProcessEndAfterEvent4 extends ExecuteListener implements ExecuteLis + " " + ""; //System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); //System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent5.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent5.java index c1439588..b1a8ef9c 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent5.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent5.java @@ -719,7 +719,8 @@ public class ProcessEndAfterEvent5 extends ExecuteListener implements ExecuteLis + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); @@ -794,7 +795,8 @@ public class ProcessEndAfterEvent5 extends ExecuteListener implements ExecuteLis + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent6.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent6.java index 888229ed..d735c7b1 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent6.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent6.java @@ -726,7 +726,8 @@ public class ProcessEndAfterEvent6 extends ExecuteListener implements ExecuteLis + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent7.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent7.java index 69a304a1..4705e58a 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent7.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/ProcessEndAfterEvent7.java @@ -744,7 +744,8 @@ public class ProcessEndAfterEvent7 extends ExecuteListener implements ExecuteLis // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); try { - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); // System.out.println("rootElement>>>>>>" + rootElement); 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 dc03e837..e7e101ab 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 @@ -990,7 +990,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap =uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); Element result = rootElement.element("Body").element("serviceResponse").element("out"); @@ -1035,25 +1036,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute bo.set("TYPE", type); recordLists.add(bo); - BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",processInstance.getId()).detail(); - - String sqly = "SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '" + processInstId + "' AND SENDTYPE = '1'"; - List mapsy = DBSql.getMaps(sqly); - - if(oa_real_time!=null){ - int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" + mapsy.size() + "'WHERE PROCESSID ='" + processInstance.getId() + "'"); - }else{ - //插入实时更新人数表 - BO realTimeBO=new BO(); - realTimeBO.set("USREID", user); - realTimeBO.set("DEPID", SDK.getORGAPI().getUser(user).getDepartmentId()); - realTimeBO.set("BUNAME",SDK.getORGAPI().getUser(user).getExt4()); - realTimeBO.set("TITLE", processInstance.getTitle()); - realTimeBO.set("PROCESSID", processInstance.getId()); - realTimeBO.set("SENDNUMSJ", 1); - realTimeBO.set("SENDNUM",sendTotal); - SDK.getBOAPI().create("BO_ACT_OA_REAL_TIME", bo, processInstance, UserContext.fromUID(processInstance.getCreateUser())); - } } SDK.getBOAPI().create("BO_ACT_DATAID",recordLists, processInstance, UserContext.fromUID(processInstance.getCreateUser())); @@ -1061,6 +1043,29 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute long endTime2 = System.currentTimeMillis(); System.err.println(processInstance.getTitle() + "批量插入OA待阅数据====>" + "用时:" + (endTime2 - startTime2) / 1000 + "秒"); + + + BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",processInstance.getId()).detail(); + + String sqly = "SELECT COUNT(1) FROM BO_ACT_DATAID WHERE PROCESSID =? AND SENDTYPE = '1'"; + int mapsy = DBSql.getInt(sqly,processInstId); + + if(oa_real_time!=null){ + int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" +mapsy + "'WHERE PROCESSID ='" + processInstance.getId() + "'"); + }else{ + BO publishbo=SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").bindId(processInstance.getId()).detail(); + String user=publishbo.getString("APPLYUSERNAME"); + //插入实时更新人数表 + BO realTimeBO=new BO(); + realTimeBO.set("USREID", user); + realTimeBO.set("DEPID", SDK.getORGAPI().getUser(user).getDepartmentId()); + realTimeBO.set("BUNAME",SDK.getORGAPI().getUser(user).getExt4()); + realTimeBO.set("TITLE", processInstance.getTitle()); + realTimeBO.set("PROCESSID", processInstance.getId()); + realTimeBO.set("SENDNUMSJ", 1); + realTimeBO.set("SENDNUM",sendTotal); + SDK.getBOAPI().create("BO_ACT_OA_REAL_TIME", realTimeBO, processInstance, UserContext.fromUID(processInstance.getCreateUser())); + } } long set_end_time = System.currentTimeMillis(); bo_OA_read.set("SET_END_TIME",set_end_time); @@ -1145,7 +1150,8 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute + " " + ""; // System.out.println("xmlStr>>>>>>>>" + xmlStr); String readurl = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "readurl"); - String postSoap = UtilUrl.doPostSoap(readurl, xmlStr, ""); + UtilUrl uc=new UtilUrl(); + String postSoap = uc.doPostSoap(readurl, xmlStr, ""); Document document = DocumentHelper.parseText(postSoap); Element rootElement = document.getRootElement(); Element result = rootElement.element("Body").element("serviceResponse").element("out"); @@ -1185,30 +1191,23 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",processInstance.getId()).detail(); - String sqly = "SELECT ID FROM BO_ACT_DATAID WHERE PROCESSID = '" + processInstId + "' AND SENDTYPE = '1'"; - List mapsy = DBSql.getMaps(sqly); - - if(oa_real_time!=null){ - int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" + mapsy.size() + "'WHERE PROCESSID ='" + processInstance.getId() + "'"); - }else{ - //插入实时更新人数表 - BO realTimeBO=new BO(); - realTimeBO.set("USREID", user); - realTimeBO.set("DEPID", SDK.getORGAPI().getUser(user).getDepartmentId()); - realTimeBO.set("BUNAME",SDK.getORGAPI().getUser(user).getExt4()); - realTimeBO.set("TITLE", processInstance.getTitle()); - realTimeBO.set("PROCESSID", processInstance.getId()); - realTimeBO.set("SENDNUMSJ", 1); - realTimeBO.set("SENDNUM",sendTotal); - SDK.getBOAPI().create("BO_ACT_OA_REAL_TIME", bo, processInstance.getId(), processInstance.getCreateUser()); - } - } SDK.getBOAPI().create("BO_ACT_DATAID",recordLists, processInstance.getId(), processInstance.getCreateUser()); long endTime2 = System.currentTimeMillis(); System.err.println(processInstance.getTitle() + "二次批量插入OA待阅数据====>" + "用时:" + (endTime2 - startTime2) / 1000 + "秒"); + + + BO oa_real_time=SDK.getBOAPI().query("BO_ACT_OA_REAL_TIME").addQuery("PROCESSID=",processInstance.getId()).detail(); + + String sqly = "SELECT COUNT(1) FROM BO_ACT_DATAID WHERE PROCESSID =? AND SENDTYPE = '1'"; + int mapsy = DBSql.getInt(sqly,processInstId); + + if(oa_real_time!=null){ + int r1 = DBSql.update("UPDATE BO_ACT_OA_REAL_TIME SET SENDNUMSJ='" +mapsy + "'WHERE PROCESSID ='" + processInstance.getId() + "'"); + } + } if("单个账号推送".equals(type)) { diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/UtilUrl.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/UtilUrl.java index c0679638..5b34b15e 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/UtilUrl.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/pubEvent/UtilUrl.java @@ -19,7 +19,7 @@ import java.nio.charset.Charset; public class UtilUrl { //使用SOAP1.1发送消息 - public static String doPostSoap(String postUrl, String soapXml, String soapAction) { + public String doPostSoap(String postUrl, String soapXml, String soapAction) { String retStr = ""; // 创建HttpClientBuilder HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();