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 9949649a..23951878 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 @@ -476,10 +476,33 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute 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); + * 更新部门视图EXT6字段 + */ + List rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+fileId+"' and ATTRID='Issuing_department'"); + if(rlatRowMap.size()>0){ + // 发布部门 + String dempId = ""; + for(RowMap oneRowMap:rlatRowMap){ + String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT"); + JSONObject js=JSONObject.parseObject(relationshapetext); + dempId += js.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); + } + } + + + + + /*Map queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(fileId); if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) { // 发布部门 String dempId = ""; @@ -503,7 +526,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } } - } + }*/ } catch (Exception e) { @@ -522,7 +545,7 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute /** * 更新部门视图EXT6字段 */ - Map queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(changefileIdNew); + /* Map queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(changefileIdNew); if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) { // 发布部门 String dempId = ""; @@ -545,6 +568,29 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute } } + }*/ + + + /** + * 更新部门视图EXT6字段 + */ + List rlatRowMap=DBSql.getMaps("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+changefileIdNew+"' and ATTRID='Issuing_department'"); + if(rlatRowMap.size()>0){ + // 发布部门 + String dempId = ""; + for(RowMap oneRowMap:rlatRowMap){ + String relationshapetext=oneRowMap.getString("RELATIONSHAPETEXT"); + JSONObject js=JSONObject.parseObject(relationshapetext); + dempId += js.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); + } }