소스 검색

bug修复

wangb 2 달 전
부모
커밋
ec6e24e463
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

+ 6 - 0
generationXK-service/src/main/java/com/gyee/generation/util/realtimesource/EdosUtil.java

@@ -778,6 +778,12 @@ public class EdosUtil implements IEdosUtil {
                         continue;
                     // 根据key获得value, value也可以是JSONObject,JSONArray,使用对应的参数接收即可
                     JSONObject jsonData = jsonObject.getJSONObject(key);
+                    if (null == jsonData) {
+                        pointData.setPointTime(System.currentTimeMillis());
+                        pointData.setPointValueInDouble(0.0);
+                        pointData.setPointName(key);
+                        continue;
+                    }
                     Long ts = jsonData.getLong("ts");
                     pointData.setPointTime(ts);
                     String pointValue = null;