From c17fab4e84572f9b4f08b7bf8e7ac46ced962b37 Mon Sep 17 00:00:00 2001 From: yujh Date: Thu, 22 Aug 2024 14:29:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E6=B5=81=E7=A8=8B=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pal/output/pr/report1/Report1Gener.java | 52 +- .../步骤横表-流程手册4.xml | 1288 ++++++++++------- .../diagram.attribute.custom.xml | 10 +- .../pal/pal/manage/util/PalManageUtil.java | 4 + .../extend/js/designer.extend.link.js | 54 +- 5 files changed, 846 insertions(+), 562 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java index d71df859..bd90cf26 100644 --- a/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java +++ b/com.actionsoft.apps.coe.pal.output.pr/src/com/actionsoft/apps/coe/pal/output/pr/report1/Report1Gener.java @@ -4,13 +4,7 @@ import static com.actionsoft.apps.coe.pal.pal.output.util.OutputWordUtil.special import java.io.File; import java.sql.Timestamp; -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; import com.actionsoft.apps.coe.pal.constant.CoEConstant; @@ -39,6 +33,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.upfile.model.UpfileModel; import com.actionsoft.apps.coe.pal.system.property.CoePropertyUtil; import com.actionsoft.apps.coe.pal.util.HighSecurityUtil; import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile; +import com.actionsoft.bpms.bpmn.engine.model.def.ProcessNode; import com.actionsoft.bpms.commons.database.RowMap; import com.actionsoft.bpms.commons.mvc.view.ResponseObject; import com.actionsoft.bpms.server.DispatcherRequest; @@ -286,6 +281,7 @@ public class Report1Gener { JSONArray repositoryShapeTable = new JSONArray();//流程步骤Table JSONArray roleMappingPostTable = new JSONArray();//角色对应岗位Table JSONArray criticalControlPointTable = new JSONArray();//关键控制点Table + JSONArray procedureTable = new JSONArray();//上下游流程Table @@ -384,9 +380,25 @@ public class Report1Gener { int dangerIndex = 1;// 风险序号 int regulateIndex = 1;// 控制序号 int roleMappingPostIndex =1;//控制序号 + + + //先排序将子流程的几点放到最后 + // 将type为"sub_process_node"的Map移动到列表末尾 + List> toRemove = new ArrayList<>(); + for (Iterator> iterator = repositoryFileElements.iterator(); iterator.hasNext();) { + Map map = iterator.next(); + if ("sub_process_node".equals(map.get("type"))) { + toRemove.add(map); // 先收集起来 + iterator.remove(); // 然后从原列表中移除 + } + } + + // 将收集到的Map添加到列表末尾 + repositoryFileElements.addAll(toRemove); + + // 输出结果 for (Map shape : repositoryFileElements) { - //过滤导出的图形类型 - if ("method_approval_node,method_service_node,method_approval_node3,method_service_node4,decision".indexOf((String)shape.get("type")) == -1) { + if ("method_approval_node,method_service_node,method_approval_node3,method_service_node4,decision,sub_process_node".indexOf((String)shape.get("type")) == -1) { continue; } JSONObject _tr = new JSONObject(); @@ -639,7 +651,23 @@ public class Report1Gener { } catch (Exception e) { // TODO: handle exception }*/ - + //上下游流程 + List repositoryPropertyList = PALRepositoryPropertyCache.getPropertyByPlId(repositoryModel.getId()); + if (repositoryPropertyList != null && repositoryPropertyList.size() > 0) { + for (PALRepositoryPropertyModel palRepositoryPropertyModel : repositoryPropertyList) { + JSONObject _process_tr = new JSONObject(); + if(palRepositoryPropertyModel.getPropertyId().equals("lead_process")){//上游流程 + _process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText")); + _process_tr.put("type","上游流程"); + }else if(palRepositoryPropertyModel.getPropertyId().equals("rear_process")){//下游流程 + _process_tr.put("name",JSONObject.parseObject(palRepositoryPropertyModel.getPropertyValue()).getString("relationShapeText")); + _process_tr.put("type","下游流程"); + } + if(!_process_tr.isEmpty()){ + procedureTable.add(_process_tr); + } + } + } //相关/支持文件 @@ -802,6 +830,10 @@ public class Report1Gener { dataMap.put("criticalControlPointTable", criticalControlPointTable); dataMap.put("criticalControlPointTableCount", criticalControlPointTable.size()); + + //上下游表格 + dataMap.put("procedureTable", procedureTable); + dataMap.put("procedureTableCount", procedureTable.size()); boolean contains = isNumberAscArray.contains("false"); if(contains) { fileTable.sort(Comparator.comparing(obj -> ((JSONObject) obj).getString("file_name"))); diff --git a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册4.xml b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册4.xml index 8f21beb5..ebdd8257 100644 --- a/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册4.xml +++ b/com.actionsoft.apps.coe.pal.output.pr/步骤横表-流程手册4.xml @@ -1,5 +1,5 @@ - + <#if (term_table_count>0 )> - - - - - - - - - - - - 术语 - - - - <#if (term_table_count ==0 )> - - - - - - - - - - - - - - - - <#else> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 名称 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 说明 - - - - - <#list term_table as table4> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${table4.name} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${table4.desc} - - - - - - - + + + + + + + + + + + + 术语 + + + +<#if (term_table_count ==0 )> + + + + + + + + + + + + + + + +<#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 名称 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 说明 + + + + + <#list term_table as table4> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table4.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table4.desc} + + + + + + + @@ -4942,11 +4942,10 @@ y7fdOgAAAABJRU5ErkJggk== - + - - -<#if (roleMappingPostTableCount ==0 )> + +<#if (procedureTableCount ==0 )> <#else> @@ -4958,7 +4957,7 @@ y7fdOgAAAABJRU5ErkJggk== - 角色岗位对应表 + 上下游流程 @@ -4977,8 +4976,7 @@ y7fdOgAAAABJRU5ErkJggk== - - + @@ -5020,7 +5018,7 @@ y7fdOgAAAABJRU5ErkJggk== - 序号 + 名称 @@ -5059,55 +5057,16 @@ y7fdOgAAAABJRU5ErkJggk== - 角色 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 岗位 + 类型 -<#list roleMappingPostTable as table3> +<#list procedureTable as table3> - + @@ -5136,7 +5095,7 @@ y7fdOgAAAABJRU5ErkJggk== - ${table3.shape_number} + ${table3.name} @@ -5172,42 +5131,7 @@ y7fdOgAAAABJRU5ErkJggk== - ${table3.roleMapping_role} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${table3.roleMapping_post} + ${table3.type} @@ -5215,7 +5139,280 @@ y7fdOgAAAABJRU5ErkJggk== - + + + + +<#if (roleMappingPostTableCount ==0 )> +<#else> + + + + + + + + + + + 角色岗位对应表 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 角色 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 岗位 + + + + +<#list roleMappingPostTable as table3> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table3.shape_number} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table3.roleMapping_role} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table3.roleMapping_post} + + + + + + + + @@ -6228,6 +6425,235 @@ y7fdOgAAAABJRU5ErkJggk== + + + + +<#if (related_support_files_table_count >0 )> + + + + + + + + + + + + + + + + + 相关/支持文件 + + + +<#if (related_support_files_table_count ==0 )> + + + + + + + + + + + + + + + +<#else> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 序号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 文件名称 + + + + + <#list related_support_files_table as table7> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table7.desc} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${table7.name} + + + + + + + + + + + + + + + @@ -6577,234 +7003,6 @@ y7fdOgAAAABJRU5ErkJggk== -<#if (related_support_files_table_count >0 )> - - - - - - - - - - - - - - - - - 相关/支持文件 - - - -<#if (related_support_files_table_count ==0 )> - - - - - - - - - - - - - - - -<#else> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 序号 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 文件名称 - - - - - <#list related_support_files_table as table7> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${table7.desc} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${table7.name} - - - - - - - - - - - - - - - - - - <#if (T_supplementary_articles_count >0)> diff --git a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml index 3d9e7bd5..a9cd3849 100644 --- a/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml +++ b/com.actionsoft.apps.coe.pal/method/control.policy/diagram.attribute.custom.xml @@ -7,9 +7,9 @@ - - - + + + @@ -29,5 +29,7 @@ - + + + diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/util/PalManageUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/util/PalManageUtil.java index bddf7ec1..6a5542de 100644 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/util/PalManageUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/util/PalManageUtil.java @@ -174,6 +174,7 @@ public class PalManageUtil { icons.add("|#88147F");//紫旗帜(xe835-88147F.png) icons.add("|#7DABB1");//浅蓝旗帜(xe835-7DABB1.png) icons.add("|#707070");//灰旗帜(xe835-707070.png) + icons.add("|#D81E06");//关键点(xe835-707070.png) return icons; } @@ -305,6 +306,9 @@ public class PalManageUtil { case "|#707070"://灰旗帜(-.png) dataUrl = "xe835-707070.png"; break; + case "|#D81E06"://关键点(-.png) + dataUrl = "xe63d-D81E06.png"; + break; } return dataUrl; } 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 75242dce..e9b95c20 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 @@ -1628,6 +1628,32 @@ function getRelevanceShapes(objId, attributeValue) { saveRelevanceShapesTODB(relationShapes, shape.id, shape.text, $("title").text(), shapeGroupId, objId, shape, attributeValue); } +// 得到关联形状 +function getRelevanceShapes_new(objId, attributeValue,linkObject) { + $("#attr_dialog_normal_relevance_shapes_div").dialog('close'); + selectShape = Utils.getSelected()[0]; + var shape = selectShape; + if (!shape) { + return; + } + var relationShapes = attr_content_iframe_relevance_shapes.getRelationShapeInfos(); + + var shapeGroupId = ""; + for (var i = 0; i < shape.dataAttributes.length; i++) { + var attr = shape.dataAttributes[i]; + if (attr.shapeGroupId != undefined && attr.shapeGroupId != "") { + shapeGroupId = attr.shapeGroupId; + break; + } + } + shape = getAttributeByAttrId(shape, objId, relationShapes); + var linksArray = []; + linksArray.push(linkObject); + shape.dataAttributes[13].linksArray =linksArray; + shape.link = linkObject.name; + saveRelevanceShapesTODB(relationShapes, shape.id, shape.text, $("title").text(), shapeGroupId, objId, shape, attributeValue); +} + Array.prototype.unique = function () { var res = []; var json = {}; @@ -2266,8 +2292,16 @@ function updateAttributeById(objId, va, shapeId) { ]; shape.dataAttributes[13]["dataShowConfig"].config = dataArray; }else{ - //删除右下角图表 - shape.dataAttributes[13]["dataShowConfig"].config = []; + var dataArray = [ + { + "horizontal": "right", + "verity": "bottom", + "showType": "icon", + "iconContent": "" + } + + ]; + shape.dataAttributes[13]["dataShowConfig"].config = dataArray; } Model.update(shape); } @@ -3763,9 +3797,23 @@ function openRelationDig(obj, value) { cls: "blue", handler: function () { var tmpObjId = $(obj).attr("objid"); - getRelevanceShapes(tmpObjId, value); var tmpShape = Utils.getSelected()[0]; var tmpTitle = tmpShape.title; + if(tmpTitle === "子流程"){ + var relationShapes = attr_content_iframe_relevance_shapes.getRelationShapeInfos(); + //增加默认的链接,打开该文件模型 + var linkObject = { + "name":relationShapes[0].relationShapeText, + "value":relationShapes[0].relationShapeText, + "target": "newTab", + "type": "file", + "uuid": relationShapes[0].relationFileId, + "url":"./w?sid="+sid+"&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid="+relationShapes[0].relationFileId+"&openType=0&perms=&filePerms=" + }; + getRelevanceShapes_new(tmpObjId, value,linkObject); + }else{ + getRelevanceShapes(tmpObjId, value); + } if (tmpShape.name == "linker") { return; }