diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java index dd39da0e..3d7f578e 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/PublishExecuteListenerInterfaceImpl.java @@ -23,6 +23,7 @@ import com.actionsoft.bpms.bo.engine.BO; import com.actionsoft.bpms.bpmn.engine.core.delegate.ProcessExecutionContext; import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListener; import com.actionsoft.bpms.bpmn.engine.listener.ExecuteListenerInterface; +import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.bpms.commons.mvc.view.ResponseObject; import com.actionsoft.bpms.server.UserContext; import com.actionsoft.bpms.util.DBSql; @@ -109,6 +110,9 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme listDao.insert(publishListHistoryModelN); //修改流程文件的发布属性和发布时间 repositoryDao.updatePublishStatusAndDate("N", boN.get("PUBLISHFILEID").toString(), null, model.getPublishDate()); + + //修改关联角色、绩效发布状态 + updateRoleAndPerformance(boN.get("PUBLISHFILEID").toString(),model.getPublishDate()); } //by bzp 测试编号生成 //new ProcesNumberUtil().getNumber(processInstId); @@ -474,4 +478,35 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme } } + + /**** + * 发布明细如果关联角色、绩效图,不显示在发布界面,在流程结束后同步发布 + */ + public void updateRoleAndPerformance(String publishFileId,Timestamp publishDate){ + + List roleList=new ArrayList(); + roleList.add(0,"org.role"); + roleList.add(1,publishFileId); + PALRepository repositoryDao = new PALRepository(); + RowMap rolerowMap=DBSql.getMap("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT2=?",roleList.toString()); + + if(rolerowMap!=null){ + //修改流程文件的发布属性 + repositoryDao.updatePublishStatusAndDate("N", rolerowMap.getString("ID"), null, publishDate); + } + + List performanceList=new ArrayList(); + performanceList.add(0,"control.kpi"); + performanceList.add(1,publishFileId); + + RowMap performrowMap=DBSql.getMap("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT2=?",performanceList.toString()); + + if(performrowMap!=null){ + //修改流程文件的发布属性 + repositoryDao.updatePublishStatusAndDate("N", performrowMap.getString("ID"), null, publishDate); + } + + + } + }