diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar index 77a309be..16e135cb 100644 Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ 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 166fba56..c0ec59ef 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 @@ -16,6 +16,7 @@ import com.actionsoft.apps.coe.pal.pal.ws.constant.CoeWsConstant; import com.actionsoft.apps.coe.pal.system.util.StringUtil; import com.actionsoft.apps.coe.pal.util.HighSecurityUtil; import com.actionsoft.apps.coe.pal.util.ShapeUtils; +import com.actionsoft.apps.coe.pal.util.SubUtil; import com.actionsoft.apps.lifecycle.api.AppsAPIManager; import com.actionsoft.apps.resource.AppContext; import com.actionsoft.apps.resource.plugin.profile.DCPluginProfile; @@ -8244,11 +8245,26 @@ public class CoeProcessLevelWeb extends ActionWeb { //设置三级架构,如果没有填充值为/ for(int i=1;i<=3;i++){ - String str2; + + String repid=((JSONObject) repositoryPathData.get(i)).getString("id"); + + PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(repid); + + String methodId=parentModel.getMethodId(); + + + String str2 = ""; if(i<=repositoryPathData.size()-1){ String name1=((JSONObject) repositoryPathData.get(i)).getString("name"); String str1=name1.substring(0, name1.lastIndexOf(".")+1); - str2=name1.substring(str1.length()+1, name1.length()); + if(UtilString.isNotEmpty(str1)){ + String end=name1.substring(name1.lastIndexOf(".")+1); + int len=Integer.valueOf(SubUtil.getQuantity(end).length()); + str2=name1.substring(str1.length()+len, name1.length()); + }else{ + str2=name1; + } + }else{ str2="/"; } @@ -10469,7 +10485,14 @@ public String deleteReply(String replyid, String messageid) { if(i<=pathArray.size()-1){ String name1=((JSONObject) pathArray.get(i)).getString("name"); String str1=name1.substring(0, name1.lastIndexOf(".")+1); - L=name1.substring(str1.length()+1, name1.length()); + //L=name1.substring(str1.length()+1, name1.length()); + if(UtilString.isNotEmpty(str1)) { + String end = name1.substring(name1.lastIndexOf(".") + 1); + int len = Integer.valueOf(SubUtil.getQuantity(end).length()); + L = name1.substring(str1.length() + len, name1.length()); + }else{ + L=name1; + } }else{ L="/"; } diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/SubUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/SubUtil.java new file mode 100644 index 00000000..70c3392a --- /dev/null +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/util/SubUtil.java @@ -0,0 +1,27 @@ +package com.actionsoft.apps.coe.pal.util; + +public class SubUtil { + + /** + * 截取字符串前面的正整数,如"22天"得"22","18个人"得到"18". + * @return + */ + public static String getQuantity(String regular){ + int index = 0; + for (int i = 0; i < regular.length(); i++) { + char c = regular.charAt(i); + if (Character.isDigit(c)) { + if (i == regular.length() - 1) { + index = i + 1; + } else { + index = i; + } + continue; + } else { + index = i; + break; + } + } + return regular.substring(0, index); + } +}