|
@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.common.collect.Maps;
|
|
|
+import com.persagy.fm.common.old.utils.StringUtil;
|
|
|
+import com.persagy.fm.common.old.utils.ToolsUtil;
|
|
|
+import com.persagy.fm.sop.constant.SopCommonConst;
|
|
|
import com.persagy.old.cache.ComponentRelationCache;
|
|
|
import com.persagy.old.cache.DictionaryCache;
|
|
|
import com.persagy.old.cache.GraphCache;
|
|
@@ -97,7 +100,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
* 若获取项目下字典名称为空,name使用数据平台的数据
|
|
|
* update by yuecaipu on 2018-5-9 18:15
|
|
|
*/
|
|
|
- objName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, object.getString("obj_id"));
|
|
|
+ objName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, object.getString("obj_id"));
|
|
|
objName = objName == null ? result.getString("eqName"):objName;
|
|
|
object.put("obj_name", objName);
|
|
|
object.put("obj_code", result.getString("eq"));
|
|
@@ -193,7 +196,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
JSONObject spaceClassJson = JSONObject.parseObject(spaceClass);
|
|
|
if (DBConst.Result.SUCCESS.equals(spaceClassJson.getString(DBConst.Result.RESULT))) {
|
|
|
JSONArray content = spaceClassJson.getJSONArray(DBConst.Result.CONTENT);
|
|
|
- filterObjByKeyWords(keyWords, objects, content, CommonConst.data_type_space_class);
|
|
|
+ filterObjByKeyWords(keyWords, objects, content, SopCommonConst.data_type_space_class);
|
|
|
}
|
|
|
}
|
|
|
// 3.搜索 build_func_type-建筑功能类型
|
|
@@ -240,7 +243,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
}
|
|
|
}
|
|
|
if (!criterias.isEmpty()) {
|
|
|
-// String projectId = StringUtil.transferId(criterias.getJSONObject(0).getString("id"), CommonConst.tag_project);
|
|
|
+// String projectId = StringUtil.transferId(criterias.getJSONObject(0).getString("id"), SopCommonConst.tag_project);
|
|
|
// String requestUrl = getDataPlatformPath(DataRequestPathUtil.dataPlat_object_batch_query_post, projectId, null);
|
|
|
String requestUrl = getDataPlatformPath(DataRequestPathUtil.dataPlat_object_batch_query_post);
|
|
|
JSONObject params = new JSONObject();
|
|
@@ -307,7 +310,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
@Override
|
|
|
public String searchObjectClass(String jsonStr) throws Exception {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
|
|
|
- String projectId = CommonConst.group_sop_id;
|
|
|
+ String projectId = SopCommonConst.group_sop_id;
|
|
|
String keyWord = jsonObject.getString("keyword");
|
|
|
keyWord = keyWord == null ? "" : keyWord;
|
|
|
String[] keyWords = keyWord.split(" +");
|
|
@@ -505,7 +508,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
clazz = new JSONObject();
|
|
|
classId = classItem.getString("code");
|
|
|
clazzName = classItem.getString("class");
|
|
|
-// clazzName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, classId, projectId);
|
|
|
+// clazzName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, classId, projectId);
|
|
|
systemArray = classItem.getJSONArray("content");
|
|
|
systems = new JSONArray();
|
|
|
parentsStr = "[{\"parent_ids\":[\""+classId+"\"],\"parent_names\":[\""+clazzName+"\"]}]";
|
|
@@ -555,7 +558,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
clazz = new JSONObject();
|
|
|
clazzId = clazzItem.getString("code");
|
|
|
clazzName = clazzItem.getString("class");
|
|
|
-// clazzName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, clazzId, projectId);
|
|
|
+// clazzName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, clazzId, projectId);
|
|
|
systemArray = clazzItem.getJSONArray("content");
|
|
|
systems = new JSONArray();
|
|
|
for(int j=0; j<systemArray.size(); j++){
|
|
@@ -612,7 +615,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
// resultJson.put(Result.CONTENT, contents);
|
|
|
// resultJson.put(Result.COUNT, contents.size());
|
|
|
// return resultJson.toJSONString();
|
|
|
- JSONArray contents = dictionaryService.queryDataSourceById(CommonConst.JsonToData.SpaceFunction);
|
|
|
+ JSONArray contents = dictionaryService.queryDataSourceById(SopCommonConst.JsonToData.SpaceFunction);
|
|
|
contents = transformDataFormat2(contents,needBack,null);
|
|
|
return ToolsUtil.successJsonMsg(contents);
|
|
|
}
|
|
@@ -735,8 +738,8 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
String buildStr = httpPostRequestDataPlatform(url, "{\"projectId\":\"" + projectId + "\",\"criteria\":{\"type\":[\"Bd\"]}}");
|
|
|
JSONObject buildJson = JSONObject.parseObject(buildStr);
|
|
|
if("success".equals(buildJson.getString("Result"))){
|
|
|
- Map<String, String> idLocalNameMap = getObjectIdNameMap(buildJson, CommonConst.info_name_local_name_build);
|
|
|
- Map<String, String> idLocalIdMap = getObjectIdNameMap(buildJson, CommonConst.info_name_local_id_build);
|
|
|
+ Map<String, String> idLocalNameMap = getObjectIdNameMap(buildJson, SopCommonConst.info_name_local_name_build);
|
|
|
+ Map<String, String> idLocalIdMap = getObjectIdNameMap(buildJson, SopCommonConst.info_name_local_id_build);
|
|
|
JSONArray builds = new JSONArray();
|
|
|
JSONObject build;
|
|
|
//for(String id : idLocalNameMap.keySet()){
|
|
@@ -755,7 +758,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
// buildItem = buildArray.getJSONObject(i);
|
|
|
// build = new JSONObject();
|
|
|
// build.put("obj_id", buildItem.getString("id"));
|
|
|
-// build.put("obj_name", buildItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_build));
|
|
|
+// build.put("obj_name", buildItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_build));
|
|
|
// builds.add(build);
|
|
|
// }
|
|
|
buildStr = ToolsUtil.successJsonMsg(builds);
|
|
@@ -813,16 +816,16 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
floor = new JSONObject();
|
|
|
floorId = floorItem.getString("id");
|
|
|
floor.put("obj_id", floorId);
|
|
|
- floor.put("obj_name", floorItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_floor));
|
|
|
- floor.put("obj_code", floorItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_id_floor));
|
|
|
- //buildId = StringUtil.transferId(floorId, CommonConst.tag_build);
|
|
|
+ floor.put("obj_name", floorItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_floor));
|
|
|
+ floor.put("obj_code", floorItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_id_floor));
|
|
|
+ //buildId = StringUtil.transferId(floorId, SopCommonConst.tag_build);
|
|
|
buildId = floorId_location.get(floorId) == null ? null : floorId_location.get(floorId).getString("building");
|
|
|
floorList = floorMap.getOrDefault(buildId, new JSONArray());
|
|
|
floorList.add(floor);
|
|
|
floorMap.put(buildId, floorList);
|
|
|
}
|
|
|
//遍历建筑 {"buildingId":"buildingName"}
|
|
|
- Map<String, String> map = getObjectIdNameMap(buildJson, CommonConst.info_name_local_name_build);
|
|
|
+ Map<String, String> map = getObjectIdNameMap(buildJson, SopCommonConst.info_name_local_name_build);
|
|
|
builds = new JSONArray();
|
|
|
//for(String id : map.keySet()){
|
|
|
String id;
|
|
@@ -869,10 +872,10 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
String buildUrl = getDataPlatformPath(DataRequestPathUtil.dataPlat_object_batch_query);
|
|
|
String floorParamStr, buildParamStr, spaceStr, floorStr, buildStr;
|
|
|
String floorUrl, spaceParmaStr = "{\"projectId\":\"" + projectId + "\",\"criteria\":{\"id\":\""+objId+"\",\"type\":[\"Sp\"]}}";
|
|
|
- if(CommonConst.data_type_floor.equals(objType)){
|
|
|
+ if(SopCommonConst.data_type_floor.equals(objType)){
|
|
|
// floorUrl = getDataPlatformPath(DataRequestPathUtil.dataPlat_object_batch_query, projectId, projectCache.getProjectSecretById(projectId));
|
|
|
floorUrl = getDataPlatformPath(DataRequestPathUtil.dataPlat_object_batch_query);
|
|
|
- String buildId = StringUtil.transferId(objId, CommonConst.tag_build, dataPlatBasePath);
|
|
|
+ String buildId = transferId(objId, SopCommonConst.tag_build, dataPlatBasePath);
|
|
|
buildParamStr = "{\"projectId\":\"" + projectId + "\",\"criterias\":[{\"id\":\""+buildId+"\"}]}";
|
|
|
floorParamStr = "{\"projectId\":\"" + projectId + "\",\"criterias\":[{\"id\":\""+objId+"\"}]}";
|
|
|
}else{
|
|
@@ -910,13 +913,13 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
buildArray = buildJson.getJSONArray("Content");
|
|
|
for(int i=0; i<buildArray.size(); i++){
|
|
|
buildItem = buildArray.getJSONObject(i);
|
|
|
- buildMap.put(buildItem.getString("id"), buildItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_build));
|
|
|
+ buildMap.put(buildItem.getString("id"), buildItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_build));
|
|
|
}
|
|
|
//处理楼层数据
|
|
|
floorArray = floorJson.getJSONArray("Content");
|
|
|
for(int i=0; i<floorArray.size(); i++){
|
|
|
floorItem = floorArray.getJSONObject(i);
|
|
|
- floorMap.put(floorItem.getString("id"), floorItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_floor));
|
|
|
+ floorMap.put(floorItem.getString("id"), floorItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_floor));
|
|
|
}
|
|
|
//处理空间数据
|
|
|
spaceArray = spaceJson.getJSONArray("Content");
|
|
@@ -934,8 +937,8 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
space = new JSONObject();
|
|
|
spaceId = spaceItem.getString("id");
|
|
|
if(needBack){
|
|
|
- //floorId = StringUtil.transferId(spaceId, CommonConst.tag_floor);
|
|
|
- //buildId = StringUtil.transferId(spaceId, CommonConst.tag_build);
|
|
|
+ //floorId = StringUtil.transferId(spaceId, SopCommonConst.tag_floor);
|
|
|
+ //buildId = StringUtil.transferId(spaceId, SopCommonConst.tag_build);
|
|
|
floorId = spaceId_location.get(spaceId) == null ? null : spaceId_location.get(spaceId).getString("floor");
|
|
|
buildId = spaceId_location.get(spaceId) == null ? null : spaceId_location.get(spaceId).getString("building");
|
|
|
if(floorMap.containsKey(floorId)){
|
|
@@ -946,8 +949,8 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
space.put("parents", JSONArray.parseArray(parentStr));
|
|
|
}
|
|
|
space.put("obj_id", spaceId);
|
|
|
- space.put("obj_name", spaceItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_space));
|
|
|
- space.put("obj_code", spaceItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_id_space));
|
|
|
+ space.put("obj_name", spaceItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_space));
|
|
|
+ space.put("obj_code", spaceItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_id_space));
|
|
|
spaces.add(space);
|
|
|
}
|
|
|
resultStr = ToolsUtil.successJsonMsg(spaces);
|
|
@@ -1013,12 +1016,12 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
systemItem = systemArray.getJSONObject(i);
|
|
|
system = new JSONObject();
|
|
|
systemId = systemItem.getString("id");
|
|
|
- systemName = systemItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_system);
|
|
|
+ systemName = systemItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_system);
|
|
|
String category = systemItem.getString("category");
|
|
|
systemClass = category == null || category.length() < 2 ? null : category.substring(0, 2);
|
|
|
system.put("obj_id", systemId);
|
|
|
system.put("obj_name", systemName);
|
|
|
- system.put("obj_code", systemItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_id_system));
|
|
|
+ system.put("obj_code", systemItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_id_system));
|
|
|
//位置信息(所属建筑)
|
|
|
system.put("location", systemItem.getJSONObject("location"));
|
|
|
systemList = systemMap.getOrDefault(systemClass, new ArrayList<String>());
|
|
@@ -1029,7 +1032,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
buildArray = buildJson.getJSONArray("Content");
|
|
|
for(int i=0; i<buildArray.size(); i++){
|
|
|
buildItem = buildArray.getJSONObject(i);
|
|
|
- buildMap.put(buildItem.getString("id"), buildItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_build));
|
|
|
+ buildMap.put(buildItem.getString("id"), buildItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_build));
|
|
|
}
|
|
|
//处理数据字典
|
|
|
dictArray = dictJson.getJSONArray("Content");
|
|
@@ -1039,7 +1042,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
dict = new JSONObject();
|
|
|
dictId = dictItem.getString("code");
|
|
|
dictName = dictItem.getString("class");
|
|
|
-// dictName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, dictId, projectId);
|
|
|
+// dictName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, dictId, projectId);
|
|
|
systemList = systemMap.getOrDefault(dictId, new ArrayList<String>());
|
|
|
systems = new JSONArray();
|
|
|
|
|
@@ -1056,7 +1059,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
for(String systemObj : systemList){
|
|
|
system = JSONObject.parseObject(systemObj);
|
|
|
systemId = system.getString("obj_id");
|
|
|
- //buildId = StringUtil.transferId(systemId, CommonConst.tag_build);
|
|
|
+ //buildId = StringUtil.transferId(systemId, SopCommonConst.tag_build);
|
|
|
buildId = systemId_location.get(systemId) == null ? null : systemId_location.get(systemId).getString("building");
|
|
|
buildName = buildMap.get(buildId);
|
|
|
if(needBack){
|
|
@@ -1103,7 +1106,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
systemItem = systemArray.getJSONObject(i);
|
|
|
system = new JSONObject();
|
|
|
system.put("system_id", systemItem.getString("id"));
|
|
|
- system.put("system_name", systemItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_system));
|
|
|
+ system.put("system_name", systemItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_system));
|
|
|
systems.add(system);
|
|
|
}
|
|
|
resultStr = ToolsUtil.successJsonMsg(systems);
|
|
@@ -1147,42 +1150,42 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
for(int i = 0; i < objectArray.size(); i++) {
|
|
|
JSONObject queryContent= objectArray.getJSONObject(i);
|
|
|
String obj_id = queryContent.getString("id");
|
|
|
- if(obj_id.startsWith(CommonConst.tag_floor)) {
|
|
|
+ if(obj_id.startsWith(SopCommonConst.tag_floor)) {
|
|
|
floorIdInContents.add(obj_id);
|
|
|
- }else if(obj_id.startsWith(CommonConst.tag_space)) {
|
|
|
+ }else if(obj_id.startsWith(SopCommonConst.tag_space)) {
|
|
|
spaceIdInContents.add(obj_id);
|
|
|
}
|
|
|
}
|
|
|
//根据空间或者楼层id获取上层的id
|
|
|
- Map<String, Map<String, String>> spaceId_location = StringUtil.getParentIds(spaceIdInContents,dataPlatBasePath);
|
|
|
+ Map<String, Map<String, String>> spaceId_location = getParentIds(spaceIdInContents,dataPlatBasePath);
|
|
|
spaceId_location = spaceId_location == null ? new HashMap<>() : spaceId_location;
|
|
|
|
|
|
- Map<String, Map<String, String>> floorId_location = StringUtil.getParentIds(floorIdInContents,dataPlatBasePath);
|
|
|
+ Map<String, Map<String, String>> floorId_location = getParentIds(floorIdInContents,dataPlatBasePath);
|
|
|
floorId_location = floorId_location == null ? new HashMap<>() : floorId_location;
|
|
|
|
|
|
for(int i=0; i<objectArray.size(); i++){
|
|
|
objectItem = objectArray.getJSONObject(i);
|
|
|
objectId = objectItem.getString("id");
|
|
|
- floor_sequence_id = objectItem.getJSONObject(CommonConst.info_name_datas).getString("FloorSequenceID");
|
|
|
- if(objectId.startsWith(CommonConst.tag_build)){
|
|
|
+ floor_sequence_id = objectItem.getJSONObject(SopCommonConst.info_name_datas).getString("FloorSequenceID");
|
|
|
+ if(objectId.startsWith(SopCommonConst.tag_build)){
|
|
|
//建筑
|
|
|
- buildMap.put(objectId, objectItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_build));
|
|
|
- }else if(objectId.startsWith(CommonConst.tag_floor)){
|
|
|
+ buildMap.put(objectId, objectItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_build));
|
|
|
+ }else if(objectId.startsWith(SopCommonConst.tag_floor)){
|
|
|
//楼层
|
|
|
- //buildId = StringUtil.transferId(objectId, CommonConst.tag_build);
|
|
|
+ //buildId = StringUtil.transferId(objectId, SopCommonConst.tag_build);
|
|
|
buildId = floorId_location.get(objectId) == null ? null : floorId_location.get(objectId).get("building");
|
|
|
mapValues = relBuildStepObjectMap.get(buildId);
|
|
|
mapValues = mapValues == null ? new JSONArray() : mapValues;
|
|
|
mapValues.add(objectId);
|
|
|
relBuildStepObjectMap.put(buildId, mapValues);
|
|
|
- floorMap.put(objectId, objectItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_floor));
|
|
|
+ floorMap.put(objectId, objectItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_floor));
|
|
|
floorSequenceMap.put(objectId, floor_sequence_id);
|
|
|
- }else if(objectId.startsWith(CommonConst.tag_space)){
|
|
|
+ }else if(objectId.startsWith(SopCommonConst.tag_space)){
|
|
|
//空间
|
|
|
- //floorId = StringUtil.transferId(objectId, CommonConst.tag_floor);
|
|
|
+ //floorId = StringUtil.transferId(objectId, SopCommonConst.tag_floor);
|
|
|
floorId = spaceId_location.get(objectId) == null ? null : spaceId_location.get(objectId).get("floor");
|
|
|
if(null != floorId && floorId.endsWith("000")){
|
|
|
- //buildId = StringUtil.transferId(objectId, CommonConst.tag_build);
|
|
|
+ //buildId = StringUtil.transferId(objectId, SopCommonConst.tag_build);
|
|
|
buildId = spaceId_location.get(objectId) == null ? null : spaceId_location.get(objectId).get("building");
|
|
|
mapValues = relBuildStepObjectMap.get(buildId);
|
|
|
mapValues = mapValues == null ? new JSONArray() : mapValues;
|
|
@@ -1194,7 +1197,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
mapValues.add(objectId);
|
|
|
relFloorSpaceMap.put(floorId, mapValues);
|
|
|
}
|
|
|
- spaceMap.put(objectId, objectItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_space));
|
|
|
+ spaceMap.put(objectId, objectItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_space));
|
|
|
}
|
|
|
}
|
|
|
String stepObjectId, spaceId;
|
|
@@ -1210,7 +1213,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
for(int i=0; i<relStepObjects.size(); i++){
|
|
|
stepObjectId = relStepObjects.getString(i);
|
|
|
buildStepObject = new JSONObject();
|
|
|
- if(stepObjectId.startsWith(CommonConst.tag_floor)){
|
|
|
+ if(stepObjectId.startsWith(SopCommonConst.tag_floor)){
|
|
|
//楼层
|
|
|
spaces = new JSONArray();
|
|
|
relSpaces = relFloorSpaceMap.getOrDefault(stepObjectId, new JSONArray());
|
|
@@ -1377,13 +1380,13 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
// 查询关系请求参数对象
|
|
|
params.clear();
|
|
|
// 项目下的 设备-空间 图实例id
|
|
|
- String graphIdOfEquipAndSPace = graphCache.getGraphIdByProjectIdAndGraph(projectId, CommonConst.graph_type_equip_in_space);
|
|
|
+ String graphIdOfEquipAndSPace = graphCache.getGraphIdByProjectIdAndGraph(projectId, SopCommonConst.graph_type_equip_in_space);
|
|
|
|
|
|
if(!StringUtil.isNull(graphIdOfEquipAndSPace)) {
|
|
|
if(needBackParents) {
|
|
|
criteria.clear();
|
|
|
criteria.put("graph_id", graphIdOfEquipAndSPace);
|
|
|
- criteria.put("rel_type", CommonConst.relation_type_equip_in_space);
|
|
|
+ criteria.put("rel_type", SopCommonConst.relation_type_equip_in_space);
|
|
|
if(!StringUtil.isNull(spaceId)){
|
|
|
criteria.put("to_id", spaceId);
|
|
|
}
|
|
@@ -1394,12 +1397,12 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
|
|
|
if(resultStr.contains("success")){
|
|
|
// resultStr 设备与空间关系查询的结果集
|
|
|
- eqid_spid_map = getRelationMap(resultStr, CommonConst.relation_from_id, CommonConst.relation_to_id);
|
|
|
+ eqid_spid_map = getRelationMap(resultStr, SopCommonConst.relation_from_id, SopCommonConst.relation_to_id);
|
|
|
}
|
|
|
}else if(!StringUtil.isNull(spaceId)) {
|
|
|
criteria.clear();
|
|
|
criteria.put("graph_id", graphIdOfEquipAndSPace);
|
|
|
- criteria.put("rel_type", CommonConst.relation_type_equip_in_space);
|
|
|
+ criteria.put("rel_type", SopCommonConst.relation_type_equip_in_space);
|
|
|
criteria.put("to_id", spaceId);
|
|
|
params.put("criteria", criteria);
|
|
|
params.put("projectId", projectId);
|
|
@@ -1408,7 +1411,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
|
|
|
if(resultStr.contains("success")){
|
|
|
// resultStr 设备与空间关系查询的结果集
|
|
|
- eqid_spid_map = getRelationMap(resultStr, CommonConst.relation_from_id, CommonConst.relation_to_id);
|
|
|
+ eqid_spid_map = getRelationMap(resultStr, SopCommonConst.relation_from_id, SopCommonConst.relation_to_id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1419,12 +1422,12 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
Map<String, String> eqid_syid_map = new HashMap<>();
|
|
|
// ------------------- 查询设备和系统关系 start---------------------- //
|
|
|
//项目下的设备-系统图实例id
|
|
|
- String graphIdOfEquipAndSystem = graphCache.getGraphIdByProjectIdAndGraph(projectId, CommonConst.graph_type_system_contain_equip);
|
|
|
+ String graphIdOfEquipAndSystem = graphCache.getGraphIdByProjectIdAndGraph(projectId, SopCommonConst.graph_type_system_contain_equip);
|
|
|
if(!StringUtil.isNull(graphIdOfEquipAndSystem)){
|
|
|
if(needBackParents) {
|
|
|
criteria.clear();
|
|
|
criteria.put("graph_id", graphIdOfEquipAndSystem);
|
|
|
- criteria.put("rel_type", CommonConst.relation_type_system_contain_equip);
|
|
|
+ criteria.put("rel_type", SopCommonConst.relation_type_system_contain_equip);
|
|
|
if(!StringUtil.isNull(systemId)){
|
|
|
criteria.put("from_id", systemId);
|
|
|
}
|
|
@@ -1436,12 +1439,12 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
|
|
|
if(resultStr.contains("success")){
|
|
|
// resultStr 设备与系统关系查询的结果集
|
|
|
- eqid_syid_map = getRelationMap(resultStr, CommonConst.relation_to_id, CommonConst.relation_from_id);
|
|
|
+ eqid_syid_map = getRelationMap(resultStr, SopCommonConst.relation_to_id, SopCommonConst.relation_from_id);
|
|
|
}
|
|
|
}else if(!StringUtil.isNull(systemId)) {
|
|
|
criteria.clear();
|
|
|
criteria.put("graph_id", graphIdOfEquipAndSystem);
|
|
|
- criteria.put("rel_type", CommonConst.relation_type_system_contain_equip);
|
|
|
+ criteria.put("rel_type", SopCommonConst.relation_type_system_contain_equip);
|
|
|
criteria.put("from_id", systemId);
|
|
|
params.clear();
|
|
|
params.put("criteria", criteria);
|
|
@@ -1451,7 +1454,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
|
|
|
if(resultStr.contains("success")){
|
|
|
// resultStr 设备与系统关系查询的结果集
|
|
|
- eqid_syid_map = getRelationMap(resultStr, CommonConst.relation_to_id, CommonConst.relation_from_id);
|
|
|
+ eqid_syid_map = getRelationMap(resultStr, SopCommonConst.relation_to_id, SopCommonConst.relation_from_id);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1576,7 +1579,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
relSystemName = objectIdNameMap.get(relSystemId);
|
|
|
// 专业编码
|
|
|
domainId = syid_domaincode_map.get(relSystemId);
|
|
|
- domainName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, domainId);
|
|
|
+ domainName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, domainId);
|
|
|
if (domainId != null) {
|
|
|
parentIds.add(domainId);
|
|
|
}
|
|
@@ -1601,8 +1604,8 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
equip.put("parents", parents);
|
|
|
}
|
|
|
equip.put("obj_id", equipId);
|
|
|
- equip.put("obj_name", equipItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_name_equip));
|
|
|
- equip.put("obj_code", equipItem.getJSONObject(CommonConst.info_name_datas).getString(CommonConst.info_name_local_id_equip));
|
|
|
+ equip.put("obj_name", equipItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_name_equip));
|
|
|
+ equip.put("obj_code", equipItem.getJSONObject(SopCommonConst.info_name_datas).getString(SopCommonConst.info_name_local_id_equip));
|
|
|
equips.add(equip);
|
|
|
}
|
|
|
resultStr = ToolsUtil.successJsonMsg(equips);
|
|
@@ -1732,7 +1735,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info = new JSONObject();
|
|
|
parents = new JSONArray();
|
|
|
infoType = infoItem.getString("type");
|
|
|
- if(CommonConst.tag_equip.equals(infoType)){
|
|
|
+ if(SopCommonConst.tag_equip.equals(infoType)){
|
|
|
//设备大类信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -1741,7 +1744,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if(!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -1765,7 +1768,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("obj_type", "equip_class");
|
|
|
info.put("parents", parents);
|
|
|
info.put("info_point", infoPoint);
|
|
|
- }else if(CommonConst.tag_system.equals(infoType)){
|
|
|
+ }else if(SopCommonConst.tag_system.equals(infoType)){
|
|
|
//系统大类信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -1774,7 +1777,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if(!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -1792,7 +1795,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("obj_type", "system_class");
|
|
|
info.put("parents", parents);
|
|
|
info.put("info_point", infoPoint);
|
|
|
- }else if(CommonConst.tag_equip_object.equals(infoType)){
|
|
|
+ }else if(SopCommonConst.tag_equip_object.equals(infoType)){
|
|
|
//设备对象信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -1803,7 +1806,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if (!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -1845,7 +1848,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parents.add(parent);
|
|
|
|
|
|
//处理信息点
|
|
|
- infoPoint.put("id", "equip_" + StringUtil.getEquipOrSystemCodeFromId(infoItem.getString("eqObj"), CommonConst.tag_dict_equip, dataPlatBasePath) + "_" + infoItem.getString("info"));
|
|
|
+ infoPoint.put("id", "equip_" + getEquipOrSystemCodeFromId(infoItem.getString("eqObj"), SopCommonConst.tag_dict_equip, dataPlatBasePath) + "_" + infoItem.getString("info"));
|
|
|
infoPoint.put("code", infoItem.getString("info"));
|
|
|
infoPoint.put("name", infoItem.getString("infoName"));
|
|
|
|
|
@@ -1854,7 +1857,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("obj_type", "equip");
|
|
|
info.put("parents", parents);
|
|
|
info.put("info_point", infoPoint);
|
|
|
- }else if(CommonConst.tag_system_object.equals(infoType)){
|
|
|
+ }else if(SopCommonConst.tag_system_object.equals(infoType)){
|
|
|
//系统对象信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -1863,7 +1866,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if(!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -1885,7 +1888,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parent.put("parent_names", parentNames);
|
|
|
parents.add(parent);
|
|
|
//处理信息点
|
|
|
- infoPoint.put("id", "system_" + StringUtil.getEquipOrSystemCodeFromId(infoItem.getString("sysObj"), CommonConst.tag_dict_sytstem, dataPlatBasePath) + "_" + infoItem.getString("info"));
|
|
|
+ infoPoint.put("id", "system_" + getEquipOrSystemCodeFromId(infoItem.getString("sysObj"), SopCommonConst.tag_dict_sytstem, dataPlatBasePath) + "_" + infoItem.getString("info"));
|
|
|
infoPoint.put("code", infoItem.getString("info"));
|
|
|
infoPoint.put("name", infoItem.getString("infoName"));
|
|
|
|
|
@@ -1896,7 +1899,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("info_point", infoPoint);
|
|
|
}
|
|
|
if(info.containsKey("info_point")
|
|
|
- && infoPointCache.isShowInApp(info.getJSONObject("info_point").getString("id"), infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ && infoPointCache.isShowInApp(info.getJSONObject("info_point").getString("id"), infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
infos.add(info);
|
|
|
}
|
|
|
}
|
|
@@ -1940,7 +1943,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
if(!StringUtil.isNull(keyword)){
|
|
|
keywords = keyword.split(" ");
|
|
|
}
|
|
|
- String systemType = StringUtil.getEquipOrSystemCodeFromId(systemId, CommonConst.tag_dict_sytstem, dataPlatBasePath);
|
|
|
+ String systemType = getEquipOrSystemCodeFromId(systemId, SopCommonConst.tag_dict_sytstem, dataPlatBasePath);
|
|
|
String url = getDataPlatDictPath(DataRequestPathUtil.dataPlat_infoPoint_special, systemType);
|
|
|
// String infoStr = httpGetRequest(url);
|
|
|
String infoStr = httpPostRequestDataPlatform(url,"{}");
|
|
@@ -1954,9 +1957,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -1969,11 +1972,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "system"+"_" +systemType+"_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -1995,7 +1998,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
if(!StringUtil.isNull(keyword)){
|
|
|
keywords = keyword.split(" ");
|
|
|
}
|
|
|
- String equipType = StringUtil.getEquipOrSystemCodeFromId(equipId, CommonConst.tag_dict_equip, dataPlatBasePath);
|
|
|
+ String equipType = getEquipOrSystemCodeFromId(equipId, SopCommonConst.tag_dict_equip, dataPlatBasePath);
|
|
|
String url = getDataPlatDictPath(DataRequestPathUtil.dataPlat_infoPoint_special, equipType);
|
|
|
// String infoStr = httpGetRequest(url);
|
|
|
String infoStr = httpPostRequestDataPlatform(url,"{}");
|
|
@@ -2009,9 +2012,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2024,11 +2027,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "equip"+"_" +equipType+"_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -2062,9 +2065,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2077,11 +2080,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "system"+"_" +systemType+"_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -2116,9 +2119,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2131,11 +2134,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "shaft"+"_" +type+"_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -2170,9 +2173,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2185,11 +2188,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "build_0_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -2223,9 +2226,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2238,15 +2241,15 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "floor"+"_0_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
if ("FloorIdentity".equals(code)) {
|
|
|
- info.put("cmpt_data", dictionaryService.queryDataSourceById(CommonConst.JsonToData.Flooridentity));
|
|
|
+ info.put("cmpt_data", dictionaryService.queryDataSourceById(SopCommonConst.JsonToData.Flooridentity));
|
|
|
} else {
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap));
|
|
|
}
|
|
@@ -2277,8 +2280,8 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2291,11 +2294,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "space_0_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
infos.add(info);
|
|
|
}
|
|
|
}
|
|
@@ -2325,9 +2328,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2340,15 +2343,15 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "space_0_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
if ("RoomFuncType".equals(code) || "ProjRoomFuncType".equals(code)) {
|
|
|
- info.put("cmpt_data", dictionaryService.queryDataSourceById(CommonConst.JsonToData.SpaceFunction));
|
|
|
+ info.put("cmpt_data", dictionaryService.queryDataSourceById(SopCommonConst.JsonToData.SpaceFunction));
|
|
|
} else {
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
|
}
|
|
@@ -2383,9 +2386,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infos = new JSONArray();
|
|
|
for(int i=0; i<infoArray.size(); i++){
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
- code = infoItem.getString(CommonConst.info_name_info_point_code);
|
|
|
- name = infoItem.getString(CommonConst.info_name_info_point_name);
|
|
|
- baseCmpt = infoItem.getString(CommonConst.info_name_info_point_baseCmpt);
|
|
|
+ code = infoItem.getString(SopCommonConst.info_name_info_point_code);
|
|
|
+ name = infoItem.getString(SopCommonConst.info_name_info_point_name);
|
|
|
+ baseCmpt = infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt);
|
|
|
boolean flag = true;
|
|
|
if(keywords != null){
|
|
|
for(String key : keywords){
|
|
@@ -2398,11 +2401,11 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
continue;
|
|
|
}
|
|
|
id = "equip"+"_" +equipType+"_"+code;
|
|
|
- if(infoPointCache.isShowInApp(id, infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ if(infoPointCache.isShowInApp(id, infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
info = new JSONObject();
|
|
|
info.put("id", id);
|
|
|
info.put("code", code);
|
|
|
- info.put("name", infoItem.getString(CommonConst.info_name_info_point_name));
|
|
|
+ info.put("name", infoItem.getString(SopCommonConst.info_name_info_point_name));
|
|
|
info.put("unit", infoItem.getString("unit"));
|
|
|
info.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(baseCmpt));
|
|
|
info.put("cmpt_data", getInfoPointCmptData(infoItem.get("dataSource"), info.getString("name"), cmptDataMap ));
|
|
@@ -2512,21 +2515,21 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
results = resultJson.getJSONArray("Content");
|
|
|
for(int i=0; i<results.size(); i++){
|
|
|
result = results.getJSONObject(i);
|
|
|
- infoDatas = result.getJSONObject(CommonConst.info_name_datas);
|
|
|
- if(infoDatas.containsKey(CommonConst.info_name_local_name_project)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_project);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_build)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_build);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_floor)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_floor);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_space)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_space);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_equip)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_equip);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_system)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_system);
|
|
|
- }else if(infoDatas.containsKey(CommonConst.info_name_local_name_shaft)){
|
|
|
- localName = infoDatas.getString(CommonConst.info_name_local_name_shaft);
|
|
|
+ infoDatas = result.getJSONObject(SopCommonConst.info_name_datas);
|
|
|
+ if(infoDatas.containsKey(SopCommonConst.info_name_local_name_project)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_project);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_build)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_build);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_floor)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_floor);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_space)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_space);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_equip)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_equip);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_system)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_system);
|
|
|
+ }else if(infoDatas.containsKey(SopCommonConst.info_name_local_name_shaft)){
|
|
|
+ localName = infoDatas.getString(SopCommonConst.info_name_local_name_shaft);
|
|
|
}
|
|
|
idNameMap.put(result.getString("id"), localName);
|
|
|
}
|
|
@@ -2580,7 +2583,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
array = array == null ? new JSONArray() : array;
|
|
|
for(int i=0; i<array.size(); i++){
|
|
|
JSONObject item = array.getJSONObject(i);
|
|
|
- map.put(item.getString("id"), item.getJSONObject(CommonConst.info_name_datas).getString(localName));
|
|
|
+ map.put(item.getString("id"), item.getJSONObject(SopCommonConst.info_name_datas).getString(localName));
|
|
|
}
|
|
|
return map;
|
|
|
}
|
|
@@ -3233,7 +3236,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
public String queryFloorInfoPointByCode(String infoPointCode) throws Exception {
|
|
|
if ("FloorIdentity".equals(infoPointCode)) {
|
|
|
//获取楼层编码数据源
|
|
|
- JSONArray jsonArray = dictionaryService.queryDataSourceById(CommonConst.JsonToData.Flooridentity);
|
|
|
+ JSONArray jsonArray = dictionaryService.queryDataSourceById(SopCommonConst.JsonToData.Flooridentity);
|
|
|
return ToolsUtil.successJsonMsg(jsonArray);
|
|
|
}
|
|
|
// 1.调用数据平台获取楼层信息点方法 http://localhost:8080/data-platform-3/infocode/query/floor
|
|
@@ -3386,7 +3389,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
String objId = clazz.getString("obj_id");
|
|
|
String objType = clazz.getString("obj_type");
|
|
|
boolean containScopeFlag = false;
|
|
|
- if (CommonConst.data_type_equip_class.equals(objType) && !StringUtil.isEmptyList(clazz, "space_scope")) {
|
|
|
+ if (SopCommonConst.data_type_equip_class.equals(objType) && !StringUtil.isEmptyList(clazz, "space_scope")) {
|
|
|
JSONObject spaceClazz = clazz.getJSONArray("space_scope").getJSONObject(0);
|
|
|
containScopeFlag = true;
|
|
|
objId = spaceClazz.getString("obj_id");
|
|
@@ -3436,7 +3439,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
JSONObject equip = (JSONObject) object;
|
|
|
id2equip.put(equip.getString("obj_id"), equip);
|
|
|
}
|
|
|
- String graphId = graphCache.getGraphIdByProjectIdAndGraph(projectId, CommonConst.graph_type_equip_in_space);
|
|
|
+ String graphId = graphCache.getGraphIdByProjectIdAndGraph(projectId, SopCommonConst.graph_type_equip_in_space);
|
|
|
for (Object object : spaceObjs) {
|
|
|
JSONObject space = (JSONObject) object;
|
|
|
String spaceId = space.getString("obj_id");
|
|
@@ -3460,9 +3463,9 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
}
|
|
|
|
|
|
private JSONArray querySpaceOrEquipByType(String projectId, String id , String type) throws Exception {
|
|
|
- if (CommonConst.data_type_equip_class.equals(type)) {
|
|
|
+ if (SopCommonConst.data_type_equip_class.equals(type)) {
|
|
|
return queryEquipByType(projectId, id);
|
|
|
- }else if (CommonConst.data_type_space_class.equals(type)) {
|
|
|
+ }else if (SopCommonConst.data_type_space_class.equals(type)) {
|
|
|
return querySpaceByType(projectId, id);
|
|
|
}
|
|
|
return new JSONArray();
|
|
@@ -4055,7 +4058,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
infoItem = infoArray.getJSONObject(i);
|
|
|
info = new JSONObject();
|
|
|
infoType = infoItem.getString("type");
|
|
|
- if(CommonConst.tag_equip.equals(infoType)){
|
|
|
+ if(SopCommonConst.tag_equip.equals(infoType)){
|
|
|
//设备大类信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -4064,7 +4067,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if(!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -4090,7 +4093,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("obj_type", "equip_class");
|
|
|
info.put("parents", parents);
|
|
|
info.put("info_point", infoPoint);
|
|
|
- }else if(CommonConst.tag_system.equals(infoType)){
|
|
|
+ }else if(SopCommonConst.tag_system.equals(infoType)){
|
|
|
//系统大类信息点
|
|
|
parents = new JSONArray();
|
|
|
infoPoint = new JSONObject();
|
|
@@ -4099,7 +4102,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
parentIds = new JSONArray();
|
|
|
parentNames = new JSONArray();
|
|
|
parentId = infoItem.getString("major");
|
|
|
- parentName = dictionaryCache.getNameByTypeCode(CommonConst.dict_type_object_domain, parentId);
|
|
|
+ parentName = dictionaryCache.getNameByTypeCode(SopCommonConst.dict_type_object_domain, parentId);
|
|
|
if(!StringUtil.isNull(parentId, parentName)) {
|
|
|
parentIds.add(parentId);
|
|
|
parentNames.add(parentName);
|
|
@@ -4122,7 +4125,7 @@ public class ObjectServiceImpl extends BaseService implements IObjectService {
|
|
|
info.put("info_point", infoPoint);
|
|
|
}
|
|
|
if(info.containsKey("info_point")
|
|
|
- && infoPointCache.isShowInApp(info.getJSONObject("info_point").getString("id"), infoItem.getString(CommonConst.info_name_info_point_baseCmpt))){
|
|
|
+ && infoPointCache.isShowInApp(info.getJSONObject("info_point").getString("id"), infoItem.getString(SopCommonConst.info_name_info_point_baseCmpt))){
|
|
|
infoPoint = info.getJSONObject("info_point");
|
|
|
infoPoint.put("cmpt", componentRelationCache.getAppComponentCodeByBaseCmptCode(infoItem.getString("inputMode")));
|
|
|
}
|