|
@@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.persagy.ibms.data.sdk.data.SceneDataBase;
|
|
|
import com.persagy.ibms.data.sdk.data.SceneDataObject;
|
|
|
import com.persagy.ibms.data.sdk.data.SceneDataValue;
|
|
|
+
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
@Slf4j
|
|
@@ -44,18 +45,14 @@ public class RWDLoadUtil {
|
|
|
JSONObject classItem = (JSONObject) classArray.get(i);
|
|
|
String objType = (String) classItem.get("objType");
|
|
|
String code = (String) classItem.get("code");
|
|
|
+ String name = (String) classItem.get("name");
|
|
|
if (code.equals(objType)) {
|
|
|
Repository.objTypeMap.put(objType, false);
|
|
|
- }
|
|
|
- }
|
|
|
- for (int i = 0; i < classArray.size(); i++) {
|
|
|
- JSONObject classItem = (JSONObject) classArray.get(i);
|
|
|
- String objType = (String) classItem.get("objType");
|
|
|
- String code = (String) classItem.get("code");
|
|
|
- if (!code.equals(objType)) {
|
|
|
+ } else {
|
|
|
Repository.code2objTypeMap.put(code, objType);
|
|
|
Repository.objTypeMap.put(objType, true);
|
|
|
}
|
|
|
+ Repository.classCode2NameMap.put(code, name);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -100,6 +97,7 @@ public class RWDLoadUtil {
|
|
|
for (File file : files) {
|
|
|
int index_ = file.getName().indexOf('.');
|
|
|
String code = file.getName().substring(0, index_);
|
|
|
+ String className = Repository.classCode2NameMap.get(code);
|
|
|
log.info(objectPath + Constant.getSeperator() + "" + file.getName());
|
|
|
JSONArray array = FastJsonReaderUtil.Instance().ReadJSONArray(new File(objectPath + Constant.getSeperator() + "" + file.getName()));
|
|
|
if (code.equals("OTSECB")) {
|
|
@@ -126,6 +124,7 @@ public class RWDLoadUtil {
|
|
|
for (int i = 0; i < array.size(); i++) {
|
|
|
JSONObject arrayItem = array.getJSONObject(i);
|
|
|
String id = (String) arrayItem.get("id");
|
|
|
+ arrayItem.put("数据字典类型名称", className);
|
|
|
Repository.id2object.put(id, arrayItem);
|
|
|
}
|
|
|
List<SceneDataValue> sdvList = RWDUtil.array2SDVList(array);
|