调整分类名称和分类的维护性
This commit is contained in:
parent
613b37e207
commit
a34f388521
@ -11,5 +11,6 @@ public class Constants {
|
|||||||
public static String openCmd="com.actionsoft.apps.coe.pal.publisher_publish_file_open";
|
public static String openCmd="com.actionsoft.apps.coe.pal.publisher_publish_file_open";
|
||||||
|
|
||||||
public static String COE_APP_ID="com.actionsoft.apps.coe.pal";
|
public static String COE_APP_ID="com.actionsoft.apps.coe.pal";
|
||||||
|
public static String APP_ID="com.awspaas.user.apps.nqms.portal.indexpage";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -245,7 +245,24 @@ public class IndexService {
|
|||||||
List<JSONObject> processType = service.getFirstProcessPalByPid(wsId, PalCategoryEnum.PROCESS.getKey());
|
List<JSONObject> processType = service.getFirstProcessPalByPid(wsId, PalCategoryEnum.PROCESS.getKey());
|
||||||
String strategy = "战略类";
|
String strategy = "战略类";
|
||||||
String Operations = "运营类";
|
String Operations = "运营类";
|
||||||
String SupportAndServices = "支持与服务类";
|
String SupportAndServices = "支持类";
|
||||||
|
String portalZll = SDK.getAppAPI().getProperty(Constants.APP_ID, "portalZll");
|
||||||
|
// 考虑到可能存在的空值和空白字符,推荐使用这种方式
|
||||||
|
Set<String> zllSet = Arrays.stream(portalZll.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
String portalYyl = SDK.getAppAPI().getProperty(Constants.APP_ID, "portalYyl");
|
||||||
|
Set<String> yylSet = Arrays.stream(portalYyl.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
String portalZcl = SDK.getAppAPI().getProperty(Constants.APP_ID, "portalZcl");
|
||||||
|
Set<String> zclSet = Arrays.stream(portalZcl.split(","))
|
||||||
|
.map(String::trim)
|
||||||
|
.filter(StringUtils::isNotBlank)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
for (JSONObject type : processType) {
|
for (JSONObject type : processType) {
|
||||||
String name = type.getString("name");
|
String name = type.getString("name");
|
||||||
String id = type.getString("id");
|
String id = type.getString("id");
|
||||||
@ -256,11 +273,11 @@ public class IndexService {
|
|||||||
if (!name.startsWith(String.valueOf(index))) {
|
if (!name.startsWith(String.valueOf(index))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (index == 1) {
|
if (zllSet.contains(String.valueOf( index))) {
|
||||||
group = "strategy";
|
group = "strategy";
|
||||||
} else if (index > 1 && index <= 7) {
|
} else if (yylSet.contains(String.valueOf( index))) {
|
||||||
group = "Operations";
|
group = "Operations";
|
||||||
} else {
|
} else if (zclSet.contains(String.valueOf( index))) {
|
||||||
group = "SupportAndServices";
|
group = "SupportAndServices";
|
||||||
}
|
}
|
||||||
if (!"1.0".equals(version) && StringUtils.isNotBlank(versionId)) {
|
if (!"1.0".equals(version) && StringUtils.isNotBlank(versionId)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user