From 9b170725e411852b526daadc1fbe6d4d9271e9a3 Mon Sep 17 00:00:00 2001 From: chengli <783535094@qq.com> Date: Mon, 4 Jul 2022 21:02:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=B1=9E=E6=80=A7~=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/DesignerRelationShapeWeb.java | 7 ++++--- .../repository/util/CoeProcessLevelUtil.java | 7 +++++++ .../repository/web/CoeProcessLevelWeb.java | 12 +++++------ .../extend/js/designer.extend.link.js | 20 +++++++++++++++++++ 4 files changed, 37 insertions(+), 9 deletions(-) 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 1cc26429..f744da95 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 @@ -857,11 +857,12 @@ public class DesignerRelationShapeWeb extends ActionWeb { /** * 获取第二级及其以下目录 + * by bzp 增加method方法 判断 * * @param pid * @return */ - public String getTwoNodeJson(String pid, String wsId,String method, String ruuid) { + public String getTwoNodeJson(String pid, String wsId, String method, String ruuid) { List coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(pid, wsId); JSONArray jsonArray = new JSONArray(); for (int i = 0; i < coeProcessLevelModels.size(); i++) { @@ -901,7 +902,7 @@ public class DesignerRelationShapeWeb extends ActionWeb { if ("control.kpi".equals(methodId) && methodScope.equals(methodId)) { //根据ID去查 是否有关联管流程 String tmpId = node.getString("id"); - String sql = "select FILEID from APP_ACT_COE_PAL_SHAPE_RLAT where ATTRID='lcjx' and RELATIONFILEID='%s'"; + String sql = "select FILEID from APP_ACT_COE_PAL_SHAPE_RLAT where ATTRID='Process_performance_metrics' and RELATIONFILEID='%s'"; String reId = DBSql.getString(String.format(sql, tmpId)); //还要判断是不是当前流程 if (!reId.isEmpty() && !ruuid.equals(reId)) { @@ -1097,7 +1098,7 @@ public class DesignerRelationShapeWeb extends ActionWeb { if ("control.kpi".equals(methodId) && methodScope.equals(methodId)) { //根据ID去查 是否有关联管流程 String tmpId = node.getString("id"); - String sql = "select FILEID from APP_ACT_COE_PAL_SHAPE_RLAT where ATTRID='lcjx' and RELATIONFILEID='%s'"; + String sql = "select FILEID from APP_ACT_COE_PAL_SHAPE_RLAT where ATTRID='Process_performance_metrics' and RELATIONFILEID='%s'"; String reId = DBSql.getString(String.format(sql, tmpId)); //还要判断是不是当前流程 if (!reId.isEmpty() && !ruuid.equals(reId)) { diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java index 3bca7340..da7033e4 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java @@ -700,6 +700,13 @@ public class CoeProcessLevelUtil { DesignerShapeRelationDao dao = new DesignerShapeRelationDao(); List oldModelList = dao.getModelListByFileId(olduuid); for (DesignerShapeRelationModel oldModel : oldModelList) { + //bybzp 如果图形是过程链图和BPMN图 则不复制流程绩效和角色 + PALRepositoryModel model = PALRepositoryCache.getCache().get(uuId); + String methodId = model.getMethodId(); + if("process.bpmn2,process.epc".contains(methodId) && "Process_performance_metrics,role".contains(oldModel.getAttrId())){ + continue; + } + //by bzp end if (mapNewUUID.containsKey(oldModel.getShapeId())) { DesignerShapeRelationModel newModel = new DesignerShapeRelationModel(); newModel.setId(UUIDGener.getUUID()); 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 9831af48..e7d5ff97 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 @@ -8226,7 +8226,6 @@ public class CoeProcessLevelWeb extends ActionWeb { return ro.toString(); } - /** * 获取最近的文件和收藏的文件 * @param wsId @@ -8788,6 +8787,7 @@ public class CoeProcessLevelWeb extends ActionWeb { return ro.toString(); } + /** * by bzp * @@ -8802,8 +8802,8 @@ public class CoeProcessLevelWeb extends ActionWeb { String L3 = null; JSONArray pathArray = CoeProcessLevelUtil.getRepositoryPath(targetId); String updateSql = "update APP_ACT_COE_PAL_PROP set PROPERTYVALUE ='%s' where PLID ='%s' and PROPERTYID='%s'"; - String queryKpiSql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID ='%s' and PROPERTYID='lcjx'"; - String querySql = "SELECT * FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '%s' and ATTRID='lcjx'"; + String queryKpiSql = "select PROPERTYVALUE from APP_ACT_COE_PAL_PROP where PLID ='%s' and PROPERTYID='Process_performance_metrics'"; + String querySql = "SELECT * FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID = '%s' and ATTRID='Process_performance_metrics'"; for (int i = 1; i < pathArray.size(); i++) { JSONObject tmp = pathArray.getJSONObject(i); String name = tmp.getString("name"); @@ -8821,13 +8821,13 @@ public class CoeProcessLevelWeb extends ActionWeb { for (PALRepositoryModel palRepositoryModel : sourceList) { String id = palRepositoryModel.getId(); if (L1 != null) { - DBSql.update(String.format(updateSql, L1, id, "L1")); + DBSql.update(String.format(updateSql, L1, id, "Process_Architecture_L1")); } if (L2 != null) { - DBSql.update(String.format(updateSql, L2, id, "L2")); + DBSql.update(String.format(updateSql, L2, id, "Process_Architecture_L2")); } if (L3 != null) { - DBSql.update(String.format(updateSql, L3, id, "L3")); + DBSql.update(String.format(updateSql, L3, id, "Process_Architecture_L3")); } /** * 查看改流程是否关联流程绩效 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 476b8fc1..61ed84db 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 @@ -3665,6 +3665,26 @@ function saveRelevanceShapesTODB(shapesObj, shapeId, shapeName, fileName, relationShapeModelObject[shapeIdAttrId] = temp.relationShapeText; } } + //by bzp 校验角色和岗位不能同时选择 + if(objId == 'role' || objId == 'post'){ + if(objId == 'role'){ + //判断岗位 + var tmp = $("input[objid='post']").val(); + if(tmp.length > 0){ + $.simpleAlert("不能同时选择岗位和角色"); + return; + } + } + if(objId == 'post'){ + //判断角色 + var tmp = $("input[objid='role']").val(); + if(tmp.length > 0){ + $.simpleAlert("不能同时选择岗位和角色"); + return; + } + } + } + //by bzp end var ref = $("input[objid_shapeId='" + objId + "']").attr("ref"); $.ajax({ type : "POST",