From fbc8f3b0a75ba859d78dfe9f27c93da3fc0a6979 Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Sat, 30 Jul 2022 19:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6=E7=AD=9B?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/DesignerRelationShapeWeb.java | 76 ++++++++++--------- 1 file changed, 40 insertions(+), 36 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 0475c3a4..c1ccd0e0 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 @@ -856,51 +856,55 @@ public class DesignerRelationShapeWeb extends ActionWeb { } macroLibraries.put("treeData", jsonArr_new.toString()); }else if(attrId.equals("R_relevant_flies")){ - boolean publishflag=true; - for (int i = 0; i < objects.size(); i++) { - JSONObject jsonObject = objects.getJSONObject(i); - String isPublish=jsonObject.getString("isPublish"); - String isParent=jsonObject.getString("isParent"); - String id=jsonObject.getString("id"); - if(isParent!=null){ - if(isParent.equals("false")){ - if(isPublish!=null){ - RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?",jsonObject.getString("name"),1,1); - if(rowMap!=null){ - jsonObject.put("nocheck",false); - jsonArr_new.add(jsonObject); - } - } - }else{ - jsonObject.put("nocheck", true); - jsonArr_new.add(jsonObject); + for (int i = 0; i < objects.size(); i++) { + JSONObject jsonObject = objects.getJSONObject(i); + String isParent=jsonObject.getString("isParent"); + if(isParent!=null){ + if(isParent.equals("false")){ + //过滤废止数据 + RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISSTOP=? AND ISUSE=?",jsonObject.getString("name"),1,1); + if(rowMap!=null){ + continue; + } + RowMap publishRowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?",jsonObject.getString("name"),1,1); + if(publishRowMap!=null){ + jsonObject.put("nocheck",false); + jsonArr_new.add(jsonObject); + } + }else{ + jsonObject.put("nocheck", true); + jsonArr_new.add(jsonObject); + } + }else{ + jsonObject.put("nocheck", true); + jsonArr_new.add(jsonObject); + } + + } + macroLibraries.put("treeData", jsonArr_new.toString()); + } else if(attrId.equals("support_files")) { + + for (int i = 0; i < objects.size(); i++) { + JSONObject jsonObject = objects.getJSONObject(i); + String isParent=jsonObject.getString("isParent"); + if(isParent!=null){ + if(isParent.equals("false")){ + //过滤废止数据 + RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISSTOP=? AND ISUSE=?",jsonObject.getString("name"),1,1); + if(rowMap!=null){ + continue; } }else{ jsonObject.put("nocheck", true); jsonArr_new.add(jsonObject); } - - - - } - macroLibraries.put("treeData", jsonArr_new.toString()); - } else if(attrId.equals("support_files")) { - for (int i = 0; i < objects.size(); i++) { - JSONObject jsonObject = objects.getJSONObject(i); - - String isPublish=jsonObject.getString("isPublish"); - if(isPublish!=null){ - if(isPublish.equals("false")){ - JSONObject node = objects.getJSONObject(i); - node.put("nocheck", "false"); - jsonArr_new.add(node); - } }else{ - jsonArr_new.add(objects.getJSONObject(i)); + jsonObject.put("nocheck", true); + jsonArr_new.add(jsonObject); } } - macroLibraries.put("treeData", jsonArr_new.toString()); + macroLibraries.put("treeData", treeJson); }else{ macroLibraries.put("treeData", treeJson); }