发布移动端去掉制度模型和表单模型阅览只显示附件

This commit is contained in:
lihongyu 2022-11-25 14:20:51 +08:00
parent 5eeccf41fe
commit 5db2645f83
3 changed files with 55 additions and 23 deletions

View File

@ -212,14 +212,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
} }
} }
/**
* 更新数据看板底表
*/
try {
AttrSynAslp(processExecutionContext, wsId, filed);
} catch (Exception e) {
// TODO: handle exception
}
/** /**
* 推送待阅文件到OA * 推送待阅文件到OA
@ -297,7 +290,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
@Override @Override
public void run() { public void run() {
try { try {
SendOARead(jsonObject, instanceById, idList); SendOARead(jsonObject, instanceById, idList,"批量推送");
} catch (DocumentException e) { } catch (DocumentException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
@ -316,7 +309,22 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
} }
} }
//二次推送
List<RowMap> 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<String> userList3 = new ArrayList<String>();
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(); long endTimes = System.currentTimeMillis();
// 存入日志 // 存入日志
createReadLog(processExecutionContext, jsonObject, sendList, startTime, endTimes); 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 * 推送到EHSQ
*/ */
@ -686,8 +704,10 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
* @param results * @param results
* @throws DocumentException * @throws DocumentException
*/ */
public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, List<String> idList) public void SendOARead(JSONObject jsonObject, ProcessInstance processInstance, List<String> idList,String type)
throws DocumentException { throws DocumentException {
String processInstId = processInstance.getId();
// System.err.println(processInstance.getTitle() + "开始发送:" + userId); // System.err.println(processInstance.getTitle() + "开始发送:" + userId);
/* /*
@ -721,6 +741,9 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
BO bo = new BO(); BO bo = new BO();
bo.set("TITLE", processInstance.getTitle()); bo.set("TITLE", processInstance.getTitle());
bo.set("NAME", userId); bo.set("NAME", userId);
bo.set("TYPE", type);
bo.set("RESULT", "待处理");
bo.set("PROCESSID", processInstId);
bo.set("DEPNAME", SDK.getORGAPI().getUser(userId).getDepartmentId()); bo.set("DEPNAME", SDK.getORGAPI().getUser(userId).getDepartmentId());
SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser()); SDK.getBOAPI().create("BO_EU_READ_COUNT", bo, processInstance.getId(), processInstance.getCreateUser());
} catch (Exception e) { } catch (Exception e) {
@ -729,7 +752,7 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
} }
} else { } else {
JSONArray resultArray = JSONObject.parseArray(datas); 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++) { for (int j = 0; j < resultArray.size(); j++) {
JSONObject jsonObject2 = resultArray.getJSONObject(j); JSONObject jsonObject2 = resultArray.getJSONObject(j);
String user = jsonObject2.get("user").toString(); String user = jsonObject2.get("user").toString();
@ -743,8 +766,12 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
bo.set("RESULT", status); bo.set("RESULT", status);
bo.set("SENDTYPE", "1"); bo.set("SENDTYPE", "1");
bo.set("READSTATE", "未读"); bo.set("READSTATE", "未读");
bo.set("TYPE", type);
SDK.getBOAPI().create("BO_ACT_DATAID", bo, processInstance.getId(), processInstance.getCreateUser()); 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+"'");
}
} }
} }

View File

@ -874,7 +874,7 @@ function addProcess(type) {
newTemp.push(temps[i]); newTemp.push(temps[i]);
} }
//校验支持文件是否上传 //校验支持文件是否上传
publishFlowCheck(newTemp); //publishFlowCheck(newTemp);
// 初始化页数及当前页 // 初始化页数及当前页
initNewPagination(newPageSetting.pageNum - 1); initNewPagination(newPageSetting.pageNum - 1);
// 初始化当前页的数据 // 初始化当前页的数据

View File

@ -236,11 +236,6 @@ function showlist(data, type, pageNumber, start){
var fileName = curr.publishFileName + ' V' + curr.fileVersion; var fileName = curr.publishFileName + ' V' + curr.fileVersion;
var outputName = getOutputName(curr.category, curr.methodId); var outputName = getOutputName(curr.category, curr.methodId);
if(outputName=="表单封面"){
}
html +='<tr>'; html +='<tr>';
html +='<td class="form-grid-mobile-common-row" width=100%>'; html +='<td class="form-grid-mobile-common-row" width=100%>';
if(outputName!="表单封面"){ if(outputName!="表单封面"){
@ -250,7 +245,9 @@ function showlist(data, type, pageNumber, start){
html +='</tr>'; html +='</tr>';
html +='<tr>'; html +='<tr>';
html +='<td class="form-grid-mobile-common-row" width=100%>'; html +='<td class="form-grid-mobile-common-row" width=100%>';
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.publishFileId + '\', \'' + curr.taskId + '\')">' +'模型预览: '+ fileName+'</span>'; if(outputName!="制度手册"&&outputName!="表单封面"){
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.publishFileId + '\', \'' + curr.taskId + '\')">' +'模型预览: '+ fileName+'</span>';
}
html +='</td>'; html +='</td>';
html +='</tr>'; html +='</tr>';
@ -298,11 +295,15 @@ function showlist(data, type, pageNumber, start){
html += '<tr>'; html += '<tr>';
html += '<td class="form-grid-mobile-common-row" width=100%>'; html += '<td class="form-grid-mobile-common-row" width=100%>';
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' +'文件预览: '+ targetFileName + "-" + outputName + '</span>'; if(outputName!="表单封面"){
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' +'文件预览: '+ targetFileName + "-" + outputName + '</span>';
}
html += '</td>'; html += '</td>';
html +='<tr>'; html +='<tr>';
html +='<td class="form-grid-mobile-common-row" width=100%>'; html +='<td class="form-grid-mobile-common-row" width=100%>';
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + targetId + '\', \'' + curr.taskId + '\')">' +'模型预览: '+ targetFileName+'</span>'; if(outputName!="制度手册"&&outputName!="表单封面"){
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + targetId + '\', \'' + curr.taskId + '\')">' +'模型预览: '+ targetFileName+'</span>';
}
html +='</td>'; html +='</td>';
html +='</tr>'; html +='</tr>';
@ -339,11 +340,15 @@ function showlist(data, type, pageNumber, start){
var outputName = getOutputName(curr.category, curr.methodId); var outputName = getOutputName(curr.category, curr.methodId);
html += '<tr>'; html += '<tr>';
html += '<td class="form-grid-mobile-common-row" width=100%>'; html += '<td class="form-grid-mobile-common-row" width=100%>';
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' + fileName + "-" + outputName + '</span>'; if(outputName!="表单封面"){
html += '<span class="form-grid-mobile-common-tap" onclick="openReportFile(\'' + curr.taskId + '\');return false" >' + fileName + "-" + outputName + '</span>';
}
html += '</td>'; html += '</td>';
html +='<tr>'; html +='<tr>';
html +='<td class="form-grid-mobile-common-row" width=100%>'; html +='<td class="form-grid-mobile-common-row" width=100%>';
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.stopFileId + '\', \'' + curr.taskId + '\')">' + fileName+'</span>'; if(outputName!="制度手册"&&outputName!="表单封面"){
html +='<span class="form-grid-mobile-common-tap" onclick="openPortalPage(\'' + curr.stopFileId + '\', \'' + curr.taskId + '\')">' + fileName+'</span>';
}
html +='</td>'; html +='</td>';
html +='</tr>'; html +='</tr>';
} }