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

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

View File

@ -228,19 +228,15 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
ArrayList<String> sendList = getSendList(instanceById, bo_act_coe_publish1, jsonObject);
System.err.println(instanceById.getTitle() + "待发送人员数量====>" + sendList.size());
for (String uid : sendList) {
try {
ExecutorService service = Executors.newFixedThreadPool(5);
service.execute(new Runnable() {
@Override
public void run() {
try {
SendOARead(jsonObject, instanceById, uid);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
});
/*
* ExecutorService service = Executors.newFixedThreadPool(5);
* service.execute(new Runnable() {
*
* @Override public void run() { try { } catch (Exception e) { // TODO
* Auto-generated catch block e.printStackTrace(); } } });
*/
} catch (Exception e) {
}
@ -664,6 +660,8 @@ public class ProcessEndAfterEvent extends ExecuteListener implements ExecuteList
bo.set("USER_ID", user);
bo.set("DATAID", dataid);
bo.set("RESULT", status);
bo.set("SENDTYPE", "1");
bo.set("READSTATE", "未读");
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,
long startTime,long endTimes) {
BO bo_Read_log = new BO();
String processInstId = processExecutionContext.getProcessInstance().getId();
bo_Read_log.set("USREID", processExecutionContext.getUserContext().getUID());
bo_Read_log.set("DEPID", processExecutionContext.getUserContext().getDepartmentModel().getId());
bo_Read_log.set("BUNAME", processExecutionContext.getUserContext().getUserModel().getExt4());
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());
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)
.addQuery("BINDID=", processExecutionContext.getProcessInstance().getId())
.addQuery("BINDID=", processInstId)
.addQuery("OPTIONTYPE IS NOT NULL", null).detail();
String send_scop = bo_act_coe_publishs.getString("SEND_SCOP");
bo_Read_log.set("SEND_SCOP", send_scop);