From 30318d7a04263e591a84d69fb62ac4dda371a713 Mon Sep 17 00:00:00 2001 From: lihongyu <504404568@qq.com> Date: Mon, 22 Aug 2022 13:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=BF=9D=E5=AD=98=E5=90=8E?= =?UTF-8?q?=E5=8F=91=E9=80=81=E5=BE=85=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pal/publisher/event/SubFormAfterSave.java | 149 ------------------ 1 file changed, 149 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java index c17031be..6dfc4215 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/SubFormAfterSave.java @@ -1,11 +1,7 @@ package com.actionsoft.apps.coe.pal.publisher.event; -import java.io.IOException; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache; import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel; @@ -14,18 +10,9 @@ import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext; import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener; import com.actionsoft.bpms.bpmn.engine.listener.ListenerConst; import com.actionsoft.bpms.bpmn.engine.model.run.delegate.TaskInstance; -import com.actionsoft.bpms.commons.mvc.view.ResponseObject; -import com.actionsoft.bpms.org.cache.UserCache; -import com.actionsoft.bpms.org.model.UserModel; import com.actionsoft.bpms.util.UUIDGener; import com.actionsoft.sdk.local.SDK; -import com.actionsoft.sdk.local.api.AppAPI; import com.actionsoft.sdk.local.api.BOQueryAPI; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import com.awspaas.user.apps.integrates.XmlDatasUtil; -import com.awspaas.user.apps.integrates.util.HttpClientUtil; public class SubFormAfterSave extends ExecuteListener { @@ -131,142 +118,6 @@ public class SubFormAfterSave extends ExecuteListener { } } } - // sendOaPending(taskInstance,param); - } - - - - - - /** - * 发送待办 - * - * @param taskInstance DD - */ - public void sendOaPending(TaskInstance taskInstance, ProcessExecutionContext pec) throws IOException { - - XmlDatasUtil xmlDatasUtil = new XmlDatasUtil(); - xmlDatasUtil.setExternal_system_ID("CL"); - xmlDatasUtil.setOther_system_to_do_ID(taskInstance.getId()); - BO bo_act_coe_publish = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true).addQuery("BINDID=", pec.getProcessInstance().getId()).detail(); - if (bo_act_coe_publish!=null){ - xmlDatasUtil.setProcess_title(" 您有一条待办流程【"+bo_act_coe_publish.getString("PROCESS_TITLE")+"】,点击进行处理"); - }else { - xmlDatasUtil.setProcess_title(" 您有一条待办流程【"+pec.getProcessInstance().getTitle()+"】,点击进行处理"); - } - - //http://localhost:8089/portal/r/or?cmd=com.yili_form_page_open&processInstId=3505e654-9217-41cd-a31d-4971846b3219&taskInstId=8a71d75e-3ee0-43a2-a226-ecb01419319c&oauthName=oauthLogin&token=admin - String portalUrl = SDK.getPortalAPI().getPortalUrl(); - if (portalUrl.equals("http://10.114.11.135:8088/portal")){ - portalUrl = "https://bpm.yili.com:8088/portal/"; - } - xmlDatasUtil.setPcurl(portalUrl+"/r/or?cmd=com.yili_form_page_open&oauthName=oauthLogin&processInstId="+pec.getProcessInstance().getId()+"&taskInstId="+taskInstance.getId()); - xmlDatasUtil.setMobileurl(portalUrl+"/r/or?cmd=com.yili_form_page_open&oauthName=WechatOauthLogin&casaccount="+pec.getTaskInstance().getTarget()+"&processInstId="+pec.getProcessInstance().getId()+"&taskInstId="+taskInstance.getId()); - String target = taskInstance.getTarget(); - if (target.length()==8&&"00".equals(target.substring(0,2))){ - target = target.substring(2); - } - System.out.println("当前账户======》》》》"+target); - BO bo_eu_oa_reson = SDK.getBOAPI().query("BO_EU_OA_RESON", true).addQuery("WORKCODE=" , target).detail(); - System.out.println("bo>>>>>>>>>>"+bo_eu_oa_reson); - if (bo_eu_oa_reson!=null){ - xmlDatasUtil.setTo_do_login_account(bo_eu_oa_reson.getString("LOGINID")); - } - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//定义格式,不显示毫秒 - String str = df.format(taskInstance.getBeginTime()); - String substring = str.substring(str.indexOf(" "), str.length()); - xmlDatasUtil.setTo_do_creation_time(substring); - xmlDatasUtil.setTo_do_completion_time(substring); - //if (taskInstance.getState()==1){ - xmlDatasUtil.setTo_do_status("0"); - //} - xmlDatasUtil.setTo_do_official_type("0"); -// if (taskInstance.getReadState()==0){ -// xmlDatasUtil.setViewtype("0"); -// }else if (taskInstance.getReadState()==1){ - xmlDatasUtil.setViewtype("0"); -// } - xmlDatasUtil.setCreatedate(str.substring(0, str.indexOf(" "))); - xmlDatasUtil.setDonedate(str.substring(0, str.indexOf(" "))); - /*String der =""; - if (taskInstance.getReadTime()!=null){ - der = df.format(taskInstance.getReadTime()); - xmlDatasUtil.setReceivedate(der.substring(0, der.indexOf(" "))); - xmlDatasUtil.setReceivetime(der.substring(der.indexOf(" "),der.length())); - }else { - der = df.format(taskInstance.getBeginTime()); - xmlDatasUtil.setReceivedate(der.substring(0, der.indexOf(" "))); - xmlDatasUtil.setReceivetime(der.substring(der.indexOf(" "),der.length())); - }*/ - xmlDatasUtil.setReceivedate(str.substring(0, str.indexOf(" "))); - xmlDatasUtil.setReceivetime(substring); - - xmlDatasUtil.setCurrentnodetype("0"); - xmlDatasUtil.setRequestcode(pec.getProcessInstance().getId()); - xmlDatasUtil.setCurrentnodename(SDK.getRepositoryAPI().getProcessNode(pec.getProcessInstance().getProcessDefId(),pec.getTaskInstance().getActivityDefId()).getName()); - - // 调用App - String sourceAppId = pec.getProcessInstance().getAppId(); - // aslp服务地址 - String aslp = "aslp://com.actionsoft.apps.processtrends/processNodeInfoASLP"; - // 参数定义列表 - Map params = new HashMap(); - //流程实例id,必填 - params.put("processInstId", pec.getProcessInstance().getId()); - //,必填 - params.put("sid", pec.getUserContext().getSessionId()); - AppAPI appAPI = SDK.getAppAPI(); - //流程节点数据 - ResponseObject ro = appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params); - String username = ""; - String userid = ""; - if (ro.isOk()){ - List list = new ArrayList(); - Object processBudgetModelList = ro.get("processBudgetModelList"); - JSONArray array = JSON.parseArray(String.valueOf(processBudgetModelList)); - - if (!array.isEmpty()){ - for(int i=0;i