|
@@ -60,6 +60,7 @@ public class RWDLoadUtil {
|
|
File[] files = root.listFiles();
|
|
File[] files = root.listFiles();
|
|
Map<String, SceneDataSet> infoArrayDic = new ConcurrentHashMap<String, SceneDataSet>();
|
|
Map<String, SceneDataSet> infoArrayDic = new ConcurrentHashMap<String, SceneDataSet>();
|
|
Map<String, JSONArray> infoJsonArray = new ConcurrentHashMap<String, JSONArray>();
|
|
Map<String, JSONArray> infoJsonArray = new ConcurrentHashMap<String, JSONArray>();
|
|
|
|
+ JSONArray dataSourceAll = new JSONArray();
|
|
for (File file : files) {
|
|
for (File file : files) {
|
|
int index_ = file.getName().indexOf('.');
|
|
int index_ = file.getName().indexOf('.');
|
|
String code = file.getName().substring(0, index_);
|
|
String code = file.getName().substring(0, index_);
|
|
@@ -70,6 +71,26 @@ public class RWDLoadUtil {
|
|
SceneDataSet.set = RWDUtil.array2SDOList(array);
|
|
SceneDataSet.set = RWDUtil.array2SDOList(array);
|
|
infoArrayDic.put(code, SceneDataSet);
|
|
infoArrayDic.put(code, SceneDataSet);
|
|
infoJsonArray.put(code, array);
|
|
infoJsonArray.put(code, array);
|
|
|
|
+ for (int i = 0; i < array.size(); i++) {
|
|
|
|
+ JSONObject arrayItem = array.getJSONObject(i);
|
|
|
|
+ if (arrayItem.containsKey("dataSource")) {
|
|
|
|
+ Object itemValue = arrayItem.get("dataSource");
|
|
|
|
+ String infoCode = arrayItem.getString("code");
|
|
|
|
+ if (itemValue instanceof JSONArray) {
|
|
|
|
+ JSONArray itemValueArray = (JSONArray) itemValue;
|
|
|
|
+ for (int ii = 0; ii < itemValueArray.size(); ii++) {
|
|
|
|
+ JSONObject dataSourceItem = itemValueArray.getJSONObject(ii);
|
|
|
|
+ JSONObject itemTmp = new JSONObject();
|
|
|
|
+ for (String itemKey : dataSourceItem.keySet()) {
|
|
|
|
+ itemTmp.put(itemKey, dataSourceItem.get(itemKey));
|
|
|
|
+ }
|
|
|
|
+ itemTmp.put("infoCode", infoCode);
|
|
|
|
+ itemTmp.put("classCode", code);
|
|
|
|
+ dataSourceAll.add(itemTmp);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.warn(e.getMessage(), e);
|
|
log.warn(e.getMessage(), e);
|
|
}
|
|
}
|
|
@@ -113,6 +134,12 @@ public class RWDLoadUtil {
|
|
}
|
|
}
|
|
Repository.infoArrayJson = infoJsonArray;
|
|
Repository.infoArrayJson = infoJsonArray;
|
|
Repository.infoArrayDic = infoArrayDic;
|
|
Repository.infoArrayDic = infoArrayDic;
|
|
|
|
+ {
|
|
|
|
+ SceneDataSet SceneDataSet = new SceneDataSet(false);
|
|
|
|
+ SceneDataSet.set = RWDUtil.array2SDOList(dataSourceAll);
|
|
|
|
+ Repository.infoDataSource = SceneDataSet;
|
|
|
|
+ FileUtil.Save("tmp-dataSource" + ".json", FastJsonUtil.toFormatString(dataSourceAll));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
String objectPath = validPath + Constant.getSeperator() + "object";
|
|
String objectPath = validPath + Constant.getSeperator() + "object";
|
|
@@ -982,7 +1009,7 @@ public class RWDLoadUtil {
|
|
.ReadJSONArray(new File(validPath + Constant.getSeperator() + "info-point-relation.json"));
|
|
.ReadJSONArray(new File(validPath + Constant.getSeperator() + "info-point-relation.json"));
|
|
Repository.InfoPointRelationArray.set = RWDUtil.array2SDOList(classArray);
|
|
Repository.InfoPointRelationArray.set = RWDUtil.array2SDOList(classArray);
|
|
}
|
|
}
|
|
- if(Constant.scaleplate_enable){
|
|
|
|
|
|
+ if (Constant.scaleplate_enable) {
|
|
JSONArray classArray = FastJsonReaderUtil.Instance().ReadJSONArray(new File(validPath + Constant.getSeperator() + "scaleplate.json"));
|
|
JSONArray classArray = FastJsonReaderUtil.Instance().ReadJSONArray(new File(validPath + Constant.getSeperator() + "scaleplate.json"));
|
|
Repository.scaleplate.set = RWDUtil.array2SDOList(classArray);
|
|
Repository.scaleplate.set = RWDUtil.array2SDOList(classArray);
|
|
}
|
|
}
|