diff --git a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar index 6e3907fe..0679be88 100644 Binary files a/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar and b/com.actionsoft.apps.coe.pal.publisher/lib/com.actionsoft.apps.coe.pal.publisher.jar differ 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 70374149..fbee423c 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 @@ -709,21 +709,15 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme bo.set("PUBLISHPROCESSID" , bindId); - RowMap PROCESS_ARCHITECTURE_L1= DBSql.getMap("SELECT PROPERTYVALUE FROM APP_ACT_COE_PAL_PROP where PLID = '"+verId+"' and PROPERTYID='Process_Architecture_L1'"); - - RowMap PROCESS_ARCHITECTURE_L2= DBSql.getMap("SELECT PROPERTYVALUE FROM APP_ACT_COE_PAL_PROP where PLID = '"+verId+"' and PROPERTYID='Process_Architecture_L2'"); - RowMap PROCESS_ARCHITECTURE_L3= DBSql.getMap("SELECT PROPERTYVALUE FROM APP_ACT_COE_PAL_PROP where PLID = '"+verId+"' and PROPERTYID='Process_Architecture_L3'"); - RowMap PROCESS_ARCHITECTURE_L4= DBSql.getMap("SELECT PROPERTYVALUE FROM APP_ACT_COE_PAL_PROP where PLID = '"+verId+"' and PROPERTYID='Process_Architecture_L4'"); - RowMap versions= DBSql.getMap("SELECT PROPERTYVALUE FROM APP_ACT_COE_PAL_PROP where PLID = '"+verId+"' and PROPERTYID='versions'"); @@ -734,14 +728,21 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme bo.set("PUBLISHDEPT",js.getString("name")); bo.set("PUBLISHDEPTID",js.getString("id")); } - bo.set("VERSION",versions.getString("PROPERTYVALUE")); + + + PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(verId); + String version=String.valueOf(palRepositoryModel.getVersion()); + + String plver=version.substring(0,version.indexOf(".")) + "." + version.substring(version.length() - 1, version.length()); + + bo.set("VERSION",plver); bo.set("PROCESS_ARCHITECTURE_L1",PROCESS_ARCHITECTURE_L1.getString("PROPERTYVALUE")); bo.set("PROCESS_ARCHITECTURE_L2",PROCESS_ARCHITECTURE_L2.getString("PROPERTYVALUE")); bo.set("PROCESS_ARCHITECTURE_L3",PROCESS_ARCHITECTURE_L3.getString("PROPERTYVALUE")); bo.set("PROCESS_ARCHITECTURE_L4",PROCESS_ARCHITECTURE_L4.getString("PROPERTYVALUE")); //事业部 - /* RowMap rlatMap= DBSql.getMap("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+verId+"' and ATTRID='Issuing_department'"); + RowMap rlatMap= DBSql.getMap("SELECT RELATIONSHAPETEXT FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '"+verId+"' and ATTRID='Issuing_department'"); if(rlatRowMap!=null){ JSONObject relationshapetext=JSONObject.parseObject(rlatRowMap.getString("RELATIONSHAPETEXT")); if(js!=null){ @@ -756,15 +757,14 @@ public class PublishExecuteListenerInterfaceImpl extends ExecuteListener impleme if(depname!=null){ bo.set("BUSINESS_DIVISION",depname); } - } - if(allpath.contains("伊利")){ + } else if(allpath.contains("伊利")){ bo.set("BUSINESS_DIVISION","伊利集团总部"); } } } } - }*/ + } 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 b5324c6e..ab6fd89f 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 @@ -13,6 +13,9 @@ import java.util.concurrent.TimeUnit; import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao; +import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache; +import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.dao.DesignerShapeRelationDao; +import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel; import com.actionsoft.apps.coe.pal.system.util.StringUtil; import com.actionsoft.bpms.util.UUIDGener; import com.actionsoft.exception.AWSDataAccessException; @@ -634,6 +637,37 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute DBSql.update(open,"UPDATE APP_ACT_COE_PAL_REPOSITORY SET EXT5='0' WHERE ID = '"+fileId+"'"); + PALRepositoryModel plModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(fileId); + DesignerShapeRelationCache.getCache().remove(plModel.getId(), false); + + DesignerShapeRelationModel designerShapeRelationModel=new DesignerShapeRelationModel(); + designerShapeRelationModel.setId(UUIDGener.getUUID()); + designerShapeRelationModel.setFileId(fileId); + designerShapeRelationModel.setAttrId("nullifier"); + designerShapeRelationModel.setRelationFileId("00000000-0000-0000-0000-000000000000"); + designerShapeRelationModel.setRelationShapeId("00000000-0000-0000-0000-000000000000"); + + JSONObject js=new JSONObject(); + js.put("name", processExecutionContext.getUserContext().getUserName()); + js.put("id",processExecutionContext.getUserContext().getUID()); + js.put("type", "user"); + + designerShapeRelationModel.setRelationShapeText(js.toString()); + + DesignerShapeRelationDao dao = new DesignerShapeRelationDao(); + dao.insert(designerShapeRelationModel); + + PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao(); + //作废时间 + Date date=new Date(); + SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd"); + propertyDao.updatePropertyByPropertyId(fileId, "obsolescence_time", sdfs.format(date)); + + if (plModel != null) { + PALRepositoryCache.getCache().put(fileId, plModel); + } + + /*PALRepositoryPropertyDao propertyDao = new PALRepositoryPropertyDao(); String sql = "insert into APP_ACT_COE_PAL_SHAPE_RLAT (ID,FILEID,ATTRID,RELATIONFILEID,RELATIONSHAPEID,RELATIONSHAPETEXT) values ('%s', '%s', '%s','%s','%s','%s')";