筛选代码提交
This commit is contained in:
parent
6992ddffe2
commit
74c6ecfb83
@ -1808,7 +1808,7 @@ public class PALRepositoryQueryAPIManager {
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
for (PALRepositoryModel model : list) {
|
||||
|
||||
if(attrId.equals("Process_performance_metrics") || attrId.equals("role")){
|
||||
if(attrId.equals("role")){
|
||||
List data=new ArrayList();
|
||||
data.add(0,model.getMethodId());
|
||||
data.add(1,uuid);
|
||||
@ -1905,10 +1905,104 @@ public class PALRepositoryQueryAPIManager {
|
||||
}
|
||||
}else if(attrId.equals("R_relevant_flies")){
|
||||
|
||||
if(!model.isPublish()){
|
||||
continue;
|
||||
}
|
||||
if(!model.isPublish()){
|
||||
continue;
|
||||
}
|
||||
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("id", model.getId().trim());
|
||||
object.put("pid", model.getNewParentId().trim());
|
||||
if (removeIds != null && removeIds.contains(model.getId().trim())) {
|
||||
object.put("nocheck", true);
|
||||
} else {
|
||||
object.put("nocheck", false);
|
||||
}
|
||||
object.put("plNo", CoeProcessLevelUtil.getProcessLevelNoByUUId(model.getId(), model.getWsId()).trim());
|
||||
object.put("name", I18nRes.findValue(CoEConstant.APP_ID, context.getLanguage(), model.getName()).trim());
|
||||
object.put("wsId", model.getWsId());
|
||||
PALMethodModel methodModel = PALMethodCache.getPALMethodModelById(model.getMethodId());
|
||||
if (methodModel == null || methodModel.isFolder()) {// 没有该建模方法或者是文件夹类
|
||||
object.put("title", object.get("name"));
|
||||
} else {
|
||||
object.put("title", object.get("name") + " " + VersionUtil.getVersionStrV(model.getVersion()).trim());
|
||||
}
|
||||
//三员管理文件密级校验
|
||||
if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()){
|
||||
ResponseObject responseObject = new CoeProcessLevelWeb(DispatcherRequest.getUserContext()).checkFilePemission(model.getId());
|
||||
if (responseObject.isErr() && (methodModel != null && !methodModel.isFolder())){
|
||||
object.put("nocheck", true);
|
||||
}
|
||||
}
|
||||
object.put("drop", false);
|
||||
object.put("isSystemFile", model.isSystemFile());
|
||||
object.put("plMethodId", model.getMethodId().trim());
|
||||
if (methodModel == null || methodModel.isFolder()) {// 没有该建模方法或者是文件夹类
|
||||
object.put("iconFont", "");
|
||||
} else {
|
||||
object.put("iconFont", "");
|
||||
}
|
||||
List<PALRepositoryModel> children = null;
|
||||
if (isUsed) {
|
||||
children = getUsedPalRepositoryModelsByPid(model.getWsId(), model.getId());
|
||||
if (param != null && "designer".equals(param) && children != null && children.size() > 0) {// 过滤掉发布版本
|
||||
List<PALRepositoryModel> tempChildren = new ArrayList<>();
|
||||
for (PALRepositoryModel model2 : children) {
|
||||
if (!model2.isPublish()) {
|
||||
tempChildren.add(model2);
|
||||
}
|
||||
}
|
||||
children = tempChildren;
|
||||
}
|
||||
} else if (isPublished) {
|
||||
children = getPublishedPalRepositoryModelsByPid(model.getWsId(), model.getId());
|
||||
}
|
||||
if (children == null || children.size() == 0) {
|
||||
object.put("isParent", false);
|
||||
//String icon = object.getString("icon");
|
||||
object.put("leaf", true);// 叶子节点
|
||||
// object.put("icon", icon.replace("16.png", "16.leaf.png"));
|
||||
} else {
|
||||
object.put("isParent", true);
|
||||
object.put("open", false);
|
||||
}
|
||||
|
||||
object.put("plLevel", model.getLevel());
|
||||
object.put("plOrdexIndex", model.getOrderIndex());
|
||||
object.put("plDiagramUrl", model.getDiagramUrl());
|
||||
object.put("isDrops", model.isSystemFile());
|
||||
object.put("isPublish", model.isPublish());
|
||||
object.put("isStop", model.isStop());
|
||||
object.put("isApproval", model.isApproval());
|
||||
object.put("ext1", model.getExt1());
|
||||
object.put("ext2", model.getExt2());
|
||||
object.put("ext3", model.getExt3());
|
||||
object.put("ext4", model.getExt4());
|
||||
object.put("isUse", model.isUse());
|
||||
object.put("url", "./w?sid=" + context.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_portal_page&ruuid=" + model.getId() + "&type=1&wsid=" + model.getWsId());
|
||||
object.put("plCategory", model.getMethodCategory());
|
||||
object.put("versionId", model.getVersionId());
|
||||
object.put("orderIndex", model.getOrderIndex());
|
||||
object.put("isBottomLevel", model.isBottomLevel());
|
||||
String dutyDeptId = model.getDutyDept();
|
||||
object.put("dutyDeptId", dutyDeptId == null ? "" : dutyDeptId);
|
||||
String plDutyDeptName = dutyDeptId;
|
||||
if (!UtilString.isEmpty(dutyDeptId)) {
|
||||
if (SDK.getORGAPI().getDepartmentById(dutyDeptId) != null) {
|
||||
plDutyDeptName = SDK.getORGAPI().getDepartmentById(dutyDeptId).getName();
|
||||
}
|
||||
}
|
||||
object.put("dutyDeptName", UtilString.isEmpty(dutyDeptId) ? "" : plDutyDeptName);
|
||||
String plDutyPerson = model.getDutyUser();
|
||||
object.put("dutyPersonId", model.getDutyUser() == null ? "" : model.getDutyUser());
|
||||
object.put("dutyPersionName", UtilString.isEmpty(plDutyPerson) ? "" : SDK.getORGAPI().getUserAliasNames(plDutyPerson));
|
||||
jsonArray.add(object);
|
||||
}else if(attrId.equals("Process_performance_metrics")){
|
||||
List data=new ArrayList();
|
||||
data.add(0,model.getMethodId());
|
||||
data.add(1,uuid);
|
||||
|
||||
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?",model.getId(),data.toString());
|
||||
if (rowMap != null || model.getName().equals("L1-L3流程绩效") || model.getName().equals("末级流程绩效")) {
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("id", model.getId().trim());
|
||||
object.put("pid", model.getNewParentId().trim());
|
||||
@ -1996,6 +2090,7 @@ public class PALRepositoryQueryAPIManager {
|
||||
object.put("dutyPersonId", model.getDutyUser() == null ? "" : model.getDutyUser());
|
||||
object.put("dutyPersionName", UtilString.isEmpty(plDutyPerson) ? "" : SDK.getORGAPI().getUserAliasNames(plDutyPerson));
|
||||
jsonArray.add(object);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2004,6 +2099,7 @@ public class PALRepositoryQueryAPIManager {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************************************************************************/
|
||||
|
||||
/**
|
||||
|
||||
@ -767,8 +767,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
JSONArray jsonArr_new = new JSONArray();
|
||||
JSONArray objects = JSONArray.parseArray(treeJson);
|
||||
//角色图属性代码是role/绩效图属性代码为Process_performance_metrics进行判断
|
||||
if (attrId.equals("Process_performance_metrics")) {
|
||||
if (objects != null) {
|
||||
/*if (attrId.equals("Process_performance_metrics")) {
|
||||
*//*if (objects != null) {
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
JSONObject jsonObject = objects.getJSONObject(i);
|
||||
String url = jsonObject.getString("url");
|
||||
@ -786,9 +786,54 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
jsonArr_new.add(objects.getJSONObject(i));
|
||||
}
|
||||
}
|
||||
}*//*
|
||||
if (objects != null) {
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
JSONObject jsonObject = objects.getJSONObject(i);
|
||||
String id = jsonObject.getString("id");
|
||||
String isParent = jsonObject.getString("isParent");
|
||||
|
||||
if (isParent != null) {
|
||||
if (isParent.equals("true")) {
|
||||
String title=jsonObject.getString("title");
|
||||
if(title.equals("末级流程绩效") || title.equals("L1-L3流程绩效") ){
|
||||
jsonArr_new.add(objects.getJSONObject(i));
|
||||
}else{
|
||||
List<PALRepositoryModel> coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(id, wsId);
|
||||
if (coeProcessLevelModels.size() > 0) {
|
||||
for (int k = 0; k < coeProcessLevelModels.size(); k++) {
|
||||
PALRepositoryModel coeProcessLevelModel = coeProcessLevelModels.get(k);
|
||||
if (coeProcessLevelModel != null) {
|
||||
List data = new ArrayList();
|
||||
data.add(0, jsonObject.getString("plMethodId"));
|
||||
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) {
|
||||
JSONObject json = getJSon(coeProcessLevelModel);
|
||||
jsonArr_new.add(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
List data = new ArrayList();
|
||||
data.add(0, jsonObject.getString("plMethodId"));
|
||||
data.add(1, ruuid);
|
||||
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", id, data.toString());
|
||||
if (rowMap != null) {
|
||||
jsonArr_new.add(objects.getJSONObject(i));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
jsonArr_new.add(objects.getJSONObject(i));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
macroLibraries.put("treeData", jsonArr_new.toString());
|
||||
} else if (attrId.equals("role")) {
|
||||
} else*/ if (attrId.equals("role")) {
|
||||
if (objects != null) {
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
JSONObject jsonObject = objects.getJSONObject(i);
|
||||
@ -811,13 +856,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
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) {
|
||||
jsonArr_new.add(objects.getJSONObject(i));
|
||||
showflag = true;
|
||||
}*/
|
||||
JSONObject json = getJSon(coeProcessLevelModel);
|
||||
|
||||
jsonArr_new.add(json);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user