From 5586964c3e63f95c9e460a6a3d85d7dca408e096 Mon Sep 17 00:00:00 2001
From: kaiyu <404897439@qq.com>
Date: Mon, 18 Oct 2021 14:35:39 +0800
Subject: [PATCH] Merge branch 'dev' of http://blit.7drlb.com:8888/r/moral into dev

---
 screen-common/src/main/java/com/moral/util/AmendUtils.java |   31 +++++++++++++------------------
 1 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/screen-common/src/main/java/com/moral/util/AmendUtils.java b/screen-common/src/main/java/com/moral/util/AmendUtils.java
index 1f08009..ff1ede5 100644
--- a/screen-common/src/main/java/com/moral/util/AmendUtils.java
+++ b/screen-common/src/main/java/com/moral/util/AmendUtils.java
@@ -172,8 +172,11 @@
             Object speed = dataValue.get(Constants.SENSOR_CODE_WIND_SPEED);
             Object flagDir = dataValue.get(Constants.SENSOR_CODE_WIND_DIR + "-" + Constants.MARKER_BIT_KEY);
             Object flagSpeed = dataValue.get(Constants.SENSOR_CODE_WIND_SPEED + "-" + Constants.MARKER_BIT_KEY);
-            if (!Constants.MARKER_BIT_TRUE.equals(flagDir) || !Constants.MARKER_BIT_TRUE.equals(flagSpeed)) {
-                continue;
+
+            if (!ObjectUtils.isEmpty(flagDir) && !ObjectUtils.isEmpty(flagSpeed)) {
+                if (!Constants.MARKER_BIT_TRUE.equals(flagDir) || !Constants.MARKER_BIT_TRUE.equals(flagSpeed)) {
+                    continue;
+                }
             }
 
             if (ObjectUtils.isEmpty(wind) || ObjectUtils.isEmpty(speed)) {
@@ -184,25 +187,25 @@
 
             //���������������������������������������������������
             if (!ObjectUtils.isEmpty(windDirUpper)) {
-                if (windDir < (Double) windDirUpper) {
+                if (windDir > (Double) windDirUpper) {
                     continue;
                 }
             }
 
             if (!ObjectUtils.isEmpty(windDirLower)) {
-                if (windDir > (Double) windDirLower) {
+                if (windDir < (Double) windDirLower) {
                     continue;
                 }
             }
 
             if (!ObjectUtils.isEmpty(windSpeedUpper)) {
-                if (windSpeed < (Double) windSpeedUpper) {
+                if (windSpeed > (Double) windSpeedUpper) {
                     continue;
                 }
             }
 
             if (!ObjectUtils.isEmpty(windSpeedLower)) {
-                if (windSpeed > (Double) windSpeedLower) {
+                if (windSpeed < (Double) windSpeedLower) {
                     continue;
                 }
             }
@@ -271,22 +274,18 @@
         for (Map<String, Object> dataMap : list) {
             Map<String, Object> dataValue = JSONObject.parseObject((String) dataMap.get("value"), Map.class);
             Object o = dataValue.get(Constants.SENSOR_CODE_CO);
-            Object flag = dataValue.get(Constants.SENSOR_CODE_CO + "-" + Constants.MARKER_BIT_KEY);
-            if (!Constants.MARKER_BIT_TRUE.equals(flag)) {
-                continue;
-            }
             if (ObjectUtils.isEmpty(o)) {
                 continue;
             }
             Double co = Double.parseDouble(o.toString());
             //������������������������������
             if (!ObjectUtils.isEmpty(upper)) {
-                if (co < (Double) upper) {
+                if (co > (Double) upper) {
                     continue;
                 }
             }
             if (!ObjectUtils.isEmpty(lower)) {
-                if (co > (Double) upper) {
+                if (co < (Double) lower) {
                     continue;
                 }
             }
@@ -309,22 +308,18 @@
         for (Map<String, Object> dataMap : list) {
             Map<String, Object> dataValue = JSONObject.parseObject((String) dataMap.get("value"), Map.class);
             Object o = dataValue.get(Constants.SENSOR_CODE_O3);
-            Object flag = dataValue.get(Constants.SENSOR_CODE_O3 + "-" + Constants.MARKER_BIT_KEY);
-            if (!Constants.MARKER_BIT_TRUE.equals(flag)) {
-                continue;
-            }
             if (ObjectUtils.isEmpty(o)) {
                 continue;
             }
             Double o3 = Double.parseDouble(o.toString());
             //������������������������������
             if (!ObjectUtils.isEmpty(upper)) {
-                if (o3 < (Double) upper) {
+                if (o3 > (Double) upper) {
                     continue;
                 }
             }
             if (!ObjectUtils.isEmpty(lower)) {
-                if (o3 > (Double) upper) {
+                if (o3 < (Double) lower) {
                     continue;
                 }
             }

--
Gitblit v1.8.0