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 88322d81..595e35ba 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/PublisherController.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java index 314fd0c3..68f4ae44 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/PublisherController.java @@ -868,4 +868,17 @@ public class PublisherController { return web.updateFramework(uuid,processInstId); } + /** + * 中断任务操作 + * @param me + * @param plId + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal.publisher_publish_InterruptTask") + public String InterruptTask(UserContext me,String processInstId) { + ProcessPublishWeb web = new ProcessPublishWeb(me); + return web.InterruptTask(processInstId); + } + + } \ No newline at end of file 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 7f39e5b0..3422f803 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 @@ -29,6 +29,7 @@ import com.actionsoft.apps.coe.pal.pal.ws.web.VersionUtil; import com.actionsoft.apps.coe.pal.publisher.client.dao.PublisherClientDao; import com.actionsoft.apps.coe.pal.publisher.conf.PublisherConf; import com.actionsoft.apps.coe.pal.publisher.constant.PublisherConstant; +import com.actionsoft.apps.coe.pal.publisher.pubEvent.UtilUrl; import com.actionsoft.apps.coe.pal.team.user.web.UserWeb; import com.actionsoft.apps.coe.pal.util.HighSecurityUtil; import com.actionsoft.apps.lifecycle.api.AppsAPIManager; @@ -90,7 +91,6 @@ import com.actionsoft.sdk.local.api.AppAPI; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.awspaas.user.apps.app.util.UtilUrl; import org.apache.commons.collections4.IteratorUtils; import org.dom4j.Document; import org.dom4j.DocumentException; @@ -4931,10 +4931,11 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk .addQuery("OPTIONTYPE IS NOT NULL", null).detail(); String not_url = "/w?cmd=com.yili_process_page&processInstId=" + publshId + "&taskInstId=" + taskInd; - /*execute(pec, boActCoePublish.getString("APPLYUSERNAME"), boActCoePublish.getString("PROCESS_TITLE"), + + execute(taskInst.getAppId(), boActCoePublish.getString("APPLYUSERNAME"), boActCoePublish.getString("PROCESS_TITLE"), not_url, boActCoePublish.getString("SEND_SCOPE_ORG"), boActCoePublish.getString("SEND_SCOP"), boActCoePublish.getString("APPLYDATE"), publshId, boActCoePublish.getString("SEND_SCOPE_POST"), - boActCoePublish.getString("SEND_SCOPE_LEVEL"), "1");*/ + boActCoePublish.getString("SEND_SCOPE_LEVEL"), "1"); JSONObject jsonObject = new JSONObject(new LinkedHashMap()); jsonObject.put("action", "read"); @@ -5058,21 +5059,6 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk } - /** - * 更新对应的发布流程的权限阅览权限范围 - * - * @param ext ext - * @author wangpf - */ - private void updatePerm(String bindId, String title, String orgPerm, String postPerm, String levelPerm) { - System.out.println(title + ":权限范围补发开始执行"); - //需要补发权限的权限阅览id - String sql = "UPDATE BO_ACT_PUBLISH_PERM_SCOPE set ORGPERM =? , POSTPERM=? , LEVELPERM=? WHERE PUBLISHPROCESSID=?"; - //更新权限 - DBSql.update(sql, new Object[]{orgPerm, postPerm, levelPerm, bindId}); - System.out.println("流程发布实例id为:" + bindId + "的权限范围补发成功"); - - } /** @@ -5148,11 +5134,11 @@ public class ProcessPublishClientWeb extends AbstPortalSkins implements PortalSk * @param fileid * @return */ - public boolean execute(ProcessExecutionContext processExecutionContext, String fileCreateName, String fileName, + public boolean execute(String appId, String fileCreateName, String fileName, String fileurl, String readingScope_org, String isFullCompany, String fileCreateDate, String relationProcessinstId, String readingScope_post, String readingScope_level, String fileid) { // 调用App - String sourceAppId = processExecutionContext.getProcessInstance().getAppId(); + String sourceAppId = appId; // aslp服务地址 String aslp = "aslp://com.awspaas.user.apps.docview/PushFileToXpage"; // 参数定义列表 diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java index 47c35d7f..736a3ee6 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/client/web/ProcessPublishWeb.java @@ -4567,4 +4567,25 @@ public class ProcessPublishWeb extends ActionWeb { return ro.toString(); } + + /** + * 中断任务操作 + * @param uuid + * @param processInstId + * @return + */ + public String InterruptTask(String processInstId) { + ResponseObject ro = ResponseObject.newOkResponse(); + if (processInstId == null) { + return ResponseObject.newErrResponse("流程实例未找到").toString(); + } + int count = DBSql.update("UPDATE BO_ACT_EXECUTIVE_TASK SET TASKSTATUS='" + 2 + "' WHERE TASKID ='" + processInstId + "'"); + if(count>0){ + ro.put("result","ok"); + }else{ + ro.put("result","error"); + } + return ro.toString(); + } + } \ No newline at end of file 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 5b3fd84d..cb9cd5fd 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 @@ -85,13 +85,14 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute //用户点击确认发布按钮后进行触发推送任务 Boolean isConfirmRelease = SDK.getTaskAPI().isChoiceActionMenu(ext.getTaskInstance(), "确认发布"); - if(isConfirmRelease){ + if(isConfirmRelease==true){ ProcessInstance boProcessInstance = SDK.getProcessAPI() .createBOProcessInstance("obj_a2d419f9aff446c1be891785200e914c", ext.getUserContext().getUserName(), "OA任务传输"); BO executiveTaskBO=new BO(); executiveTaskBO.set("TASKTITLE",ext.getProcessInstance().getTitle()); executiveTaskBO.set("TASKID",ext.getProcessInstance().getId()); executiveTaskBO.set("TASKSTATUS",1); + executiveTaskBO.set("ISTASKEND",1); SDK.getBOAPI().create("BO_ACT_EXECUTIVE_TASK",executiveTaskBO,boProcessInstance.getId(),""); ExecutorService service = Executors.newFixedThreadPool(1); service.execute(new Runnable() { @@ -394,6 +395,20 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute try { BO executiveTaskBO=SDK.getBOAPI().query("BO_ACT_EXECUTIVE_TASK").addQuery("TASKID=",processExecutionContext.getProcessInstance().getId()).addQuery("TASKSTATUS=",2).detail(); if(executiveTaskBO!=null){ + String userIds = StringUtils.join(idList, ","); + System.out.println("userIds=============="+userIds); + String[] userIdsArray=userIds.split(","); + System.out.println("userIdsArray=============="+userIdsArray); + for(String oneuserId:userIdsArray){ + BO bo = new BO(); + bo.set("TITLE", processExecutionContext.getProcessInstance().getTitle()); + bo.set("NAME", oneuserId); + bo.set("TYPE", "批量推送"); + bo.set("RESULT", "待处理"); + bo.set("PROCESSID", processExecutionContext.getProcessInstance().getId()); + bo.set("DEPNAME", SDK.getORGAPI().getUser(userIds).getDepartmentId()); + SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processExecutionContext.getProcessInstance().getId(), processExecutionContext.getProcessInstance().getCreateUser()); + } return; } SendOARead(jsonObject, instanceById, idList, "批量推送"); @@ -791,7 +806,6 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, List idList,String type) throws DocumentException { - System.out.println("发送OA待遇=============================="); String processInstId = processInstance.getId(); // System.err.println(processInstance.getTitle() + "开始发送:" + userId);