From 385a40a8c9c09e1412976ec9703cfce285c2751a Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Tue, 6 Feb 2024 23:01:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E6=B5=81=E7=A8=8B=E7=BB=93?= =?UTF-8?q?=E6=9D=9F=E5=90=8E=E6=8F=92=E5=85=A5ext6=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pubEvent/ProcessEndAfterEvent_new.java | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) 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 fb271c4e..9949649a 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 @@ -10,6 +10,8 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import com.actionsoft.apps.coe.pal.datamigration.RepositoryAttribute; +import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; import com.actionsoft.exception.AWSDataAccessException; import org.apache.commons.lang.StringUtils; import org.dom4j.Document; @@ -473,6 +475,37 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute try { String fileId = bo.getString("PUBLISHFILEID"); DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+fileId+"'"); + + /** + * 更新部门视图EXT6字段 + */ + Map queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(fileId); + if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) { + // 发布部门 + String dempId = ""; + JSONObject Issuing_department = queryRepositoryAttributeById.get("Issuing_department"); + if (null != Issuing_department && !Issuing_department.equals("")) { + JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value"); + SDK.getLogAPI().consoleInfo(Issuing_department.toString()); + if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) { + for (Object PUBDEPTO : PUBDEPTJA) { + JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO)); + dempId += PUBDEPTJO.getString("id") + ","; + } + dempId = dempId.substring(0, dempId.length() - 1); + int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + fileId + "'"); + + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId); + if (plModel != null) { + PALRepositoryCache.getCache().put(fileId, plModel); + } + + + } + } + } + + } catch (Exception e) { } } @@ -484,6 +517,37 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute String changefileIdNew = bo.getString("CHANGEDFILEIDNEW"); DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '0' WHERE ID = '"+changefileId+"'"); DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5 = '1' WHERE ID = '"+changefileIdNew+"'"); + + + /** + * 更新部门视图EXT6字段 + */ + Map queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(changefileIdNew); + if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) { + // 发布部门 + String dempId = ""; + JSONObject Issuing_department = queryRepositoryAttributeById.get("Issuing_department"); + if (null != Issuing_department && !Issuing_department.equals("")) { + JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value"); + SDK.getLogAPI().consoleInfo(Issuing_department.toString()); + if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) { + for (Object PUBDEPTO : PUBDEPTJA) { + JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO)); + dempId += PUBDEPTJO.getString("id") + ","; + } + dempId = dempId.substring(0, dempId.length() - 1); + int count = DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT6 = TO_CLOB('" + dempId + "') WHERE ID = '" + changefileIdNew + "'"); + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(changefileIdNew); + if (plModel != null) { + PALRepositoryCache.getCache().put(changefileIdNew, plModel); + } + + + } + } + } + + } catch (Exception e) { } } @@ -498,6 +562,11 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } } } + + + + + /** * 推送到EHSQ */