diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/job/SynchronousPostJob.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/job/SynchronousPostJob.java deleted file mode 100644 index 3e9d0df8..00000000 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/job/SynchronousPostJob.java +++ /dev/null @@ -1,160 +0,0 @@ -package com.actionsoft.apps.coe.pal.datamigration.job; - -import com.actionsoft.apps.coe.pal.datamigration.aris.mapping.ModelMappingAPIManager; -import com.actionsoft.apps.coe.pal.datamigration.aris.model.*; -import com.actionsoft.apps.coe.pal.datamigration.util.DiagramUtil; -import com.actionsoft.apps.coe.pal.datamigration.util.ShapeUtil; -import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache; -import com.actionsoft.apps.coe.pal.pal.repository.dao.CoeProcessLevelDaoFacotory; -import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository; -import com.actionsoft.apps.coe.pal.pal.repository.designer.constant.CoeDesignerConstant; -import com.actionsoft.apps.coe.pal.pal.repository.designer.manage.CoeDesignerAPIManager; -import com.actionsoft.apps.coe.pal.pal.repository.designer.model.BaseModel; -import com.actionsoft.apps.coe.pal.pal.repository.designer.util.CoeDesignerUtil; -import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel; -import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl; -import com.actionsoft.apps.coe.pal.pal.repository.util.CoeProcessLevelUtil; -import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb; -import com.actionsoft.bpms.bo.engine.BO; -import com.actionsoft.bpms.commons.database.RowMap; -import com.actionsoft.bpms.commons.login.constant.LoginConst; -import com.actionsoft.bpms.commons.mvc.view.ResponseObject; -import com.actionsoft.bpms.schedule.IJob; -import com.actionsoft.bpms.server.SSOUtil; -import com.actionsoft.bpms.server.UserContext; -import com.actionsoft.bpms.util.DBSql; -import com.actionsoft.bpms.util.UUIDGener; -import com.actionsoft.exception.ExceptionUtil; -import com.actionsoft.sdk.local.SDK; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; -import jodd.util.StringUtil; -import org.apache.commons.lang.StringUtils; -import org.docx4j.wml.R; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; - -import java.io.IOException; -import java.sql.Timestamp; -import java.text.SimpleDateFormat; -import java.util.*; - -public class SynchronousPostJob implements IJob { - - - /** - * 定时从BPM组织同步PAL组织架构中 - * @param jobExecutionContext - * @throws JobExecutionException - */ - @Override - public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { - - Map idRelationMap = new HashMap<>(); - //先执行新建操作产生plid - PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel(); - - String plRid = UUIDGener.getUUID(); - String id = UUIDGener.getUUID(); - - String parentId="org"; - String parentVersionId = ""; - int level = 1; - if (parentId.length() < 36) {// 父节点是大类 - parentVersionId = parentId; - } else { - PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(parentId); - parentVersionId = parentModel.getVersionId(); - level = parentModel.getLevel() + 1; - } - - Timestamp nowTime = new Timestamp(System.currentTimeMillis()); - PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", "伊利集团", - "", 1, "org", "org", true, 1, - id, false, "org.normal", "0", 1, null, - null, "admin", "admin", nowTime, null, null, - null, null, null, null, null, null, null,1); - - System.out.println(model.getId()); - coeProcessLevel.insert(model); - - - BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0); - if(defineModel ==null ){ - defineModel = CoeDesignerUtil.createModel(model.getId(),0); - defineModel.setCreateHistory(false); - } - String define = defineModel.getDefinition(); - JSONObject definition = JSONObject.parseObject(define); - JSONObject elements = definition.getJSONObject("elements"); - - //新建一个uuid - String shapeId = UUIDGener.getObjectId(); - - //拿到基础结构 - JSONObject shape = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position"); - - /*shape.put("id", shapeId); - shape.put("text","伊利集团"); - - JSONObject props = shape.getJSONObject("props");// 位置大小 - props.put("zindex", 0); - props.put("x", Integer.parseInt("784")); - props.put("y", Integer.parseInt("166")); - props.put("w", Integer.parseInt("110")); - props.put("h", Integer.parseInt("50")); - elements.put(shapeId, shape);*/ - - if (StringUtils.isNotEmpty(definition.getString("commonShapeConfig"))) { - definition.remove("commonShapeConfig"); - } - - List orgdepartmentList=DBSql.getMaps("select * from ORGUSER "); - - int zindex = 1; - - if(orgdepartmentList.size()>0){ - - for(int i=0;i0){ @@ -8040,6 +8038,7 @@ public class CoeProcessLevelWeb extends ActionWeb { *校验是否存在重复标题 * @param title * @return + * by zhaolei */ public String checkCreatePalProcessLevelRepository(String title,String method){ @@ -8057,6 +8056,7 @@ public class CoeProcessLevelWeb extends ActionWeb { * 根据用户选择类型创建相应制度图形 * @param type * @return + * by zhaolei */ public String CreateSystemModelBySelectType(String title,String type,String method,String uuid,String parentId){ @@ -8064,13 +8064,6 @@ public class CoeProcessLevelWeb extends ActionWeb { try { if(method.equals("control.policy")){ - //先执行新建操作产生plid - PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel(); - - String plRid = UUIDGener.getUUID(); - String id = UUIDGener.getUUID(); - - Timestamp nowTime = new Timestamp(System.currentTimeMillis()); PALRepositoryModelImpl plModel = (PALRepositoryModelImpl) CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(uuid); @@ -8130,6 +8123,7 @@ public class CoeProcessLevelWeb extends ActionWeb { /** * 创建角色图 * @return + * by zhaolei */ public String RelationShapeCreateRole(String uuid,String methodId){ @@ -8140,7 +8134,6 @@ public class CoeProcessLevelWeb extends ActionWeb { if (rowMap != null) { String plname = rowMap.getString("PLNAME"); - Map idRelationMap = new HashMap<>(); //先执行新建操作产生plid PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel(); @@ -8148,15 +8141,6 @@ public class CoeProcessLevelWeb extends ActionWeb { String id = UUIDGener.getUUID(); String parentId = "org"; - String parentVersionId = ""; - int level = 1; - if (parentId.length() < 36) {// 父节点是大类 - parentVersionId = parentId; - } else { - PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(parentId); - parentVersionId = parentModel.getVersionId(); - level = parentModel.getLevel() + 1; - } Timestamp nowTime = new Timestamp(System.currentTimeMillis()); PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", plname + "-角色图", @@ -8215,6 +8199,12 @@ public class CoeProcessLevelWeb extends ActionWeb { } + + /** + * 查找关联角色图 + * @param uuid + * @return + */ public String relationFindSameRole(String uuid){ ResponseObject ro = ResponseObject.newOkResponse(); RowMap rowMap=DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT2=?",uuid); diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js index f9e589e3..b1a5ccf3 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js @@ -3511,11 +3511,10 @@ function openRelationDig(obj,value) { buttons : [ { text : '刷新', - cls : "green", + cls : "yellow", handler : function() { // 刷新页面 - //initLayout(); - + document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true); } },{ text : '新建角色模型',