Browse Source

当iot变损、总支不平衡率大于100%时,后端将这两个数据处理为null

lixing 2 years ago
parent
commit
ab6c8af65d

+ 5 - 3
src/main/java/com/persagy/apm/report/dependencies/iotdataanalysis/service/impl/IDataAnalysisWebServiceImpl.java

@@ -49,7 +49,11 @@ public class IDataAnalysisWebServiceImpl implements IDataAnalysisWebService {
                 if (CollectionUtils.isNotEmpty(content)) {
                     Map data = content.get(0);
                     if (null != data) {
-                        return DataUtils.parseDouble(data.get(targetCode));
+                        Double targetValue = DataUtils.parseDouble(data.get(targetCode));
+                        if (Math.abs(targetValue) > 100) {
+                            targetValue = null;
+                        }
+                        return targetValue;
                     }
                 }
             }
@@ -58,6 +62,4 @@ public class IDataAnalysisWebServiceImpl implements IDataAnalysisWebService {
         }
         return null;
     }
-
-
 }