aris导入xml时角色ext2处理;开发已有数据角色ext2批量刷处理功能
This commit is contained in:
parent
18f7ee99df
commit
83996ec549
Binary file not shown.
@ -1348,8 +1348,11 @@ public class ArisXmlImportRun {
|
|||||||
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId(parentId, wsId) + 1;
|
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId(parentId, wsId) + 1;
|
||||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||||
|
|
||||||
|
List<String> processList = new ArrayList<>();
|
||||||
|
processList.add(0, "org.role");
|
||||||
|
processList.add(1, palModel.getId());
|
||||||
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, UUIDGener.getUUID(), wsId, arisModel.getName(), "", orderIndex, parentId, "org", true, 1,
|
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, UUIDGener.getUUID(), wsId, arisModel.getName(), "", orderIndex, parentId, "org", true, 1,
|
||||||
id, false, "org.role", "0", 1, null, null, uc.getUID(), uc.getUID(), nowTime, null, palModel.getId(), null, null,
|
id, false, "org.role", "0", 1, null, null, uc.getUID(), uc.getUID(), nowTime, null, processList.toString(), null, null,
|
||||||
null, null, null, null, null, -1);
|
null, null, null, null, null, -1);
|
||||||
coeProcessLevel.insert(model);
|
coeProcessLevel.insert(model);
|
||||||
LogUtil.appendLog(Constant.LOG_END + "创建与ARIS流程同名的角色图[" + arisModel.getName() + "][" + model.getId() + "]", simpleLogFile, fullLogFile);
|
LogUtil.appendLog(Constant.LOG_END + "创建与ARIS流程同名的角色图[" + arisModel.getName() + "][" + model.getId() + "]", simpleLogFile, fullLogFile);
|
||||||
|
|||||||
Binary file not shown.
@ -0,0 +1,53 @@
|
|||||||
|
package com.actionsoft.apps.coe.pal.addons;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepository;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.PALRepositoryModel;
|
||||||
|
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
|
||||||
|
import com.actionsoft.bpms.commons.addons.AddOnsInterface;
|
||||||
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
|
import com.actionsoft.sdk.local.SDK;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RefreshRoleExt2Web implements AddOnsInterface {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String mainPage(UserContext uc) {
|
||||||
|
PALRepository dao = new PALRepository();
|
||||||
|
List<PALRepositoryModel> _list = dao.getAllInstance();
|
||||||
|
int i = 0;
|
||||||
|
if (_list != null) {
|
||||||
|
SDK.getLogAPI().consoleInfo("[开始]刷新角色图EXT2字段内容");
|
||||||
|
for (PALRepositoryModel model : _list) {
|
||||||
|
if ("org.role".equals(model.getMethodId())) {
|
||||||
|
if (UtilString.isNotEmpty(model.getExt2()) && PALRepositoryCache.getCache().get(model.getExt2()) != null) {
|
||||||
|
List<String> processList = new ArrayList<>();
|
||||||
|
processList.add(0, "org.role");
|
||||||
|
processList.add(1, model.getExt2());
|
||||||
|
try {
|
||||||
|
int r = dao.updateRepositoryExt(model.getId(), model.getExt1(), processList.toString(), model.getExt3(), model.getExt4());
|
||||||
|
if (r > 0) {
|
||||||
|
SDK.getLogAPI().consoleInfo("[成功]刷新角色图EXT2字段内容,角色图[" + model.getName() + "][" + model.getId() + "][" + model.getMethodId() + "],由[" + model.getExt2() + "]改为[" + processList.toString() + "]");
|
||||||
|
i++;
|
||||||
|
} else {
|
||||||
|
SDK.getLogAPI().consoleErr("[失败]刷新角色图EXT2字段内容,角色图[" + model.getName() + "][" + model.getId() + "][" + model.getMethodId() + "],由[" + model.getExt2() + "]改为[" + processList.toString() + "]");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
SDK.getLogAPI().consoleErr("[失败]刷新角色图EXT2字段内容,角色图[" + model.getName() + "][" + model.getId() + "][" + model.getMethodId() + "],由[" + model.getExt2() + "]改为[" + processList.toString() + "],错误信息:" + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SDK.getLogAPI().consoleInfo("[完成]刷新角色图EXT2字段内容,总共更新[" + i + "]条");
|
||||||
|
if (i > 0) {
|
||||||
|
PALRepositoryCache.getCache().reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "刷新角色图EXT2字段内容完成,总共更新[" + i + "]条,详情见BPM平台日志";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Timer;
|
import java.util.Timer;
|
||||||
|
|
||||||
|
import com.actionsoft.apps.coe.pal.addons.RefreshRoleExt2Web;
|
||||||
import com.actionsoft.apps.coe.pal.aslp.*;
|
import com.actionsoft.apps.coe.pal.aslp.*;
|
||||||
import com.actionsoft.apps.coe.pal.aslp.DiagramAPI.QueryFileElements;
|
import com.actionsoft.apps.coe.pal.aslp.DiagramAPI.QueryFileElements;
|
||||||
import com.actionsoft.apps.coe.pal.aslp.DiagramAPI.QueryRelationInfoByRelationShapeId;
|
import com.actionsoft.apps.coe.pal.aslp.DiagramAPI.QueryRelationInfoByRelationShapeId;
|
||||||
@ -173,6 +174,9 @@ public class Plugins implements PluginListener {
|
|||||||
|
|
||||||
//小组用户权限信息cache
|
//小组用户权限信息cache
|
||||||
list.add(new CachePluginProfile(CooperationCache.class));
|
list.add(new CachePluginProfile(CooperationCache.class));
|
||||||
|
|
||||||
|
// 角色图刷新
|
||||||
|
list.add(new AddOnsPluginProfile(RefreshRoleExt2Web.class.getName(), "刷新角色图EXT2内容", ""));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user