|
@@ -49,7 +49,7 @@ public class RWDDownloadUtil {
|
|
|
}
|
|
|
|
|
|
public static void LoadPhysicalWorld(String path) throws Exception {
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download physical world refresh dir");
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download physical world refresh dir");
|
|
|
FileUtil.deleteRecursive(new File(path));
|
|
|
{
|
|
|
File root = new File(path);
|
|
@@ -70,7 +70,7 @@ public class RWDDownloadUtil {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download physical world begin " + path);
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download physical world begin " + path);
|
|
|
JSONArray classArray;
|
|
|
{
|
|
|
JSONObject param = new JSONObject();
|
|
@@ -94,13 +94,13 @@ public class RWDDownloadUtil {
|
|
|
criteria.put("classCode", code);
|
|
|
criteria.put("valid", 1);
|
|
|
param.put("criteria", criteria);
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download info " + code);
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download info " + code);
|
|
|
String post_result = HttpClientUtil.post(Constant.rwd_url + "rwd/def/funcid", param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
infoArray = resultJSON.getJSONArray("data");
|
|
|
}
|
|
|
infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
- FileUtil.Save(Constant.GetPath() + Constant.getSeperator() + "info" + Constant.getSeperator() + code + ".json", FastJsonUtil.toFormatString(infoArray));
|
|
|
+ FileUtil.Save(path + Constant.getSeperator() + "info" + Constant.getSeperator() + code + ".json", FastJsonUtil.toFormatString(infoArray));
|
|
|
}
|
|
|
for (int i = 0; i < classArray.size(); i++) {
|
|
|
JSONObject item = (JSONObject) classArray.get(i);
|
|
@@ -114,7 +114,7 @@ public class RWDDownloadUtil {
|
|
|
criteria.put("classCode", code);
|
|
|
criteria.put("valid", 1);
|
|
|
param.put("criteria", criteria);
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download object " + code);
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download object " + code);
|
|
|
String post_result = HttpClientUtil.post(Constant.rwd_url + "rwd/instance/object/query?projectId=" + RepositoryBase.projectId
|
|
|
+ "&groupCode=" + RepositoryBase.groupCode, param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
@@ -125,7 +125,7 @@ public class RWDDownloadUtil {
|
|
|
FastJsonUtil.toFormatString(infoArray));
|
|
|
}
|
|
|
Map<String, Map<String, Integer>> relDic = new HashMap<String, Map<String, Integer>>();
|
|
|
- ExcelRelationUtil.ReadRel(path + Constant.getSeperator() + "2.6-relation.xlsx", relDic);
|
|
|
+ ExcelRelationUtil.ReadRel(Constant.GetPath() + Constant.getSeperator() + "2.6-relation.xlsx", relDic);
|
|
|
for (String graphCode : relDic.keySet().toArray(new String[0])) {
|
|
|
File graph = new File(path + Constant.getSeperator() + "relation" + Constant.getSeperator() + graphCode);
|
|
|
if (!graph.exists()) {
|
|
@@ -140,7 +140,7 @@ public class RWDDownloadUtil {
|
|
|
criteria.put("graphCode", graphCode);
|
|
|
criteria.put("relCode", relCode);
|
|
|
param.put("criteria", criteria);
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download relation " + graphCode + " " + relCode);
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download relation " + graphCode + " " + relCode);
|
|
|
String post_result = HttpClientUtil.post(Constant.rwd_url + "rwd/instance/relation/query?projectId=" + RepositoryBase.projectId
|
|
|
+ "&groupCode=" + RepositoryBase.groupCode, param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
@@ -151,6 +151,6 @@ public class RWDDownloadUtil {
|
|
|
+ ".json", FastJsonUtil.toFormatString(infoArray));
|
|
|
}
|
|
|
}
|
|
|
- log.info(LogUtil.refreshLoggerName, "Download physical world finish " + path);
|
|
|
+ log.info(LogUtil.refreshLoggerName + "\t" + "Download physical world finish " + path);
|
|
|
}
|
|
|
}
|