流程发布推送OA待阅文件日志完善

This commit is contained in:
lihongyu 2022-11-08 18:00:59 +08:00
parent c895595738
commit 140a9ada10

View File

@ -229,18 +229,14 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size()); System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size());
for (String uid : sendList) { for (String uid : sendList) {
try { try {
ExecutorService service = Executors.newFixedThreadPool(5); SendOARead(jsonObject, instanceById, uid);
service.execute(new Runnable() { /*
@Override * ExecutorService service = Executors.newFixedThreadPool(5);
public void run() { * service.execute(new Runnable() {
try { *
SendOARead(jsonObject, instanceById, uid); * @Override public void run() { try { } catch (Exception e) { // TODO
} catch (Exception e) { * Auto-generated catch block e.printStackTrace(); } } });
// TODO Auto-generated catch block */
e.printStackTrace();
}
}
});
} catch (Exception e) { } catch (Exception e) {
} }
@ -664,6 +660,8 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
bo.set("USER_ID", user); bo.set("USER_ID", user);
bo.set("DATAID", dataid); bo.set("DATAID", dataid);
bo.set("RESULT", status); bo.set("RESULT", status);
bo.set("SENDTYPE", "1");
bo.set("READSTATE", "未读");
SDK.getBOAPI().create("BO_ACT_DATAID", bo, processInstance.getId(), processInstance.getCreateUser()); SDK.getBOAPI().create("BO_ACT_DATAID", bo, processInstance.getId(), processInstance.getCreateUser());
} }
} }
@ -1004,14 +1002,18 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
public void createReadLog(ProcessExecutionContext processExecutionContext, JSONObject jsonObject, ArrayList<String> arr, public void createReadLog(ProcessExecutionContext processExecutionContext, JSONObject jsonObject, ArrayList<String> arr,
long startTime,long endTimes) { long startTime,long endTimes) {
BO bo_Read_log = new BO(); BO bo_Read_log = new BO();
String processInstId = processExecutionContext.getProcessInstance().getId();
bo_Read_log.set("USREID", processExecutionContext.getUserContext().getUID()); bo_Read_log.set("USREID", processExecutionContext.getUserContext().getUID());
bo_Read_log.set("DEPID", processExecutionContext.getUserContext().getDepartmentModel().getId()); bo_Read_log.set("DEPID", processExecutionContext.getUserContext().getDepartmentModel().getId());
bo_Read_log.set("BUNAME", processExecutionContext.getUserContext().getUserModel().getExt4()); bo_Read_log.set("BUNAME", processExecutionContext.getUserContext().getUserModel().getExt4());
bo_Read_log.set("TITLE", jsonObject.get("title")); bo_Read_log.set("TITLE", jsonObject.get("title"));
bo_Read_log.set("PROCESSID", processExecutionContext.getProcessInstance().getId()); bo_Read_log.set("PROCESSID", processInstId);
bo_Read_log.set("SENDNUM", arr.size()); bo_Read_log.set("SENDNUM", arr.size());
String sqly ="SELECT * FROM BO_ACT_DATAID WHERE PROCESSID = '"+processInstId+"' AND SENDTYPE = '1'";
List<RowMap> mapsy = DBSql.getMaps(sqly);
bo_Read_log.set("SENDNUMSJ", mapsy.size());
BO bo_act_coe_publishs = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true) BO bo_act_coe_publishs = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH", true)
.addQuery("BINDID=", processExecutionContext.getProcessInstance().getId()) .addQuery("BINDID=", processInstId)
.addQuery("OPTIONTYPE IS NOT NULL", null).detail(); .addQuery("OPTIONTYPE IS NOT NULL", null).detail();
String send_scop = bo_act_coe_publishs.getString("SEND_SCOP"); String send_scop = bo_act_coe_publishs.getString("SEND_SCOP");
bo_Read_log.set("SEND_SCOP", send_scop); bo_Read_log.set("SEND_SCOP", send_scop);