表单/绩效图设置temdid/弹窗新增跳转模型
This commit is contained in:
parent
4fd85b40ac
commit
7ada17edc1
@ -789,29 +789,37 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
|||||||
JSONObject jsonObject = objects.getJSONObject(i);
|
JSONObject jsonObject = objects.getJSONObject(i);
|
||||||
String id = jsonObject.getString("id");
|
String id = jsonObject.getString("id");
|
||||||
String isParent = jsonObject.getString("isParent");
|
String isParent = jsonObject.getString("isParent");
|
||||||
|
|
||||||
if (isParent != null) {
|
if (isParent != null) {
|
||||||
if (isParent.equals("true")) {
|
if (isParent.equals("true")) {
|
||||||
List<PALRepositoryModel> coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(id, wsId);
|
String title=jsonObject.getString("title");
|
||||||
if (coeProcessLevelModels.size() > 0) {
|
if(title.equals("角色模型")){
|
||||||
for (int k = 0; k < coeProcessLevelModels.size(); k++) {
|
jsonArr_new.add(objects.getJSONObject(i));
|
||||||
PALRepositoryModel coeProcessLevelModel = coeProcessLevelModels.get(k);
|
}else{
|
||||||
if (coeProcessLevelModel != null) {
|
List<PALRepositoryModel> coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(id, wsId);
|
||||||
List data = new ArrayList();
|
if (coeProcessLevelModels.size() > 0) {
|
||||||
data.add(0, "org.role");
|
for (int k = 0; k < coeProcessLevelModels.size(); k++) {
|
||||||
data.add(1, ruuid);
|
PALRepositoryModel coeProcessLevelModel = coeProcessLevelModels.get(k);
|
||||||
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", coeProcessLevelModel.getId(), data.toString());
|
if (coeProcessLevelModel != null) {
|
||||||
if (rowMap != null) {
|
List data = new ArrayList();
|
||||||
showflag = false;
|
data.add(0, "org.role");
|
||||||
|
data.add(1, ruuid);
|
||||||
|
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", coeProcessLevelModel.getId(), data.toString());
|
||||||
|
if (rowMap != null) {
|
||||||
|
/*showflag = false;
|
||||||
if (showflag == false) {
|
if (showflag == false) {
|
||||||
jsonArr_new.add(objects.getJSONObject(i));
|
jsonArr_new.add(objects.getJSONObject(i));
|
||||||
showflag = true;
|
showflag = true;
|
||||||
|
}*/
|
||||||
|
JSONObject json = getJSon(coeProcessLevelModel);
|
||||||
|
|
||||||
|
jsonArr_new.add(json);
|
||||||
}
|
}
|
||||||
JSONObject json = getJSon(coeProcessLevelModel);
|
|
||||||
jsonArr_new.add(json);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
List data = new ArrayList();
|
List data = new ArrayList();
|
||||||
data.add(0, jsonObject.getString("plMethodId"));
|
data.add(0, jsonObject.getString("plMethodId"));
|
||||||
|
|||||||
@ -3753,106 +3753,108 @@ public class CoeDesignerWeb extends ActionWeb {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作升级版本/复制副本 创建对应角色/绩效关联关系
|
* 操作升级版本/复制副本 创建对应角色/绩效关联关系
|
||||||
* @param isLargeIteration
|
* @param isLargeIteration
|
||||||
* @param olduuid
|
* @param olduuid
|
||||||
*/
|
*/
|
||||||
public String CreateincidenceRelation(boolean isLargeIteration,String olduuid,PALRepositoryModel newModel,Map<String, String> mapNewUUID,Double tempVer){
|
public String CreateincidenceRelation(boolean isLargeIteration,String olduuid,PALRepositoryModel newModel,Map<String, String> mapNewUUID,Double tempVer){
|
||||||
ResponseObject ro = ResponseObject.newOkResponse();
|
ResponseObject ro = null;
|
||||||
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
||||||
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(olduuid);
|
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(olduuid);
|
||||||
if(oldModelList.size()>0){
|
if(oldModelList.size()>0){
|
||||||
for (DesignerShapeRelationModel oldModel : oldModelList) {
|
for (DesignerShapeRelationModel oldModel : oldModelList) {
|
||||||
|
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(newModel.getId());
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(newModel.getId());
|
||||||
//如果关联角色图,则同步复制角色图关联关系
|
//如果关联角色图,则同步复制角色图关联关系
|
||||||
String methodIds="";
|
String methodIds="";
|
||||||
if(oldModel.getAttrId().equals("role")){
|
if(oldModel.getAttrId().equals("role")){
|
||||||
methodIds="org.role";
|
methodIds="org.role";
|
||||||
if (mapNewUUID.containsKey(oldModel.getShapeId())) {
|
if (mapNewUUID.containsKey(oldModel.getShapeId())) {
|
||||||
|
|
||||||
String srcPath = "";// 源文件路径
|
String srcPath = "";// 源文件路径
|
||||||
String targetPath = "";// 目标文件路径
|
String targetPath = "";// 目标文件路径
|
||||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
||||||
PALRepositoryModelImpl lastplModel = (PALRepositoryModelImpl) coeProcessLevel.getInstance(oldModel.getRelationFileId());
|
PALRepositoryModelImpl lastplModel = (PALRepositoryModelImpl) coeProcessLevel.getInstance(oldModel.getRelationFileId());
|
||||||
final String oldUUID = lastplModel.getId();
|
final String oldUUID = lastplModel.getId();
|
||||||
lastplModel.setId(UUIDGener.getUUID());
|
lastplModel.setId(UUIDGener.getUUID());
|
||||||
final String newUUID = lastplModel.getId();
|
final String newUUID = lastplModel.getId();
|
||||||
//大小版本号处理
|
//大小版本号处理
|
||||||
tempVer = isLargeIteration ? coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId()) : coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId(),lastplModel.getVersion());
|
tempVer = isLargeIteration ? coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId()) : coeProcessLevel.getMaxVersionNum(lastplModel.getVersionId(),lastplModel.getVersion());
|
||||||
lastplModel.setHistoryMaxVersion("0");
|
lastplModel.setHistoryMaxVersion("0");
|
||||||
lastplModel.setVersion(VersionUtil.increaseVersionNo(tempVer,isLargeIteration));
|
lastplModel.setVersion(VersionUtil.increaseVersionNo(tempVer,isLargeIteration));
|
||||||
lastplModel.setUse(false);
|
lastplModel.setUse(false);
|
||||||
srcPath = lastplModel.getFilePath();
|
srcPath = lastplModel.getFilePath();
|
||||||
if (!"".equals(srcPath) && srcPath != null) {
|
if (!"".equals(srcPath) && srcPath != null) {
|
||||||
targetPath = srcPath.replace(oldModel.getId(), lastplModel.getId());
|
targetPath = srcPath.replace(oldModel.getId(), lastplModel.getId());
|
||||||
}
|
}
|
||||||
lastplModel.setFilePath(targetPath);
|
lastplModel.setFilePath(targetPath);
|
||||||
lastplModel.setPublish(false);
|
lastplModel.setPublish(false);
|
||||||
lastplModel.setStop(false);
|
lastplModel.setStop(false);
|
||||||
lastplModel.setApproval(false);
|
lastplModel.setApproval(false);
|
||||||
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
|
||||||
String uid = super.getContext().getUID();
|
String uid = super.getContext().getUID();
|
||||||
lastplModel.setCreateUser(uid);
|
lastplModel.setCreateUser(uid);
|
||||||
lastplModel.setCreateDate(nowTime);
|
lastplModel.setCreateDate(nowTime);
|
||||||
lastplModel.setModifyUser(uid);
|
lastplModel.setModifyUser(uid);
|
||||||
lastplModel.setModifyDate(nowTime);
|
lastplModel.setModifyDate(nowTime);
|
||||||
List data=new ArrayList<>();
|
List data=new ArrayList<>();
|
||||||
data.add(0,"org.role");
|
data.add(0,"org.role");
|
||||||
data.add(1,newModel.getId());
|
data.add(1,newModel.getId());
|
||||||
lastplModel.setExt2(data.toString());
|
lastplModel.setExt2(data.toString());
|
||||||
//密级
|
//密级
|
||||||
lastplModel.setSecurityLevel(-1);
|
lastplModel.setSecurityLevel(-1);
|
||||||
int store = 0;
|
int store = 0;
|
||||||
try {
|
try {
|
||||||
store = CoeProcessLevelDaoFacotory.createCoeProcessLevel().insert(lastplModel);
|
store = CoeProcessLevelDaoFacotory.createCoeProcessLevel().insert(lastplModel);
|
||||||
if (store == 1) {
|
if (store == 1) {
|
||||||
// 修改设计器文件
|
// 修改设计器文件
|
||||||
CoeFile fileUtil = new CoeFile();
|
CoeFile fileUtil = new CoeFile();
|
||||||
fileUtil.copyDefaultVersion(srcPath, oldUUID, targetPath, lastplModel.getId());
|
fileUtil.copyDefaultVersion(srcPath, oldUUID, targetPath, lastplModel.getId());
|
||||||
|
|
||||||
// 获取新旧节点关联关系
|
// 获取新旧节点关联关系
|
||||||
final Map<String, String> mapNewUUID1 = createShapeIdRelation(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), true);
|
final Map<String, String> mapNewUUID1 = createShapeIdRelation(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), true);
|
||||||
// 处理流程属性
|
// 处理流程属性
|
||||||
String property = CoePropertyUtil.getPropertyValue(oldModel.getRelationFileId() + "_attr");
|
String property = CoePropertyUtil.getPropertyValue(oldModel.getRelationFileId() + "_attr");
|
||||||
if (!UtilString.isEmpty(property)) {
|
if (!UtilString.isEmpty(property)) {
|
||||||
CoePropertyUtil.createProperty(newUUID + "_attr", property);
|
CoePropertyUtil.createProperty(newUUID + "_attr", property);
|
||||||
|
}
|
||||||
|
|
||||||
|
//重新设置修订关联关系
|
||||||
|
DesignerShapeRelationModel newModel1 = new DesignerShapeRelationModel();
|
||||||
|
newModel1.setId(UUIDGener.getUUID());
|
||||||
|
newModel1.setFileId(newModel.getId());
|
||||||
|
newModel1.setShapeId(mapNewUUID.get(oldModel.getShapeId()));
|
||||||
|
newModel1.setShapeText(oldModel.getShapeText());
|
||||||
|
newModel1.setAttrId(oldModel.getAttrId());
|
||||||
|
newModel1.setRelationFileId(newUUID);
|
||||||
|
newModel1.setRelationShapeId(oldModel.getRelationShapeId());
|
||||||
|
newModel1.setRelationShapeText(oldModel.getRelationShapeText());
|
||||||
|
dao.insert(newModel1);
|
||||||
|
|
||||||
|
|
||||||
|
CoeProcessLevelUtil.copyRepositoryProperty(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), PALRepositoryCache.getCache().get(newUUID), mapNewUUID1, _uc);
|
||||||
|
ro = ResponseObject.newOkResponse("创建成功");
|
||||||
|
ro.put("uuid", lastplModel.getId());
|
||||||
|
}else{
|
||||||
|
ro = ResponseObject.newWarnResponse("创建失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
ro = ResponseObject.newWarnResponse("创建失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
//重新设置修订关联关系
|
|
||||||
DesignerShapeRelationModel newModel1 = new DesignerShapeRelationModel();
|
|
||||||
newModel1.setId(UUIDGener.getUUID());
|
|
||||||
newModel1.setFileId(newModel.getId());
|
|
||||||
newModel1.setShapeId(mapNewUUID.get(oldModel.getShapeId()));
|
|
||||||
newModel1.setShapeText(oldModel.getShapeText());
|
|
||||||
newModel1.setAttrId(oldModel.getAttrId());
|
|
||||||
newModel1.setRelationFileId(newUUID);
|
|
||||||
newModel1.setRelationShapeId(oldModel.getRelationShapeId());
|
|
||||||
newModel1.setRelationShapeText(oldModel.getRelationShapeText());
|
|
||||||
dao.insert(newModel1);
|
|
||||||
|
|
||||||
|
|
||||||
CoeProcessLevelUtil.copyRepositoryProperty(PALRepositoryCache.getCache().get(oldModel.getRelationFileId()), PALRepositoryCache.getCache().get(newUUID), mapNewUUID1, _uc);
|
|
||||||
ro = ResponseObject.newOkResponse("创建成功");
|
|
||||||
ro.put("uuid", lastplModel.getId());
|
|
||||||
}else{
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
ro = ResponseObject.newWarnResponse("创建失败");
|
||||||
ro = ResponseObject.newWarnResponse("创建失败," + e.getMessage());
|
}else{
|
||||||
|
ro = ResponseObject.newWarnResponse("创建失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
ro = ResponseObject.newWarnResponse("创建失败");
|
||||||
}
|
}
|
||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
|
||||||
}else{
|
|
||||||
ro = ResponseObject.newWarnResponse("创建失败");
|
|
||||||
}
|
|
||||||
return ro.toString();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -147,14 +147,14 @@ public class SynchronousOrgJob implements IJob {
|
|||||||
|
|
||||||
RowMap orgrowMap=DBSql.getMap("SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT1=?",org.getString("ID"));
|
RowMap orgrowMap=DBSql.getMap("SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT1=?",org.getString("ID"));
|
||||||
if(orgrowMap==null){
|
if(orgrowMap==null){
|
||||||
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
PALRepositoryModelImpl model1 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
||||||
"", 1, parentModelId, "org", true, 1,
|
"", 1, parentModelId, "org", true, 1,
|
||||||
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
||||||
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
||||||
null, null, null, null, null, null, null, 1);
|
null, null, null, null, null, null, null, 1);
|
||||||
coeProcessLevel.insert(model1);
|
coeProcessLevel.insert(model1);
|
||||||
createPostData(model1.getId(), org.getString("ID"), model1, conn);
|
createPostData(model1.getId(), org.getString("ID"), model1, conn);
|
||||||
return modelId = model1.getId();
|
return modelId = model1.getId();
|
||||||
}else{
|
}else{
|
||||||
String plname=orgrowMap.getString("PLNAME");
|
String plname=orgrowMap.getString("PLNAME");
|
||||||
if(!plname.equals(org.getString("DEPARTMENTNAME"))){
|
if(!plname.equals(org.getString("DEPARTMENTNAME"))){
|
||||||
@ -172,15 +172,15 @@ public class SynchronousOrgJob implements IJob {
|
|||||||
if (StringUtil.isNotEmpty(parentPalOrgId)) {
|
if (StringUtil.isNotEmpty(parentPalOrgId)) {
|
||||||
RowMap orgrowMap=DBSql.getMap("SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT1=?",org.getString("ID"));
|
RowMap orgrowMap=DBSql.getMap("SELECT PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE EXT1=?",org.getString("ID"));
|
||||||
if(orgrowMap==null) {
|
if(orgrowMap==null) {
|
||||||
PALRepositoryModelImpl model2 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
PALRepositoryModelImpl model2 = CoeProcessLevelUtil.createPALRepositoryModel(id1, plRid1, wsId, org.getString("DEPARTMENTNAME"),
|
||||||
"", 1, getParentPalOrgId(org, conn), "org", true, 1,
|
"", 1, getParentPalOrgId(org, conn), "org", true, 1,
|
||||||
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
id1, false, "org.normal", "0", Integer.valueOf(org.getString("ORDERINDEX")), null,
|
||||||
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
null, "admin", "admin", nowTime, org.getString("ID"), null,
|
||||||
null, null, null, null, null, null, null, 1);
|
null, null, null, null, null, null, null, 1);
|
||||||
coeProcessLevel.insert(model2);
|
coeProcessLevel.insert(model2);
|
||||||
|
|
||||||
createPostData(model2.getId(), org.getString("ID"), model2, conn);
|
createPostData(model2.getId(), org.getString("ID"), model2, conn);
|
||||||
return modelId = model2.getId();
|
return modelId = model2.getId();
|
||||||
}else{
|
}else{
|
||||||
String plname=orgrowMap.getString("PLNAME");
|
String plname=orgrowMap.getString("PLNAME");
|
||||||
if(!plname.equals(org.getString("DEPARTMENTNAME"))){
|
if(!plname.equals(org.getString("DEPARTMENTNAME"))){
|
||||||
|
|||||||
@ -488,20 +488,6 @@ public class UpfileWeb extends ActionWeb {
|
|||||||
return ResponseObject.newErrResponse((e.getMessage() == null) ? e.getCause().getMessage() : e.getMessage()).toString();
|
return ResponseObject.newErrResponse((e.getMessage() == null) ? e.getCause().getMessage() : e.getMessage()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*DCUtil.getInstance();
|
|
||||||
dcContext = DCUtil.createTempFileContext("com.actionsoft.apps.coe.pal", "output", uuid, "zip");
|
|
||||||
dcContext.setFileName("xxx.zip");
|
|
||||||
File ff = new File(dcContext.getFilePath());*/
|
|
||||||
//UtilFile.zipCompressExcludeName(file.getPath(), ff, "log,**/config.txt");
|
|
||||||
/*dcContext.setSession(_uc);*/
|
|
||||||
|
|
||||||
/*String downUrl=SDK.getConfAPI().getPortalUrl() + "/r/" + dcContext.getDownloadURL().replace("./", "");
|
|
||||||
ro.put("url",downUrl);
|
|
||||||
return ro.toString();*/
|
|
||||||
|
|
||||||
//return ResponseObject.newErrResponse("下载失败").toString();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -691,21 +691,18 @@ public class CoeProcessLevelUtil {
|
|||||||
propertyModel.setId(UUIDGener.getUUID());
|
propertyModel.setId(UUIDGener.getUUID());
|
||||||
newPropertyList.add(propertyModel);
|
newPropertyList.add(propertyModel);
|
||||||
|
|
||||||
//文件属性存在流程绩效,则同步创建关联关系
|
|
||||||
if(propertyModel.getPropertyId().equals("Process_performance_metrics")){
|
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(newUuid);
|
|
||||||
/*CoeProcessLevelWeb.createCorrelationDialogModel(newUuid,"control.kpi",model.getWsId(),"");*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
repositoryPropertyDao.batchInsert(newPropertyList);
|
repositoryPropertyDao.batchInsert(newPropertyList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关联属性复制
|
* 关联属性复制
|
||||||
* @param olduuid
|
* @param olduuid
|
||||||
@ -724,7 +721,6 @@ public class CoeProcessLevelUtil {
|
|||||||
}
|
}
|
||||||
//by bzp end
|
//by bzp end
|
||||||
if (mapNewUUID.containsKey(oldModel.getShapeId())) {
|
if (mapNewUUID.containsKey(oldModel.getShapeId())) {
|
||||||
|
|
||||||
DesignerShapeRelationModel newModel = new DesignerShapeRelationModel();
|
DesignerShapeRelationModel newModel = new DesignerShapeRelationModel();
|
||||||
newModel.setId(UUIDGener.getUUID());
|
newModel.setId(UUIDGener.getUUID());
|
||||||
newModel.setFileId(uuId);
|
newModel.setFileId(uuId);
|
||||||
@ -2375,8 +2371,8 @@ public class CoeProcessLevelUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static String getLastPublishTaskIdByModelId(String repositoryId) {
|
public static String getLastPublishTaskIdByModelId(String repositoryId) {
|
||||||
String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
//String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
||||||
//String sql="SELECT TASKID FROM BO_ACT_COE_PUBLISH_N where PUBLISHFILEID=?";
|
String sql="SELECT TASKID FROM BO_ACT_COE_PUBLISH_N where PUBLISHFILEID=?";
|
||||||
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
||||||
@Override
|
@Override
|
||||||
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
|||||||
@ -144,7 +144,6 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取未关闭的工作空间
|
* 获取未关闭的工作空间
|
||||||
*
|
*
|
||||||
@ -5308,6 +5307,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
|||||||
// 更新流程文件中节点id等信息
|
// 更新流程文件中节点id等信息
|
||||||
updateDefineShape(newModel, mapNewUUID, "");
|
updateDefineShape(newModel, mapNewUUID, "");
|
||||||
CoeProcessLevelUtil.copyRepositoryProperty(oldModel, newModel, mapNewUUID, _uc);
|
CoeProcessLevelUtil.copyRepositoryProperty(oldModel, newModel, mapNewUUID, _uc);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -5317,6 +5317,19 @@ public class CoeProcessLevelWeb extends ActionWeb {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*public String updateRoleincidenceRelation(PALRepositoryModelImpl newModel){
|
||||||
|
String newModelId = newModel.getId();
|
||||||
|
DesignerShapeRelationDao dao = new DesignerShapeRelationDao();
|
||||||
|
List<DesignerShapeRelationModel> oldModelList = dao.getModelListByFileId(newModelId);
|
||||||
|
for (DesignerShapeRelationModel oldModel : oldModelList) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void updateDefineShape(PALRepositoryModelImpl newModel, Map<String, String> mapNewUUID, String define) {
|
private void updateDefineShape(PALRepositoryModelImpl newModel, Map<String, String> mapNewUUID, String define) {
|
||||||
String messageJson = null;
|
String messageJson = null;
|
||||||
PALRepositoryModel levelModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(newModel.getId());
|
PALRepositoryModel levelModel = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(newModel.getId());
|
||||||
@ -10236,7 +10249,8 @@ public String deleteReply(String replyid, String messageid) {
|
|||||||
SDK.getLogAPI().consoleErr("复制文件[" + model.getName() + "][" + model.getId() + "]失败," + moveRo.getString("msg"));
|
SDK.getLogAPI().consoleErr("复制文件[" + model.getName() + "][" + model.getId() + "]失败," + moveRo.getString("msg"));
|
||||||
return ResponseObject.newErrResponse(moveRo.getString("msg")).toString();
|
return ResponseObject.newErrResponse(moveRo.getString("msg")).toString();
|
||||||
}
|
}
|
||||||
//copyPalProcessLevelCorrelationModelRepository(wsId,teamId,sourceIds);
|
copyPalProcessLevelRoleCorrelationModelRepository(wsId,teamId,sourceIds);
|
||||||
|
copyPalProcessLevelPerformanceCorrelationModelRepository(wsId,teamId,sourceIds);
|
||||||
}
|
}
|
||||||
// 操作行为日志记录
|
// 操作行为日志记录
|
||||||
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
|
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
|
||||||
@ -10248,16 +10262,18 @@ public String deleteReply(String replyid, String messageid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步复制角色、绩效模型图信息
|
* 同步复制数据模型角色模型
|
||||||
* @param wsId
|
* @param wsId
|
||||||
* @param teamId
|
* @param teamId
|
||||||
* @param sourceIds
|
* @param sourceIds
|
||||||
* @param targetId
|
* @param targetId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String copyPalProcessLevelCorrelationModelRepository(String wsId, String teamId, String sourceIds) {
|
public String copyPalProcessLevelRoleCorrelationModelRepository(String wsId, String teamId, String sourceIds) {
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
//获取数据属性同步创建角色模型
|
||||||
JSONArray sourceIdArr = JSONArray.parseArray(sourceIds);
|
JSONArray sourceIdArr = JSONArray.parseArray(sourceIds);
|
||||||
for (int i = 0; i < sourceIdArr.size(); i++) {
|
for (int i = 0; i < sourceIdArr.size(); i++) {
|
||||||
String sourceId = sourceIdArr.getString(i);
|
String sourceId = sourceIdArr.getString(i);
|
||||||
@ -10268,10 +10284,8 @@ public String deleteReply(String replyid, String messageid) {
|
|||||||
//如果关联角色图,则同步复制角色图关联关系
|
//如果关联角色图,则同步复制角色图关联关系
|
||||||
String methodIds = "";
|
String methodIds = "";
|
||||||
if (oldModel.getAttrId().equals("role")) {
|
if (oldModel.getAttrId().equals("role")) {
|
||||||
|
|
||||||
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
PALRepository coeProcessLevel = CoeProcessLevelDaoFacotory.createCoeProcessLevel();
|
||||||
String targetId = checkAndCreatePalRoleFolderModel(coeProcessLevel,wsId);
|
String targetId = checkAndCreatePalRoleFolderModel(coeProcessLevel,wsId);
|
||||||
|
|
||||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(oldModel.getRelationFileId());
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(oldModel.getRelationFileId());
|
||||||
String result = copyFile(wsId, teamId, oldModel.getRelationFileId(), targetId, "all");
|
String result = copyFile(wsId, teamId, oldModel.getRelationFileId(), targetId, "all");
|
||||||
|
|
||||||
@ -10282,12 +10296,60 @@ public String deleteReply(String replyid, String messageid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步复制文件属性绩效属性数据
|
||||||
|
* @param wsId
|
||||||
|
* @param teamId
|
||||||
|
* @param sourceIds
|
||||||
|
* @param targetId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String copyPalProcessLevelPerformanceCorrelationModelRepository(String wsId, String teamId, String sourceIds) {
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
JSONArray sourceIdArr = JSONArray.parseArray(sourceIds);
|
||||||
|
for (int i = 0; i < sourceIdArr.size(); i++) {
|
||||||
|
String sourceId = sourceIdArr.getString(i);
|
||||||
|
PALRepositoryPropertyDao repositoryPropertyDao = new PALRepositoryPropertyDao();
|
||||||
|
List<PALRepositoryPropertyModel> oldPropertyList = repositoryPropertyDao.getPropertysByPlid(sourceId, "");
|
||||||
|
List<PALRepositoryPropertyModel> newPropertyList = new ArrayList<PALRepositoryPropertyModel>();
|
||||||
|
if (oldPropertyList != null && oldPropertyList.size() > 0) {
|
||||||
|
for (PALRepositoryPropertyModel propertyModel : oldPropertyList) {
|
||||||
|
|
||||||
|
//文件属性存在流程绩效,则同步创建关联关系
|
||||||
|
if(propertyModel.getPropertyId().equals("Process_performance_metrics")){
|
||||||
|
String relationFileId=JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||||
|
String[] splitRelationFileId;
|
||||||
|
if(relationFileId!=null){
|
||||||
|
splitRelationFileId=relationFileId.split(",");
|
||||||
|
|
||||||
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(splitRelationFileId[0]);
|
||||||
|
|
||||||
|
String result = copyFile(wsId, teamId, splitRelationFileId[0], "control", "all");
|
||||||
|
|
||||||
|
JSONObject moveRo = JSONObject.parseObject(result);
|
||||||
|
if (!"ok".equals(moveRo.getString("result"))) {
|
||||||
|
SDK.getLogAPI().consoleErr("复制文件[" + model.getName() + "][" + model.getId() + "]失败," + moveRo.getString("msg"));
|
||||||
|
return ResponseObject.newErrResponse(moveRo.getString("msg")).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -286,6 +286,7 @@
|
|||||||
<!-- 不支持HTML5的浏览器 -->
|
<!-- 不支持HTML5的浏览器 -->
|
||||||
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal/css/pal.pl.repository.designer.view.css">
|
<link rel="stylesheet" href="../apps/com.actionsoft.apps.coe.pal/css/pal.pl.repository.designer.view.css">
|
||||||
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal/js/pal.pl.repository.designer.view.js"></script>
|
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal/js/pal.pl.repository.designer.view.js"></script>
|
||||||
|
|
||||||
<#processlink_ete_js>
|
<#processlink_ete_js>
|
||||||
<#batch-js>
|
<#batch-js>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -3022,8 +3023,8 @@
|
|||||||
<input type="hidden" name="defaultMoreAttrSort" id="defaultMoreAttrSort" value="<#defaultAttrSort>" />
|
<input type="hidden" name="defaultMoreAttrSort" id="defaultMoreAttrSort" value="<#defaultAttrSort>" />
|
||||||
<input type="hidden" name="moreAttrRight" id="moreAttrRight" value="<#moreAttrRight>" />
|
<input type="hidden" name="moreAttrRight" id="moreAttrRight" value="<#moreAttrRight>" />
|
||||||
<input type="hidden" name="appId" id="appId" value="<#appId>">
|
<input type="hidden" name="appId" id="appId" value="<#appId>">
|
||||||
</form>
|
|
||||||
|
|
||||||
|
</form>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -146,4 +146,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ var setting1 = {};// 普通关联,例如raci
|
|||||||
var setting2 = {};// 流程关联,例如前后置流程
|
var setting2 = {};// 流程关联,例如前后置流程
|
||||||
var setting3 = {};// 关联形状和属性
|
var setting3 = {};// 关联形状和属性
|
||||||
|
|
||||||
|
|
||||||
var checkTree;
|
var checkTree;
|
||||||
|
|
||||||
function initSetting() {
|
function initSetting() {
|
||||||
@ -271,7 +272,6 @@ function toggleRoot() {
|
|||||||
|
|
||||||
// 关联模型文件点击树进行选择
|
// 关联模型文件点击树进行选择
|
||||||
function clickRelationFileNode(treeNode) {
|
function clickRelationFileNode(treeNode) {
|
||||||
debugger;
|
|
||||||
if (!relationMultiple && treeNode.id.length == 36) {// 单选下点击即选择
|
if (!relationMultiple && treeNode.id.length == 36) {// 单选下点击即选择
|
||||||
if (method.indexOf('.') > -1) {
|
if (method.indexOf('.') > -1) {
|
||||||
if (treeNode.plMethodId != method && treeNode.pid) {
|
if (treeNode.plMethodId != method && treeNode.pid) {
|
||||||
@ -334,6 +334,14 @@ function clickNode(treeNode) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getClickNodeId() {
|
||||||
|
return clickNodeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 增加形状选项
|
// 增加形状选项
|
||||||
function addShapeCheck(josnArr, fileId) {
|
function addShapeCheck(josnArr, fileId) {
|
||||||
var str = '';
|
var str = '';
|
||||||
|
|||||||
@ -985,6 +985,9 @@ function openRelationDialog(obj, callback) {
|
|||||||
}else if(method=="control.kpi"){
|
}else if(method=="control.kpi"){
|
||||||
methodName="新建绩效模型";
|
methodName="新建绩效模型";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var getteamId=$('#teamId').val()==undefined?"":$('#teamId').val();
|
||||||
|
|
||||||
if(method=="control.kpi") {
|
if(method=="control.kpi") {
|
||||||
//根据角色
|
//根据角色
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -1131,7 +1134,7 @@ function openRelationDialog(obj, callback) {
|
|||||||
dlgButton.eq(i).hide();
|
dlgButton.eq(i).hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
window.open("./w?uuid=" + msg.data.uuid + "&teamId"
|
window.open("./w?uuid=" + msg.data.uuid + "&teamId="+getteamId
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1239,7 +1242,7 @@ function openRelationDialog(obj, callback) {
|
|||||||
},
|
},
|
||||||
success: function (msg) {
|
success: function (msg) {
|
||||||
if (msg.result == "ok") {
|
if (msg.result == "ok") {
|
||||||
window.open("./w?uuid=" + msg.data.uuid + "&teamId"
|
window.open("./w?uuid=" + msg.data.uuid + "&teamId="+getteamId
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1381,6 +1381,7 @@ function attributeShowTabContent(currentShape) {
|
|||||||
var tableObj = {}
|
var tableObj = {}
|
||||||
var curTableId = ''
|
var curTableId = ''
|
||||||
function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
||||||
|
debugger;
|
||||||
// 属性排序
|
// 属性排序
|
||||||
var defaultMoreAttr = $('#defaultMoreAttrSort').val();
|
var defaultMoreAttr = $('#defaultMoreAttrSort').val();
|
||||||
if (shape.category != undefined) {
|
if (shape.category != undefined) {
|
||||||
@ -3445,6 +3446,7 @@ function getRelevanceAwsOrgNameByShapeId(objIds, shapeId) {
|
|||||||
|
|
||||||
// 形状关联弹窗
|
// 形状关联弹窗
|
||||||
function openRelationDig(obj,value) {
|
function openRelationDig(obj,value) {
|
||||||
|
debugger;
|
||||||
var shapeRelationValue = $("input[objid_shapeId='" + $(obj).attr("objid") + "']").val();
|
var shapeRelationValue = $("input[objid_shapeId='" + $(obj).attr("objid") + "']").val();
|
||||||
var ref = $("input[objid_shapeId='" + $(obj).attr("objid") + "']").attr("ref"); // shape file shapeAndFile
|
var ref = $("input[objid_shapeId='" + $(obj).attr("objid") + "']").attr("ref"); // shape file shapeAndFile
|
||||||
var relationShapeIds = '';
|
var relationShapeIds = '';
|
||||||
@ -3465,6 +3467,9 @@ function openRelationDig(obj,value) {
|
|||||||
var conObj = $("#attr_dialog_normal_relevance_shapes_div").empty();
|
var conObj = $("#attr_dialog_normal_relevance_shapes_div").empty();
|
||||||
var str = '<iframe width="100%" id="attr_content_iframe_relevance_shapes" name="attr_content_iframe_relevance_shapes" frameBorder="0" style="width: 100%; height: 318px;"></iframe>';
|
var str = '<iframe width="100%" id="attr_content_iframe_relevance_shapes" name="attr_content_iframe_relevance_shapes" frameBorder="0" style="width: 100%; height: 318px;"></iframe>';
|
||||||
conObj.append(str);
|
conObj.append(str);
|
||||||
|
|
||||||
|
var getteamId=$('#teamId').val()==undefined?"":$('#teamId').val();
|
||||||
|
|
||||||
$("#attr_dialog_normal_relevance_shapes_div").attr("title", title);
|
$("#attr_dialog_normal_relevance_shapes_div").attr("title", title);
|
||||||
$('#attr_content_iframe_relevance_shapes').attr(
|
$('#attr_content_iframe_relevance_shapes').attr(
|
||||||
'src', "./w?sid=" + id
|
'src', "./w?sid=" + id
|
||||||
@ -3491,6 +3496,22 @@ function openRelationDig(obj,value) {
|
|||||||
if (msg.data.result == "ok" ) {
|
if (msg.data.result == "ok" ) {
|
||||||
$("#attr_dialog_normal_relevance_shapes_div").dialog({
|
$("#attr_dialog_normal_relevance_shapes_div").dialog({
|
||||||
buttons : [
|
buttons : [
|
||||||
|
{
|
||||||
|
text : '跳转模型',
|
||||||
|
cls : "blue",
|
||||||
|
handler : function() {
|
||||||
|
var clickNodeId=document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.getClickNodeId();
|
||||||
|
if(clickNodeId==''){
|
||||||
|
$.simpleAlert("请选择需要打开的流程!", 'warning');
|
||||||
|
}else{
|
||||||
|
var url="./w?uuid=" +clickNodeId+"&teamId="+getteamId
|
||||||
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val());
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text : '确定',
|
text : '确定',
|
||||||
cls : "blue",
|
cls : "blue",
|
||||||
@ -3530,6 +3551,21 @@ function openRelationDig(obj,value) {
|
|||||||
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
|
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
|
||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
|
text : '跳转模型',
|
||||||
|
cls : "blue",
|
||||||
|
handler : function() {
|
||||||
|
var clickNodeId=document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.getClickNodeId();
|
||||||
|
if(clickNodeId==''){
|
||||||
|
$.simpleAlert("请选择需要打开的流程", 'warning');
|
||||||
|
}else{
|
||||||
|
var url="./w?uuid=" +clickNodeId+"&teamId="+getteamId
|
||||||
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val());
|
||||||
|
window.open(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
text : "新建角色模型",
|
text : "新建角色模型",
|
||||||
cls : "green",
|
cls : "green",
|
||||||
handler : function() {
|
handler : function() {
|
||||||
@ -3545,7 +3581,6 @@ function openRelationDig(obj,value) {
|
|||||||
},
|
},
|
||||||
async: false,
|
async: false,
|
||||||
success : function(msg) {
|
success : function(msg) {
|
||||||
debugger;
|
|
||||||
if (msg.data.result == "ok") {
|
if (msg.data.result == "ok") {
|
||||||
window.top.$.simpleAlert("请勿重复新建角色模型!!!");
|
window.top.$.simpleAlert("请勿重复新建角色模型!!!");
|
||||||
}else{
|
}else{
|
||||||
@ -3566,7 +3601,7 @@ function openRelationDig(obj,value) {
|
|||||||
if (msg.result == "ok") {
|
if (msg.result == "ok") {
|
||||||
//关闭新建按钮
|
//关闭新建按钮
|
||||||
$(".dlg-button button").eq(2).hide();
|
$(".dlg-button button").eq(2).hide();
|
||||||
window.open("./w?uuid=" + msg.data.uuid+"&teamId="+$('#teamId').val()
|
window.open("./w?uuid=" + msg.data.uuid+"&teamId="+getteamId
|
||||||
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid=" + encodeURIComponent($('#sid').val()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3610,6 +3645,14 @@ function openRelationDig(obj,value) {
|
|||||||
}else{
|
}else{
|
||||||
$("#attr_dialog_normal_relevance_shapes_div").dialog({
|
$("#attr_dialog_normal_relevance_shapes_div").dialog({
|
||||||
buttons : [
|
buttons : [
|
||||||
|
{
|
||||||
|
text : '跳转模型',
|
||||||
|
cls : "blue",
|
||||||
|
handler : function() {
|
||||||
|
// 刷新页面
|
||||||
|
document.getElementById("attr_content_iframe_relevance_shapes").contentWindow.location.reload(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
text : '确定',
|
text : '确定',
|
||||||
cls : "blue",
|
cls : "blue",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user