Browse Source

报警类型改用

menglu 3 years ago
parent
commit
795447acae

+ 1 - 1
ibms-data-sdk/src/main/java/com/persagy/ibms/data/sdk/service/rest/RestUtil.java

@@ -351,7 +351,7 @@ public class RestUtil {
 			ibmsSceneCode = queryObj.getString("ibmsSceneCode");
 			ibmsClassCode = queryObj.getString("ibmsClassCode");
 			String classCode = queryObj.getString("字典编码");
-			Map datas = ExeclReadEquipStaticInfoUtil.ReadEquipStaticInfoById(ibmsSceneCode, ibmsClassCode, classCode, null);
+			Map<String, JSONArray> datas = ExeclReadEquipStaticInfoUtil.ReadEquipStaticInfoById(ibmsSceneCode, ibmsClassCode, classCode, null);
 			result.put("Content", datas);
 			result.put("Result", "success");
 

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

@@ -473,21 +473,22 @@ public class RWDDownloadUtil {
 		{
 			Map<String, String> alarmTypeMap = new ConcurrentHashMap<String, String>();
 			if (Constant.alarm_service_name.equalsIgnoreCase("ibms-alarm")) {
-				boolean use_group = true;
-				if (use_group) {
-					String post_result = HttpClientUtil.instance("alarm")
-							.get(Constant.alarm_url + "/alarm-record/selectItemGroupCode" + "?appId=" + "0" + "&userId=" + "systemId" + "&projectId="
-									+ RepositoryContainer.RepositoryProject.projectId + "&groupCode="
-									+ RepositoryContainer.RepositoryProject.groupCode);
-					JSONObject resultJSON = JSON.parseObject(post_result);
-					JSONArray Content = resultJSON.getJSONArray("Item");
-					for (int ii = 0; ii < Content.size(); ii++) {
-						JSONObject ContentItem = Content.getJSONObject(ii);
-						String itemCode = ContentItem.getString("itemGroupCode");
-						String name = ContentItem.getString("itemGroupName");
-						alarmTypeMap.put(itemCode, name);
-					}
-				} else {
+				// boolean use_group = false;
+				// if (use_group) {
+				// String post_result = HttpClientUtil.instance("alarm")
+				// .get(Constant.alarm_url + "/alarm-record/selectItemGroupCode" + "?appId=" + "0" + "&userId=" + "systemId" + "&projectId="
+				// + RepositoryContainer.RepositoryProject.projectId + "&groupCode="
+				// + RepositoryContainer.RepositoryProject.groupCode);
+				// JSONObject resultJSON = JSON.parseObject(post_result);
+				// JSONArray Content = resultJSON.getJSONArray("Item");
+				// for (int ii = 0; ii < Content.size(); ii++) {
+				// JSONObject ContentItem = Content.getJSONObject(ii);
+				// String itemCode = ContentItem.getString("itemGroupCode");
+				// String name = ContentItem.getString("itemGroupName");
+				// alarmTypeMap.put(itemCode, name);
+				// }
+				// } else
+				{
 					for (int i = 0; i < classArray.size(); i++) {
 						JSONObject classItem = classArray.getJSONObject(i);
 						String ibmsSceneCode = classItem.getString("ibmsSceneCode");