|
@@ -135,6 +135,9 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
classArray = resultJSON.getJSONArray("data");
|
|
|
classArray = classArray == null ? new JSONArray() : classArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "classArray.json", FastJsonUtil.toFormatString(classArray), LogOfDownload.downloadList);
|
|
@@ -153,9 +156,12 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
infoArray = resultJSON.getJSONArray("data");
|
|
|
+ infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
}
|
|
|
- infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "info" + Constant.getSeperator() + code + ".json", FastJsonUtil.toFormatString(infoArray),
|
|
|
LogOfDownload.downloadList);
|
|
|
}
|
|
@@ -190,9 +196,12 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
infoArray = resultJSON.getJSONArray("data");
|
|
|
+ infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
}
|
|
|
- infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "object" + Constant.getSeperator() + code + ".json",
|
|
|
FastJsonUtil.toFormatString(infoArray), LogOfDownload.downloadList);
|
|
|
}
|
|
@@ -222,9 +231,12 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
infoArray = resultJSON.getJSONArray("data");
|
|
|
+ infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
}
|
|
|
- infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "relation" + Constant.getSeperator() + graphCode + Constant.getSeperator() + relCode
|
|
|
+ ".json", FastJsonUtil.toFormatString(infoArray), LogOfDownload.downloadList);
|
|
|
}
|
|
@@ -304,7 +316,6 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
sceneArray = JSON.parseArray(post_result);
|
|
|
- sceneArray = sceneArray == null ? new JSONArray() : sceneArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "sceneArray.json", FastJsonUtil.toFormatString(sceneArray), LogOfDownload.downloadList);
|
|
|
}
|
|
|
JSONArray classArray;
|
|
@@ -317,6 +328,9 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
classArray = resultJSON.getJSONArray("data");
|
|
|
classArray = classArray == null ? new JSONArray() : classArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + "classArray.json", FastJsonUtil.toFormatString(classArray), LogOfDownload.downloadList);
|
|
@@ -337,9 +351,12 @@ public class RWDDownloadUtil {
|
|
|
+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
|
|
|
param.toJSONString());
|
|
|
JSONObject resultJSON = JSON.parseObject(post_result);
|
|
|
+ if (!resultJSON.getString("result").equals("success")) {
|
|
|
+ throw new Exception(param.toJSONString() + "\n" + post_result);
|
|
|
+ }
|
|
|
infoArray = resultJSON.getJSONArray("data");
|
|
|
+ infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
}
|
|
|
- infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
File sceneDir = new File(path + Constant.getSeperator() + "object" + Constant.getSeperator() + ibmsSceneCode);
|
|
|
if (!sceneDir.exists()) {
|
|
|
sceneDir.mkdir();
|
|
@@ -626,7 +643,6 @@ public class RWDDownloadUtil {
|
|
|
throw e;
|
|
|
}
|
|
|
}
|
|
|
- infoArray = infoArray == null ? new JSONArray() : infoArray;
|
|
|
FileUtil.Save(path + Constant.getSeperator() + ibmsSceneCode + Constant.getSeperator() + ibmsClassCode + ".json",
|
|
|
FastJsonUtil.toFormatString(infoArray), LogOfDownload.downloadList);
|
|
|
}
|