架构视图代码提交
This commit is contained in:
parent
6fac2f6cd1
commit
cbf1438d34
Binary file not shown.
@ -1178,7 +1178,6 @@ public class DataViewService extends ActionWeb {
|
||||
// TODO: handle exception
|
||||
}
|
||||
|
||||
System.err.println("查询部门视图===>" + fileListMap.size());
|
||||
fileRowMaps = fileHandleRowMaps;
|
||||
long endTime = System.currentTimeMillis();
|
||||
if (null != fileRowMaps && fileRowMaps.size() > 0) {
|
||||
@ -1240,7 +1239,7 @@ public class DataViewService extends ActionWeb {
|
||||
// reFileRowMap);
|
||||
}
|
||||
fileRowMaps = fileHandleRowMaps;
|
||||
// System.err.println("=======fileRowMaps========="+fileRowMaps);
|
||||
System.err.println("=======fileRowMaps========="+fileRowMaps);
|
||||
// 遍历选择的结果
|
||||
List<Map> fileMaps = new ArrayList<>();
|
||||
List<RowMap> frameRowMaps = new ArrayList<>();
|
||||
@ -1409,6 +1408,7 @@ public class DataViewService extends ActionWeb {
|
||||
} finally {
|
||||
// System.err.println("====执行完毕====>");
|
||||
}
|
||||
System.out.println("ro================="+ro.toString());
|
||||
return ro.toString();
|
||||
|
||||
}
|
||||
|
||||
@ -1,7 +1,12 @@
|
||||
package com.awspaas.user.apps.yili.reportform.service;
|
||||
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.cache.PALRepositoryCache;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.dao.PALRepositoryPropertyDao;
|
||||
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.cache.DesignerShapeRelationCache;
|
||||
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.system.util.StringUtil;
|
||||
import com.actionsoft.bpms.commons.database.RowMap;
|
||||
import com.actionsoft.bpms.commons.htmlframework.HtmlPageTemplate;
|
||||
import com.actionsoft.bpms.commons.login.constant.LoginConst;
|
||||
@ -11,9 +16,11 @@ import com.actionsoft.bpms.server.RequestParams;
|
||||
import com.actionsoft.bpms.server.SSOUtil;
|
||||
import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.bpms.util.UtilString;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.awspaas.user.apps.yili.reportform.util.TreeUtil;
|
||||
|
||||
import java.sql.Connection;
|
||||
@ -125,11 +132,11 @@ public class ToPageService extends ActionWeb {
|
||||
public String frameView (UserContext uc, RequestParams params) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
String fileType = params.get("fileType");
|
||||
System.out.println("======fileType======"+fileType);
|
||||
System.out.println("======frameIDtoFrameView======"+frameIDtoFrameView);
|
||||
if (null!=frameIDtoFrameView && !frameIDtoFrameView.equals("")) {
|
||||
System.out.println("======fileType======" + fileType);
|
||||
System.out.println("======frameIDtoFrameView======" + frameIDtoFrameView);
|
||||
if (null != frameIDtoFrameView && !frameIDtoFrameView.equals("")) {
|
||||
//SDK.getLogAPI().consoleInfo("当前架构ID1"+frameID);
|
||||
SDK.getLogAPI().consoleInfo("当前架构ID全局"+frameIDtoFrameView);
|
||||
SDK.getLogAPI().consoleInfo("当前架构ID全局" + frameIDtoFrameView);
|
||||
Object[] sqlParams = {frameIDtoFrameView};
|
||||
HashMap<String, Object> fileMap = new HashMap<>();
|
||||
ArrayList<Map> fileMaps = new ArrayList<>();
|
||||
@ -138,9 +145,9 @@ public class ToPageService extends ActionWeb {
|
||||
String sid = _uc.getSessionId();
|
||||
String path = "";
|
||||
PALRepositoryModel model = null;
|
||||
String taskId="";
|
||||
System.out.println("========frameRowMap========"+frameRowMap);
|
||||
if (null!=frameRowMap && !frameRowMap.isEmpty()) {
|
||||
String taskId = "";
|
||||
System.out.println("========frameRowMap========" + frameRowMap);
|
||||
if (null != frameRowMap && !frameRowMap.isEmpty()) {
|
||||
fileMap = new HashMap<String, Object>();
|
||||
nodeType = "frame";
|
||||
fileMap.put("ID", frameRowMap.getString("FRAMEID"));
|
||||
@ -151,53 +158,82 @@ public class ToPageService extends ActionWeb {
|
||||
fileMap.put("nodeType", nodeType);
|
||||
fileMaps.add(fileMap);
|
||||
//List<RowMap> fileRowMaps = DBSql.getMaps("SELECT FILEID,PUBDEPT,PLPARENTID,PLMETHODID,POLICYTYPE,FILESTATE,VIEWCOUNT FROM BO_EU_PAL_FILE1 WHERE PLMETHODID='process.epc' OR PLMETHODID='process.flowchart' OR PLMETHODID='control.policy' OR PLMETHODID='data.form'");
|
||||
List<RowMap> fileRowMaps = DBSql.getMaps("SELECT FILEID,PLPARENTID,PLNAME,PLMETHODID,SUPPORTFILE,PUBDEPT,PUBDATETIME,PLORDERINDEX,PLLEVEL,POLICYTYPE FROM BO_EU_PAL_FILE1 WHERE PLPARENTID=? AND FILESTATE='1' AND (PLMETHODID='process.epc' OR PLMETHODID='process.flowchart' OR PLMETHODID='control.policy') ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX) ASC", sqlParams);
|
||||
System.out.println("========fileRowMaps1========>"+fileRowMaps.size());
|
||||
|
||||
//List<RowMap> fileRowMaps = DBSql.getMaps("SELECT FILEID,PLPARENTID,PLNAME,PLMETHODID,SUPPORTFILE,PUBDEPT,PUBDATETIME,PLORDERINDEX,PLLEVEL,POLICYTYPE FROM BO_EU_PAL_FILE1 WHERE PLPARENTID=? AND FILESTATE='1' AND (PLMETHODID='process.epc' OR PLMETHODID='process.flowchart' OR PLMETHODID='control.policy') ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX) ASC", sqlParams);
|
||||
|
||||
//List<RowMap> fileRowMaps = DBSql.getMaps("SELECT ID AS FILEID,PLPARENTID,PLNAME,PLMETHODID,PLVERSIONID,PLORDERINDEX,PLLEVEL,EXT3 as POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLPARENTID=? AND ISPUBLISH = 1 AND ISSTOP =0 AND EXT5 = '1' AND (PLMETHODID='process.epc' OR PLMETHODID='control.policy' OR PLMETHODID='process.flowchart') ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX) ASC", sqlParams);
|
||||
|
||||
List<RowMap> fileRowMaps = DBSql.getMaps("SELECT ID AS FILEID,PLPARENTID,PLNAME,PLMETHODID,PLLEVEL,PLVERSIONID,PLORDERINDEX,EXT3 as POLICYTYPE FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLPARENTID=? AND ISPUBLISH = 1 AND ISSTOP =0 AND EXT5 = '1' AND (PLMETHODID='process.epc' OR PLMETHODID='control.policy' OR PLMETHODID='process.flowchart') ORDER BY TO_NUMBER(PLLEVEL) ASC, TO_NUMBER(PLORDERINDEX) ASC", sqlParams);
|
||||
|
||||
|
||||
|
||||
|
||||
System.out.println("fileRowMaps============" + fileRowMaps);
|
||||
ArrayList<RowMap> fileHandleRowMaps = new ArrayList<>();
|
||||
Map<String, Object> reFileMap = new HashMap<>();
|
||||
RowMap reFileRowMap = new RowMap(reFileMap);
|
||||
if (null!=fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
if (null != fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
fileHandleRowMaps = new ArrayList<>();
|
||||
for (RowMap fileRowMap : fileRowMaps) {
|
||||
String FILEID = fileRowMap.getString("FILEID");
|
||||
String SUPPORTFILE = fileRowMap.getString("SUPPORTFILE");
|
||||
String PUBDEPT = fileRowMap.getString("PUBDEPT");
|
||||
Integer PLLEVEL = fileRowMap.getInt("PLLEVEL");
|
||||
if (null!=SUPPORTFILE && !SUPPORTFILE.equals("")) {
|
||||
String[] reFileIDs = SUPPORTFILE.split(" ");
|
||||
for (String reFileID : reFileIDs) {
|
||||
PALRepositoryModel reFileModel = PALRepositoryCache.getCache().get(reFileID);
|
||||
PALRepositoryPropertyDao repositoryPropertyDao = new PALRepositoryPropertyDao();
|
||||
List<PALRepositoryPropertyModel> oldPropertyList = repositoryPropertyDao.getPropertysByPlid(FILEID, "");
|
||||
if (oldPropertyList != null && oldPropertyList.size() > 0) {
|
||||
for (PALRepositoryPropertyModel propertyModel : oldPropertyList) {
|
||||
|
||||
//查询支持文件
|
||||
if (propertyModel.getPropertyId().equals("support_files")) {
|
||||
String propertyValue = propertyModel.getPropertyValue();
|
||||
if (UtilString.isNotEmpty(propertyValue)) {
|
||||
System.out.println("酷酷酷酷酷酷酷酷1");
|
||||
String relationFileId = JSONObject.parseObject(propertyModel.getPropertyValue()).getString("relationFileId");
|
||||
if(UtilString.isNotEmpty(relationFileId)){
|
||||
PALRepositoryModel reFileModel = PALRepositoryCache.getCache().get(relationFileId);
|
||||
String PLMETHODID = reFileModel.getMethodId();
|
||||
if (PLMETHODID.equals("data.form")) {
|
||||
reFileMap = new HashMap<>();
|
||||
reFileMap.put("FILEID", reFileID);
|
||||
reFileMap.put("FILEID", relationFileId);
|
||||
reFileMap.put("PLNAME", reFileModel.getName());
|
||||
reFileMap.put("PLPARENTID", FILEID);
|
||||
reFileMap.put("PLMETHODID", PLMETHODID);
|
||||
reFileMap.put("PUBDEPT", PUBDEPT);
|
||||
reFileMap.put("PLLEVEL", (PLLEVEL+1));
|
||||
System.out.println("111111111");
|
||||
|
||||
PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao();
|
||||
List<PALRepositoryPropertyModel> propertys = dao.getPropertysByPlid(FILEID, null);
|
||||
for (PALRepositoryPropertyModel property : propertys) {
|
||||
String id = property.getPropertyId();
|
||||
if (id.equals("Issuing_department")) {
|
||||
reFileMap.put("PUBDEPT", property.getPropertyValue());
|
||||
}
|
||||
}
|
||||
reFileMap.put("PLLEVEL", (PLLEVEL + 1));
|
||||
reFileMap.put("PLORDERINDEX", reFileModel.getOrderIndex());
|
||||
reFileRowMap = new RowMap(reFileMap);
|
||||
fileHandleRowMaps.add(reFileRowMap);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fileRowMaps.addAll(fileHandleRowMaps);
|
||||
}
|
||||
System.out.println("========fileRowMaps2========>"+fileRowMaps.size());
|
||||
if (null!=fileType && !fileType.equals("")) {
|
||||
System.out.println("========fileRowMaps2========>" + fileRowMaps.size());
|
||||
if (null != fileType && !fileType.equals("")) {
|
||||
fileHandleRowMaps = new ArrayList<>();
|
||||
if (null!=fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
if (null != fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
for (RowMap fileRowMap : fileRowMaps) {
|
||||
if (fileType.equals("processFile")) {
|
||||
if (fileRowMap.getString("PLMETHODID").equals("process.epc") || fileRowMap.getString("PLMETHODID").equals("process.flowchart")) {
|
||||
fileHandleRowMaps.add(fileRowMap);
|
||||
}
|
||||
}
|
||||
System.out.println("========fileHandleRowMaps3========>"+fileHandleRowMaps.size());
|
||||
System.out.println("========fileHandleRowMaps3========>" + fileHandleRowMaps.size());
|
||||
if (fileType.equals("policyFile")) {
|
||||
if (fileRowMap.getString("PLMETHODID").equals("control.policy") && (fileRowMap.getString("POLICYTYPE").equals("regulation") || null==fileRowMap.getString("POLICYTYPE") || fileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
if (fileRowMap.getString("PLMETHODID").equals("control.policy") && (fileRowMap.getString("POLICYTYPE").equals("regulation") || null == fileRowMap.getString("POLICYTYPE") || fileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
fileHandleRowMaps.add(fileRowMap);
|
||||
}
|
||||
}
|
||||
@ -222,7 +258,7 @@ public class ToPageService extends ActionWeb {
|
||||
reFileMap.put("PLPARENTID", reFileModel.getParentId());
|
||||
reFileMap.put("PLMETHODID", PLMETHODID);
|
||||
reFileMap.put("PUBDEPT", PUBDEPT);
|
||||
reFileMap.put("PLLEVEL", (PLLEVEL-1));
|
||||
reFileMap.put("PLLEVEL", (PLLEVEL - 1));
|
||||
reFileMap.put("PLORDERINDEX", reFileModel.getOrderIndex());
|
||||
reFileRowMap = new RowMap(reFileMap);
|
||||
fileHandleRowMaps.add(reFileRowMap);
|
||||
@ -238,16 +274,16 @@ public class ToPageService extends ActionWeb {
|
||||
ArrayList::new));
|
||||
fileRowMaps = fileHandleRowMaps;
|
||||
}
|
||||
if(null!=fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
if (null != fileRowMaps && !fileRowMaps.isEmpty()) {
|
||||
for (RowMap fileRowMap : fileRowMaps) {
|
||||
fileMap = new HashMap<String, Object>();
|
||||
model = PALRepositoryCache.getCache().get(fileRowMap.getString("FILEID"));
|
||||
if (model != null) {
|
||||
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
|
||||
taskId=getLastPublishTaskIdByModelId(model.getId());
|
||||
taskId = getLastPublishTaskIdByModelId(model.getId());
|
||||
}
|
||||
}
|
||||
path = "./w"+"?"+"cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open"+"&"+"uuid="+fileRowMap.getString("FILEID")+"&"+"sid="+sid+"&"+"taskId="+taskId;
|
||||
path = "./w" + "?" + "cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open" + "&" + "uuid=" + fileRowMap.getString("FILEID") + "&" + "sid=" + sid + "&" + "taskId=" + taskId;
|
||||
nodeType = "file";
|
||||
fileMap.put("ID", fileRowMap.getString("FILEID"));
|
||||
fileMap.put("PARENTID", fileRowMap.getString("PLPARENTID"));
|
||||
@ -260,7 +296,7 @@ public class ToPageService extends ActionWeb {
|
||||
fileMap.put("nodeType", nodeType);
|
||||
if (fileRowMap.getString("PLMETHODID").equals("process.epc") || fileRowMap.getString("PLMETHODID").equals("process.flowchart")) {
|
||||
fileMap.put("fileType", "processFile");
|
||||
} else if (fileRowMap.getString("PLMETHODID").equals("control.policy") && (fileRowMap.getString("POLICYTYPE").equals("regulation") || null==fileRowMap.getString("POLICYTYPE") || fileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
} else if (fileRowMap.getString("PLMETHODID").equals("control.policy") && (fileRowMap.getString("POLICYTYPE").equals("regulation") || null == fileRowMap.getString("POLICYTYPE") || fileRowMap.getString("POLICYTYPE").equals(""))) {
|
||||
// && fileRowMap.getString("POLICYTYPE").equals("regulation")
|
||||
fileMap.put("fileType", "policyFile");
|
||||
} else if (fileRowMap.getString("PLMETHODID").equals("control.policy") && fileRowMap.getString("POLICYTYPE").equals("I/O_L4")) {
|
||||
@ -270,21 +306,21 @@ public class ToPageService extends ActionWeb {
|
||||
}
|
||||
fileMaps.add(fileMap);
|
||||
}
|
||||
List<Map> fileTreeNodes = TreeUtil.buildTree("1",fileMaps,null,"frame",null,null);
|
||||
ro.put("fileMaps",fileTreeNodes);
|
||||
System.err.println("============fileMaps============"+fileMaps);
|
||||
System.err.println("============fileTreeNodes=========="+fileTreeNodes);
|
||||
List<Map> fileTreeNodes = TreeUtil.buildTree("1", fileMaps, null, "frame", null, null);
|
||||
ro.put("fileMaps", fileTreeNodes);
|
||||
System.err.println("============fileMaps============" + fileMaps);
|
||||
System.err.println("============fileTreeNodes==========" + fileTreeNodes);
|
||||
return ro.toString();
|
||||
} else {
|
||||
ro.ok("暂无文件");
|
||||
fileMaps = new ArrayList<>();
|
||||
ro.put("fileMaps",fileMaps);
|
||||
ro.put("fileMaps", fileMaps);
|
||||
return ro.toString();
|
||||
}
|
||||
} else {
|
||||
ro.ok("无效架构");
|
||||
fileMaps = new ArrayList<>();
|
||||
ro.put("fileMaps",fileMaps);
|
||||
ro.put("fileMaps", fileMaps);
|
||||
return ro.toString();
|
||||
}
|
||||
} else {
|
||||
@ -293,4 +329,5 @@ public class ToPageService extends ActionWeb {
|
||||
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class GetNodesUtil {
|
||||
sqlParams = new Object[]{fileID};
|
||||
RowMap parentFile = DBSql.getMap("SELECT FRAMEID,FRAMENAME,FRAMELEVEL,FRAMEPARENTID,FRAMEORDERINDEX FROM BO_EU_PAL_FRAME WHERE FRAMEID=?", sqlParams);
|
||||
if (null!=parentFile && !parentFile.isEmpty()) {
|
||||
if (parentFile.getInt("FRAMELEVEL")<=3) {
|
||||
if (parentFile.getInt("FRAMELEVEL")<=4) {
|
||||
fileIDMaps.add(parentFile);
|
||||
if (parentFile.getInt("FRAMELEVEL")>1) {
|
||||
fileID = parentFile.getString("FRAMEPARENTID");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user