From 5db2645f838c48d38b8605ff703e17f40ea227d8 Mon Sep 17 00:00:00 2001 From: lihongyu <504404568@qq.com> Date: Fri, 25 Nov 2022 14:20:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=88=B6=E5=BA=A6=E6=A8=A1=E5=9E=8B=E5=92=8C?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A8=A1=E5=9E=8B=E9=98=85=E8=A7=88=E5=8F=AA?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=99=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pubEvent/ProcessEndAfterEvent.java | 51 ++++++++++++++----- .../js/coe.pal.process.publish.multiple.js | 2 +- ...coe.pal.process.publish.multiple.mobile.js | 25 +++++---- 3 files changed, 55 insertions(+), 23 deletions(-) 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 4d9e5a9c..ac47f7b4 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 @@ -212,14 +212,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList } } - /** - * 更新数据看板底表 - */ - try { - AttrSynAslp(processExecutionContext, wsId, filed); - } catch (Exception e) { - // TODO: handle exception - } + /** * 推送待阅文件到OA @@ -297,7 +290,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList @Override public void run() { try { - SendOARead(jsonObject, instanceById, idList); + SendOARead(jsonObject, instanceById, idList,"批量推送"); } catch (DocumentException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -316,7 +309,22 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList } } - + + //二次推送 + List List = DBSql.getMaps("SELECT NAME FROM BO_EU_READ_COUNT WHERE PROCESSID = '"+instanceById.getId()+"' AND RESULT = '待处理'"); + if(List.size()!=0) { + System.err.println(instanceById.getTitle()+"批量推送失败后执行二次推送=======>"+List.size()); + for (RowMap rowMap : List) { + try { + ArrayList userList3 = new ArrayList(); + userList3.add(rowMap.getString("NAME")); + //System.err.println(instanceById.getTitle()+"二次推送账号=======>"+userList3); + SendOARead(jsonObject, instanceById, userList3,"单个账号推送"); + } catch (Exception e) { + // TODO: handle exception + } + } + } long endTimes = System.currentTimeMillis(); // 存入日志 createReadLog(processExecutionContext, jsonObject, sendList, startTime, endTimes); @@ -325,6 +333,16 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList } } + + /** + * 更新数据看板底表 + */ + try { + AttrSynAslp(processExecutionContext, wsId, filed); + } catch (Exception e) { + // TODO: handle exception + } + /** * 推送到EHSQ */ @@ -686,8 +704,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList * @param results * @throws DocumentException */ - public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, List idList) + public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, List idList,String type) throws DocumentException { + + String processInstId = processInstance.getId(); // System.err.println(processInstance.getTitle() + "开始发送:" + userId); /* @@ -721,6 +741,9 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList BO bo = new BO(); bo.set("TITLE", processInstance.getTitle()); bo.set("NAME", userId); + bo.set("TYPE", type); + bo.set("RESULT", "待处理"); + bo.set("PROCESSID", processInstId); bo.set("DEPNAME", SDK.getORGAPI().getUser(userId).getDepartmentId()); SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser()); } catch (Exception e) { @@ -729,7 +752,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList } } else { JSONArray resultArray = JSONObject.parseArray(datas); - System.out.println(processInstance.getTitle() + "待阅推送成功:" + idList.size()+"人"); + //System.out.println(processInstance.getTitle() + "待阅推送成功:" + idList.size()+"人"); for (int j = 0; j < resultArray.size(); j++) { JSONObject jsonObject2 = resultArray.getJSONObject(j); String user = jsonObject2.get("user").toString(); @@ -743,8 +766,12 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList bo.set("RESULT", status); bo.set("SENDTYPE", "1"); bo.set("READSTATE", "未读"); + bo.set("TYPE", type); SDK.getBOAPI().create("BO_ACT_DATAID", bo, processInstance.getId(), processInstance.getCreateUser()); } + if("单个账号推送".equals(type)) { + DBSql.update("UPDATE BO_EU_READ_COUNT SET RESULT = '已重新推送' WHERE PROCESSID = '"+processInstId+"' AND NAME = '"+userIds+"'"); + } } } diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js index 7a760106..9ed41a3e 100644 --- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js +++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.js @@ -874,7 +874,7 @@ function addProcess(type) { newTemp.push(temps[i]); } //校验支持文件是否上传 - publishFlowCheck(newTemp); + //publishFlowCheck(newTemp); // 初始化页数及当前页 initNewPagination(newPageSetting.pageNum - 1); // 初始化当前页的数据 diff --git a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.mobile.js b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.mobile.js index bafb610b..b79d0064 100644 --- a/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.mobile.js +++ b/com.actionsoft.apps.coe.pal.publisher/web/com.actionsoft.apps.coe.pal.publisher/js/coe.pal.process.publish.multiple.mobile.js @@ -236,11 +236,6 @@ function showlist(data, type, pageNumber, start){ var fileName = curr.publishFileName + ' V' + curr.fileVersion; var outputName = getOutputName(curr.category, curr.methodId); - if(outputName=="表单封面"){ - - - } - html +=''; html +=''; if(outputName!="表单封面"){ @@ -250,7 +245,9 @@ function showlist(data, type, pageNumber, start){ html +=''; html +=''; html +=''; - html +='' +'模型预览: '+ fileName+''; + if(outputName!="制度手册"&&outputName!="表单封面"){ + html +='' +'模型预览: '+ fileName+''; + } html +=''; html +=''; @@ -298,11 +295,15 @@ function showlist(data, type, pageNumber, start){ html += ''; html += ''; - html += '' +'文件预览: '+ targetFileName + "-" + outputName + ''; + if(outputName!="表单封面"){ + html += '' +'文件预览: '+ targetFileName + "-" + outputName + ''; + } html += ''; html +=''; html +=''; - html +='' +'模型预览: '+ targetFileName+''; + if(outputName!="制度手册"&&outputName!="表单封面"){ + html +='' +'模型预览: '+ targetFileName+''; + } html +=''; html +=''; @@ -339,11 +340,15 @@ function showlist(data, type, pageNumber, start){ var outputName = getOutputName(curr.category, curr.methodId); html += ''; html += ''; - html += '' + fileName + "-" + outputName + ''; + if(outputName!="表单封面"){ + html += '' + fileName + "-" + outputName + ''; + } html += ''; html +=''; html +=''; - html +='' + fileName+''; + if(outputName!="制度手册"&&outputName!="表单封面"){ + html +='' + fileName+''; + } html +=''; html +=''; }