增加获取Aris流程名称的方法
This commit is contained in:
parent
d98504b882
commit
9f79f45f66
@ -223,7 +223,7 @@ public class ProcessUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有epc模型,key:epc-id,value:arisUrl
|
||||
* 获取所有epc模型的Aris地址路径(包括Aris流程名称),key:epc-id,value:arisUrl
|
||||
* @param wsId
|
||||
* @return
|
||||
*/
|
||||
@ -271,5 +271,59 @@ public class ProcessUtil {
|
||||
}
|
||||
return propValMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有epc模型的Aris流程名称
|
||||
* @param wsId
|
||||
* @return
|
||||
*/
|
||||
public static Map<String, String> getPalRepositoryArisNameMap(String wsId) {
|
||||
Map<String, String> propValMap = new HashMap<>();
|
||||
Iterator<PALRepositoryModel> iterator = PALRepositoryCache.getByWsId(wsId);
|
||||
List<PALRepositoryModel> list = new ArrayList<>();
|
||||
|
||||
// 过滤epc
|
||||
while (iterator.hasNext()) {
|
||||
PALRepositoryModel model = iterator.next();
|
||||
if (Constant.PROCESS_EPC.equals(model.getMethodId())) {
|
||||
list.add(model);
|
||||
}
|
||||
}
|
||||
// 找到最新版本,只匹配最新版本(在日志中添加此明显提示)
|
||||
List<PALRepositoryModel> recentVerList = new ArrayList<>();
|
||||
Map<String, PALRepositoryModel> modelMap = new HashMap<>();
|
||||
for (PALRepositoryModel model : list) {
|
||||
if (!modelMap.containsKey(model.getVersionId())) {
|
||||
modelMap.put(model.getVersionId(), model);
|
||||
} else {
|
||||
if (modelMap.get(model.getVersionId()).getVersion() < model.getVersion()) {
|
||||
modelMap.put(model.getVersionId(), model);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Map.Entry<String, PALRepositoryModel> entry : modelMap.entrySet()) {
|
||||
recentVerList.add(entry.getValue());
|
||||
}
|
||||
list = recentVerList;
|
||||
|
||||
PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao();
|
||||
// aris流程名称
|
||||
List<PALRepositoryPropertyModel> arisNameModels = dao.queryByWsId(wsId);
|
||||
arisNameModels = arisNameModels.stream().filter(item -> Constant.METHOD_ARIS_NAME.equals(item.getPropertyId())).collect(Collectors.toList());
|
||||
Map<String, String> arisNameMap = new HashMap<>();
|
||||
for (PALRepositoryPropertyModel prop : arisNameModels) {
|
||||
arisNameMap.put(prop.getPlId(), StrUtil.removeAllBlack(prop.getPropertyValue()));// 去除空格
|
||||
}
|
||||
for (PALRepositoryModel model : list) {
|
||||
if (arisNameMap.containsKey(model.getId())) {
|
||||
List<String> pathList = new ArrayList<>();
|
||||
if (UtilString.isNotEmpty(arisNameMap.get(model.getId()))) {
|
||||
propValMap.put(model.getId(), arisNameMap.get(model.getId()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return propValMap;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user