From 27a638908cce53124817db33f160cba8c02f8c5c Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Thu, 30 Jun 2022 19:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=9B=BE=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/coe/pal/CoEPALController.java | 8 +- .../web/DesignerRelationShapeWeb.java | 4 +- .../pal/repository/job/SynchronousOrgJob.java | 11 +- .../repository/web/CoeProcessLevelWeb.java | 28 +- .../template/page/pal.pl.level.create.htm | 11 + .../page/pal.pl.repository.designer.htm | 8 +- .../js/coe.pal.processlevel.create.js | 517 +++++++++--------- .../extend/js/designer.extend.link.js | 58 +- 8 files changed, 328 insertions(+), 317 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 1eb010d3..2f79fc32 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -2924,15 +2924,15 @@ public class CoEPALController { * @param * @return */ - @Mapping("com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createRole") - public String RelationShapeCreateRole(UserContext me,String uuid,String methodId) { + @Mapping("com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel") + public String createDialogModel(UserContext me,String uuid,String methodId,String category) { CoeProcessLevelWeb web = new CoeProcessLevelWeb(me); - return web.RelationShapeCreateRole(uuid,methodId); + return web.createDialogModel(uuid,methodId,category); } /** - * 查询是否有相同角色图数据 + * 查询是否有相同角色/绩效图数据 * @param me * @param * @return diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java index 092f5b0c..1cc26429 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java @@ -754,13 +754,13 @@ public class DesignerRelationShapeWeb extends ActionWeb { // macroLibraries.put("treeData", getTreeJson(wsId, "", category, type, method)); // by bzp - //根据传入uuid,进行过滤,保留当前流程的数据 String treeJson=getTreeJson(wsId, "", category, type, method,ruuid); //JSONObject jsonObject = JSONObject.parseObject(json); JSONArray jsonArr_new= new JSONArray(); JSONArray objects=JSONArray.parseArray(treeJson); - if (attrId.equals("role")) {//需要在pal写死相关文件上传的属性代码为related_files + //角色图属性代码是role/绩效图属性代码是 + if (attrId.equals("role") || attrId.equals("performance")) { if (objects != null) { for (int i = 0; i < objects.size(); i++) { JSONObject jsonObject = objects.getJSONObject(i); diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousOrgJob.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousOrgJob.java index 0b62a1c9..4bb7a24e 100644 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousOrgJob.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/job/SynchronousOrgJob.java @@ -21,6 +21,7 @@ import com.alibaba.fastjson.JSONObject; import jodd.util.StringUtil; import org.apache.commons.lang.StringUtils; +import org.apache.poi.ss.usermodel.Row; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; @@ -166,7 +167,6 @@ public class SynchronousOrgJob implements IJob { public void createPostData(String uuid,String departmentId,PALRepositoryModelImpl model){ Map idRelationMap = new HashMap<>(); - BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0); if(defineModel ==null ){ defineModel = CoeDesignerUtil.createModel(model.getId(),0); @@ -198,11 +198,14 @@ public class SynchronousOrgJob implements IJob { String shapeId1 = UUIDGener.getObjectId(); //拿到基础结构 JSONObject shape1 = ShapeUtil.getProcessShapeDefinitionByName("org.normal", "position"); - String postionname=orgdepartmentList.get(i).getString("POSITION_NAME"); - if(StringUtil.isNotEmpty(postionname)){ + String roleid=orgdepartmentList.get(i).getString("ROLEID"); + + String rolename=DBSql.getString("SELECT ROLENAME FROM ORGROLE WHERE ID=? AND ROLETYPE='1' ",roleid); + + if(StringUtil.isNotEmpty(rolename)){ shape1.put("id", shapeId1); - shape1.put("text",orgdepartmentList.get(i).getString("POSITION_NAME")); + shape1.put("text",rolename); JSONObject props1 = shape1.getJSONObject("props");// 位置大小 diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 527d5f5a..9831af48 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -8125,7 +8125,7 @@ public class CoeProcessLevelWeb extends ActionWeb { * @return * by zhaolei */ - public String RelationShapeCreateRole(String uuid,String methodId){ + public String createDialogModel(String uuid,String methodId,String category){ ResponseObject ro = ResponseObject.newOkResponse(); try { @@ -8140,12 +8140,22 @@ public class CoeProcessLevelWeb extends ActionWeb { String plRid = UUIDGener.getUUID(); String id = UUIDGener.getUUID(); - String parentId = "org"; - + String titleName=null; + String shapName=null; + if(methodId.equals("control.kpi")){ + titleName="绩效图"; + shapName="kpi"; + }else if(methodId.equals("org.role")){ + titleName="角色图"; + shapName="role"; + }else if(methodId.equals("data.form")){ + titleName="表单图"; + shapName="form"; + } Timestamp nowTime = new Timestamp(System.currentTimeMillis()); - PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", plname + "-角色图", - "", 1, "org", "org", true, 1, - id, false, "org.role", "0", 1, null, + PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, "6f4e292c-1b90-4dd2-8c20-7da159cb20a5", plname + titleName, + "", 1, shapName, category, true, 1, + id, false, methodId, "0", 1, null, null, "admin", "admin", nowTime, null, uuid, null, null, null, null, null, null, null, 1); @@ -8168,9 +8178,9 @@ public class CoeProcessLevelWeb extends ActionWeb { //拿到基础结构 - JSONObject shape = ShapeUtils.getProcessShapeDefinitionByName("org.role", "role"); + JSONObject shape = ShapeUtils.getProcessShapeDefinitionByName(methodId, shapName); shape.put("id", shapeId); - shape.put("text", "角色"); + shape.put("text", titleName); JSONObject props = shape.getJSONObject("props");// 位置大小 props.put("zindex", 0); @@ -8201,7 +8211,7 @@ public class CoeProcessLevelWeb extends ActionWeb { /** - * 查找关联角色图 + * 查找关联角色/绩效数据 * @param uuid * @return */ diff --git a/com.actionsoft.apps.coe.pal/template/page/pal.pl.level.create.htm b/com.actionsoft.apps.coe.pal/template/page/pal.pl.level.create.htm index 665e832e..793ed96d 100755 --- a/com.actionsoft.apps.coe.pal/template/page/pal.pl.level.create.htm +++ b/com.actionsoft.apps.coe.pal/template/page/pal.pl.level.create.htm @@ -6,6 +6,7 @@ + @@ -13,6 +14,8 @@ + + @@ -157,6 +160,7 @@ + + @@ -186,6 +192,9 @@ + + + - -