menglu 3 роки тому
батько
коміт
495bdeb629

+ 6 - 6
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/Constant.java

@@ -35,8 +35,8 @@ public class Constant {
 	public static long compute_thread_sdv_interval;
 
 	public static String sdk_version;
-	public static String rwd_url;
-	public static boolean rwd_compress = false;
+	public static String zkt_dmp_url;
+	public static boolean zkt_dmp_compress = false;
 	public static String zkt_monitor_url;
 	public static boolean zkt_monitor_compress;
 	public static String zkt_control_url;
@@ -112,12 +112,12 @@ public class Constant {
 					element = (Element) iter.next();
 					sdk_version = element.getText();
 				}
-				iter = document.selectNodes("/root/rwd").iterator();
+				iter = document.selectNodes("/root/zkt_dmp").iterator();
 				if (iter.hasNext()) {
 					element = (Element) iter.next();
-					rwd_url = element.attribute("url").getValue();
-					rwd_url = StrUtil.removeSuffix(rwd_url, "/");
-					rwd_compress = element.attribute("compress").getValue().equalsIgnoreCase("true");
+					zkt_dmp_url = element.attribute("url").getValue();
+					zkt_dmp_url = StrUtil.removeSuffix(zkt_dmp_url, "/");
+					zkt_dmp_compress = element.attribute("compress").getValue().equalsIgnoreCase("true");
 				}
 				iter = document.selectNodes("/root/zkt_monitor").iterator();
 				if (iter.hasNext()) {

+ 1 - 1
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/HttpClientUtil.java

@@ -108,7 +108,7 @@ public class HttpClientUtil {
 	}
 
 	public synchronized String post_compress(String url, String content) throws Exception {
-		if (Constant.rwd_compress) {
+		if (Constant.zkt_dmp_compress) {
 			String resultOri = post(url + "&compress=true", content);
 			String result = GZIPCompressUtil.unzipBase64(resultOri);
 			return result;

+ 8 - 8
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDDownloadUtil.java

@@ -81,7 +81,7 @@ public class RWDDownloadUtil {
 
 		JSONArray InfoPointListArray = new JSONArray();
 		JSONArray InfoPointRelationArray = new JSONArray();
-		Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(Constant.getStream("new-info-point.xlsx"), true);
+		Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(Constant.getStream("info-point-new.xlsx"), true);
 		for (String sheetName : sheetMap.keySet()) {
 			ExcelSheet sheet = sheetMap.get(sheetName);
 			for (int i = 1; i < sheet.contentListList.size(); i++) {
@@ -232,7 +232,7 @@ public class RWDDownloadUtil {
 			JSONObject param = new JSONObject();
 			JSONObject criteria = new JSONObject();
 			param.put("criteria", criteria);
-			String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.rwd_url + "/rwd/def/class?projectId="
+			String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.zkt_dmp_url + "/rwd/def/class?projectId="
 					+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 					param.toJSONString());
 			JSONObject resultJSON = JSON.parseObject(post_result);
@@ -253,7 +253,7 @@ public class RWDDownloadUtil {
 				criteria.put("classCode", code);
 				param.put("criteria", criteria);
 				log.debug("Download info " + code);
-				String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.rwd_url + "/rwd/def/funcid?projectId="
+				String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.zkt_dmp_url + "/rwd/def/funcid?projectId="
 						+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 						param.toJSONString());
 				JSONObject resultJSON = JSON.parseObject(post_result);
@@ -293,7 +293,7 @@ public class RWDDownloadUtil {
 				criteria.put("valid", 1);
 				param.put("criteria", criteria);
 				log.debug("Download object " + code);
-				String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.rwd_url + "/rwd/instance/object/query?projectId="
+				String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.zkt_dmp_url + "/rwd/instance/object/query?projectId="
 						+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 						param.toJSONString());
 				JSONObject resultJSON = JSON.parseObject(post_result);
@@ -328,7 +328,7 @@ public class RWDDownloadUtil {
 					criteria.put("relCode", relCode);
 					param.put("criteria", criteria);
 					log.debug("Download relation " + graphCode + " " + relCode);
-					String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.rwd_url + "/rwd/instance/relation/query?projectId="
+					String post_result = HttpClientUtil.instance("rwd").post_compress(Constant.zkt_dmp_url + "/rwd/instance/relation/query?projectId="
 							+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 							param.toJSONString());
 					JSONObject resultJSON = JSON.parseObject(post_result);
@@ -413,7 +413,7 @@ public class RWDDownloadUtil {
 			pathInner.add("产品模块");
 			JSONObject param = new JSONObject();
 			param.put("path", pathInner);
-			String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.rwd_url + "/post?projectId="
+			String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.zkt_dmp_url + "/post?projectId="
 					+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 					param.toJSONString());
 			sceneArray = JSON.parseArray(post_result);
@@ -425,7 +425,7 @@ public class RWDDownloadUtil {
 			JSONObject criteria = new JSONObject();
 			criteria.put("ibms", true);
 			param.put("criteria", criteria);
-			String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.rwd_url + "/rwd/def/class?projectId="
+			String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.zkt_dmp_url + "/rwd/def/class?projectId="
 					+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 					param.toJSONString());
 			JSONObject resultJSON = JSON.parseObject(post_result);
@@ -448,7 +448,7 @@ public class RWDDownloadUtil {
 				criteria.put("ibmsClassCode", ibmsClassCode);
 				param.put("criteria", criteria);
 				log.debug("Download object " + ibmsSceneCode + "-" + ibmsClassCode);
-				String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.rwd_url + "/rwd/instance/object/query?projectId="
+				String post_result = HttpClientUtil.instance("zkt_dmp").post_compress(Constant.zkt_dmp_url + "/rwd/instance/object/query?projectId="
 						+ RepositoryContainer.RepositoryProject.projectId + "&groupCode=" + RepositoryContainer.RepositoryProject.groupCode,
 						param.toJSONString());
 				JSONObject resultJSON = JSON.parseObject(post_result);

+ 1 - 1
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/util/RWDLoadUtil.java

@@ -958,7 +958,7 @@ public class RWDLoadUtil {
 		{
 			JSONArray InfoPointListArray = new JSONArray();
 			JSONArray InfoPointRelationArray = new JSONArray();
-			Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(validPath + Constant.getSeperator() + "info-point.xlsx", true);
+			Map<String, ExcelSheet> sheetMap = ExcelCommonUtil.Read(Constant.getStream("info-point-old.xlsx"), true);
 			for (String sheetName : sheetMap.keySet()) {
 				ExcelSheet sheet = sheetMap.get(sheetName);
 				for (int i = 0; i < sheet.contentListList.size(); i++) {

+ 11 - 7
ibms-data-sdk/src/main/resources/config.xml

@@ -6,13 +6,15 @@
 	<groupCode>WD</groupCode>
 	<projectId>Pj4403070003</projectId>
 	<sdk_version>SDK-D</sdk_version>
-	<!-- zkt-dmp的服务地址 -->
-	<rwd url="http://192.168.100.33:9976/" compress="true" />
+	
 	<config path="D-config" refresh_enable="true" refresh_interval_second="60" />
 	<physical_world path="D-physical_world" refresh_enable="true" refresh_interval_second="3600" />
 	<zkt_physical_world path="D-zkt_physical_world" enable="true" refresh_enable="true" refresh_interval_second="3600" />
 	<ibms_physical_world path="D-ibms_physical_world" enable="true" refresh_enable="true" refresh_interval_second="60" />
-	<info_point path="D-info-point" enable="true" version="old" refresh_enable="true" refresh_interval_second="60" />
+	<info_point path="D-info-point" enable="true" version="new" refresh_enable="true" refresh_interval_second="60" />
+	
+	<!-- zkt-dmp的服务地址 -->
+	<zkt_dmp url="http://192.168.100.33:9976/" compress="true" />
 	<!-- zkt-monitor的服务地址 -->
 	<zkt_monitor url="http://192.168.100.33:9909/zkt-monitor/" compress="false" />
 	<!-- zkt-control的服务地址 -->
@@ -21,16 +23,12 @@
 	<iot_collect url="http://192.168.100.33:9909/iot-collect/" />
 	<!-- iot-project的websocket地址 -->
 	<iot_websocket url="ws://192.168.100.33:8858/websocket" />
-	<!-- <iot_websocket url="ws://localhost:8858/websocket" /> -->
 	<!-- iot-project的服务地址 -->
 	<iot_project url="http://192.168.100.33:9909/iot-project/" />
-	<!-- <iot_project url="http://localhost:7101/" /> -->
 	<!-- adm-project的服务地址 -->
 	<adm_project url="http://39.102.40.239:28888/" />
 	<!-- 报警的websocket地址、url服务地址、 service_name服务名(旧版本是zkt-alarm;新版本是ibms-alarm) -->
-	<!-- <alarm enable="true" websocket="ws://192.168.100.33:9909/webSocketServer" url="http://192.168.100.33:9909/zkt-alarm/" service_name="zkt-alarm" /> -->
 	<alarm enable="true" websocket="ws://192.168.100.76:8870/webSocketServer" url="http://192.168.100.33:9909/ibms-alarm/" service_name="ibms-alarm" />
-	<!-- <alarm enable="true" websocket="http://39.102.43.179:9993/webSocketServer" url="http://39.102.43.179:9993/" service_name="ibms-alarm" /> -->
 
 	<!-- 场景/产品模块编码与后台tab页名称的对应关系 -->
 	<SceneCode2TabName sceneCode="ggzm" tabName="公共照明" />
@@ -40,10 +38,16 @@
 	<info_replace objType="building" from="localName" to="ibmsxianshimingcheng" />
 	<info_replace objType="floor" from="localId" to="ibmsxianshibianma" />
 	<info_replace objType="floor" from="localName" to="ibmsxianshimingcheng" />
+	<info_replace objType="space" from="localId" to="ibmsxianshibianma" />
+	<info_replace objType="space" from="localName" to="ibmsxianshimingcheng" />
+	<info_replace objType="equipment" from="localId" to="ibmsxianshibianma" />
+	<info_replace objType="equipment" from="localName" to="ibmsxianshimingcheng" />
+	<!--
 	<info_replace objType="space" from="wD_huiyunbendibianma" to="ibmsxianshibianma" />
 	<info_replace objType="space" from="wD_huiyunbendimingcheng" to="ibmsxianshimingcheng" />
 	<info_replace objType="equipment" from="wD_huiyunbendibianma" to="ibmsxianshibianma" />
 	<info_replace objType="equipment" from="wD_huiyunbendimingcheng" to="ibmsxianshimingcheng" />
+	-->
 
 	<!-- 数据中台物理世界对象初始加载的关系,供SDK配置中使用 -->
 	<ConfigRelation graphCode="ArchSubset" relCode="Bd2Fl" objFrom="building" objTo="floor" nameInTo="所属建筑" multiplicityTo="1" />

ibms-data-sdk/src/main/resources/new-info-point.xlsx → ibms-data-sdk/src/main/resources/info-point-new.xlsx


BIN
ibms-data-sdk/src/main/resources/info-point-old.xlsx