更新架构图取值

This commit is contained in:
zhal 2023-06-07 18:02:28 +08:00
parent 3a69ac79e6
commit 0963e601a4
4 changed files with 19 additions and 18 deletions

View File

@ -3,6 +3,7 @@ package com.awspaas.user.apps.yili.reportform.job;
import java.util.List;
import java.util.Map;
import com.sun.xml.internal.bind.v2.model.core.ID;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
@ -52,14 +53,15 @@ public class SynFileStateJob implements IJob {
} catch (Exception e) {
// TODO: handle exception
}
// String methodId = palRepositoryModel.getMethodId();
String plVersionId = palRepositoryModel.getVersionId();
String sqly = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLVERSIONID = '" + plVersionId + "'";
List<RowMap> maps = DBSql.getMaps(sqly);
if (maps.size() > 1) {
String sqlu = "SELECT ID FROM (SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLVERSIONID = '"
+ plVersionId + "' AND ISPUBLISH ='1' ORDER BY PLVER DESC ) WHERE ROWNUM<2";
String palId = DBSql.getString(sqlu);

View File

@ -1328,10 +1328,10 @@ public class DataViewService extends ActionWeb {
fileMap.put("PUBDATETIME", fileRowMap.getString("PUBDATETIME"));
fileMap.put("path", path);
fileMap.put("ORDERINDEX", fileRowMap.getString("PLORDERINDEX"));
String sqlsss = "SELECT PLLEVEL FROM APP_ACT_COE_PAL_REPOSITORY_1124 WHERE ID = '"
/*String sqlsss = "SELECT PLLEVEL FROM APP_ACT_COE_PAL_REPOSITORY_1124 WHERE ID = '"
+ fileRowMap.getString("FILEID") + "'";
String leve = DBSql.getString(sqlsss);
fileMap.put("TLEVEL", leve);
fileMap.put("TLEVEL", leve);*/
fileMap.put("nodeType", nodeType);
fileMaps.add(fileMap);
}

View File

@ -25,6 +25,7 @@ import com.awspaas.user.apps.yili.reportform.util.TreeUtil;
import java.sql.Connection;
import java.util.*;
import java.util.stream.Collectors;
import static com.awspaas.user.apps.yili.reportform.util.TaskUtil.getLastPublishTaskIdByModelId;
import static java.util.stream.Collectors.collectingAndThen;
@ -132,7 +133,6 @@ 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("")) {
//SDK.getLogAPI().consoleInfo("当前架构ID1"+frameID);
@ -141,34 +141,32 @@ public class ToPageService extends ActionWeb {
HashMap<String, Object> fileMap = new HashMap<>();
ArrayList<Map> fileMaps = new ArrayList<>();
String nodeType = null;
RowMap frameRowMap = DBSql.getMap("SELECT FRAMEID,FRAMEPARENTID,FRAMENAME,FRAMEORDERINDEX,FRAMELEVEL FROM BO_EU_PAL_FRAME WHERE FRAMEID=?", sqlParams);
//RowMap frameRowMap = DBSql.getMap("SELECT FRAMEID,FRAMEPARENTID,FRAMENAME,FRAMEORDERINDEX,FRAMELEVEL FROM BO_EU_PAL_FRAME WHERE FRAMEID=?", sqlParams);
RowMap frameRowMap = DBSql.getMap("SELECT ID,PLPARENTID,PLNAME,PLORDERINDEX,PLLEVEL FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND PLMETHODID='process.framework'", sqlParams);
String sid = _uc.getSessionId();
String path = "";
PALRepositoryModel model = null;
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"));
fileMap.put("PARENTID", frameRowMap.getString("FRAMEPARENTID"));
fileMap.put("name", frameRowMap.getString("FRAMENAME"));
fileMap.put("ORDERINDEX", frameRowMap.getString("FRAMEORDERINDEX"));
fileMap.put("TLEVEL", frameRowMap.getString("FRAMELEVEL"));
fileMap.put("ID", frameRowMap.getString("ID"));
fileMap.put("PARENTID", frameRowMap.getString("PLPARENTID"));
fileMap.put("name", frameRowMap.getString("PLNAME"));
fileMap.put("ORDERINDEX", frameRowMap.getString("PLORDERINDEX"));
fileMap.put("TLEVEL", frameRowMap.getString("PLLEVEL"));
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);
//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);
@ -186,7 +184,6 @@ public class ToPageService extends ActionWeb {
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);
@ -197,7 +194,6 @@ public class ToPageService extends ActionWeb {
reFileMap.put("PLNAME", reFileModel.getName());
reFileMap.put("PLPARENTID", FILEID);
reFileMap.put("PLMETHODID", PLMETHODID);
System.out.println("111111111");
PALRepositoryPropertyDao dao = new PALRepositoryPropertyDao();
List<PALRepositoryPropertyModel> propertys = dao.getPropertysByPlid(FILEID, null);
@ -306,6 +302,9 @@ public class ToPageService extends ActionWeb {
}
fileMaps.add(fileMap);
}
System.out.println("fileMaps============"+fileMaps);
List<Map> fileTreeNodes = TreeUtil.buildTree("1", fileMaps, null, "frame", null, null);
ro.put("fileMaps", fileTreeNodes);
System.err.println("============fileMaps============" + fileMaps);