Merge remote-tracking branch 'origin/apps_dev' into apps_dev
This commit is contained in:
commit
8251c65ef7
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.db2;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.dm;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {
|
||||
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.gbase;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.highgo;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.informix;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.kingbase;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.mysql;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.oracle;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.oscar;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.postgresql;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.sqlserver;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -0,0 +1,5 @@
|
||||
package com.actionsoft.apps.coe.pal.processlist.dao.adapter.sybase;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.processlist.dao.ProcessListExportDao;
|
||||
|
||||
public class ExportDaoAdapter extends ProcessListExportDao {}
|
||||
@ -50,6 +50,7 @@ public class ExportAPIManager {
|
||||
try {
|
||||
exportDao.insert(exportModel);
|
||||
} catch (AWSDataAccessException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
// 加入缓存
|
||||
|
||||
@ -11,6 +11,7 @@ import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.Design
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.model.DesignerShapeRelationModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryPropertyModel;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||
import com.actionsoft.bpms.commons.login.constant.LoginConst;
|
||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
||||
import com.actionsoft.bpms.org.model.RoleModel;
|
||||
@ -177,4 +178,46 @@ public class ProcessListUtil {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取模型数据的真实层级level RepositoryModel
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public static PALRepositoryModel getRealLevelRepository(PALRepositoryModel model) {
|
||||
PALRepositoryModelImpl newModel = null;
|
||||
try {
|
||||
newModel = ((PALRepositoryModelImpl) model).clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (newModel != null) {
|
||||
Set<String> pids = new HashSet<>();
|
||||
int level = 1;
|
||||
StringBuilder sBuilder = new StringBuilder();
|
||||
String pid = newModel.getParentId();
|
||||
while (pid.length() >= 36 && !pids.contains(pid)) {
|
||||
pids.add(pid);
|
||||
PALRepositoryModel parentModel = PALRepositoryCache.getCache().get(pid);
|
||||
if (parentModel == null) {
|
||||
List<PALRepositoryModel> versionList = PALRepositoryCache.getByVersionId(model.getWsId(), pid);
|
||||
if (versionList != null && versionList.size() > 0) {
|
||||
for (PALRepositoryModel m : versionList) {
|
||||
if (m.isUse()) {
|
||||
parentModel = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parentModel != null) {
|
||||
level++;
|
||||
pid = parentModel.getParentId();
|
||||
}
|
||||
}
|
||||
newModel.setLevel(level);
|
||||
}
|
||||
return newModel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -137,6 +137,7 @@ public class PALRepositoryListWeb extends ActionWeb {
|
||||
int maxLevel = 0;
|
||||
while (iterator.hasNext()) {
|
||||
PALRepositoryModel next = iterator.next();
|
||||
PALRepositoryModel model = ProcessListUtil.getRealLevelRepository(next);
|
||||
if (!UtilString.isEmpty(category)) {
|
||||
if (!category.equals(next.getMethodCategory())) {
|
||||
continue;
|
||||
@ -147,8 +148,8 @@ public class PALRepositoryListWeb extends ActionWeb {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (next.getLevel() > maxLevel) {
|
||||
maxLevel = next.getLevel();
|
||||
if (model.getLevel() > maxLevel) {
|
||||
maxLevel = model.getLevel();
|
||||
}
|
||||
}
|
||||
JSONArray result = new JSONArray();
|
||||
@ -641,6 +642,12 @@ public class PALRepositoryListWeb extends ActionWeb {
|
||||
List<PALRepositoryModel> palList = new ArrayList<>();
|
||||
Set<String> ids = new HashSet<>();
|
||||
PALRepositoryCache.getAllChildrenModelsByPid(wsId, category, palList, ids);
|
||||
// 重新设置pllevel
|
||||
for (int i = 0; i < palList.size(); i++) {
|
||||
palList.set(i, ProcessListUtil.getRealLevelRepository(palList.get(i)));
|
||||
}
|
||||
|
||||
|
||||
// 获取所有正在设计中的
|
||||
List<PALRepositoryModel> tmpPalList = new ArrayList<>();
|
||||
Set<String> levelSet = new HashSet<>();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user