From a6103fb312c7cc7a31502f1578178f3cbf1adcf5 Mon Sep 17 00:00:00 2001 From: yujh Date: Thu, 1 Aug 2024 10:26:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E7=94=B3=E8=AF=B7=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event/AddFilePermTaskEndEvent.java | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/AddFilePermTaskEndEvent.java b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/AddFilePermTaskEndEvent.java index 850936f3..f8117d8e 100644 --- a/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/AddFilePermTaskEndEvent.java +++ b/com.actionsoft.apps.coe.pal.publisher/src/com/actionsoft/apps/coe/pal/publisher/event/AddFilePermTaskEndEvent.java @@ -64,11 +64,25 @@ public class AddFilePermTaskEndEvent extends ExecuteListener implements ExecuteL * @param wsId */ public void updatePublishScopeProcess(ProcessExecutionContext ctx,BO sourceBo){ - String architectureScopeId = sourceBo.getString("ARCHITECTURESCOPEID");//架构范围 - String[] files = architectureScopeId.split(","); - for (String fileId : files) { - BO oldBo = SDK.getBOAPI().query(FilePermConstant.BO_ACT_PUBLISH_PERM_SCOPE).addQuery("PALVERSIONID=", fileId).detail(); - updateData(ctx,oldBo); + String architectureScopeName = sourceBo.getString("ARCHITECTURESCOPE");//架构范围 + String[] scopeNames = architectureScopeName.split(","); + for (String scopeName : scopeNames) { + //记录是否包含空格,有空格即拆分一下 + if(scopeName.contains(" ")){ + scopeName = scopeName.split(" ")[1]; + } + //先根据fileId查询当前所属的L1,L2架构 + String whereOrSql = " PROCESS_ARCHITECTURE_L1=" + "'" + scopeName + "'" + + " OR" + + " PROCESS_ARCHITECTURE_L2=" + "'" + scopeName + "'" + + " OR" + + " PROCESS_ARCHITECTURE_L3=" + "'" + scopeName + "'" + + " OR" + + " PROCESS_ARCHITECTURE_L4=" + "'" + scopeName + "'"; + List list = SDK.getBOAPI().query(FilePermConstant.BO_ACT_PUBLISH_PERM_SCOPE).addQuery(whereOrSql, null).list(); + for (BO oldBo : list) { + updateData(ctx,oldBo); + } } }