| | |
| | | Double o3 = Double.parseDouble(dataValue.get(Constants.SENSOR_CODE_O3).toString()); |
| | | |
| | | //O3数据标记位 |
| | | Object flag = dataValue.get(Constants.SENSOR_CODE_O3 + Constants.MARKER_BIT_KEY); |
| | | Object flag = dataValue.get(Constants.SENSOR_CODE_O3 + "-" + Constants.MARKER_BIT_KEY); |
| | | //剔除有效性不足的数据 |
| | | if (!Constants.MARKER_BIT_TRUE.equals(flag)) { |
| | | continue; |
| | |
| | | Map<String, Object> dataValue = JSONObject.parseObject((String) map.get("value"), Map.class); |
| | | Object wind = dataValue.get(Constants.SENSOR_CODE_WIND_DIR); |
| | | 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); |
| | | 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 ("hour".equals(type)) { |
| | | //有效值>=45个,打标记位 N,<45打H H:有效性不足 |
| | | if (size >= 45) { |
| | | result.put(Constants.SENSOR_CODE_WIND_DIR + Constants.MARKER_BIT_KEY, Constants.MARKER_BIT_TRUE); |
| | | result.put(Constants.SENSOR_CODE_WIND_DIR + "-" + Constants.MARKER_BIT_KEY, Constants.MARKER_BIT_TRUE); |
| | | } else { |
| | | result.put(Constants.SENSOR_CODE_WIND_DIR + Constants.MARKER_BIT_KEY, Constants.MARKER_BIT_FALSE); |
| | | result.put(Constants.SENSOR_CODE_WIND_DIR + "-" + Constants.MARKER_BIT_KEY, Constants.MARKER_BIT_FALSE); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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); |
| | | Object flag = dataValue.get(Constants.SENSOR_CODE_CO + "-" + Constants.MARKER_BIT_KEY); |
| | | if (!Constants.MARKER_BIT_TRUE.equals(flag)) { |
| | | continue; |
| | | } |
| | |
| | | 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); |
| | | Object flag = dataValue.get(Constants.SENSOR_CODE_O3 + "-" + Constants.MARKER_BIT_KEY); |
| | | if (!Constants.MARKER_BIT_TRUE.equals(flag)) { |
| | | continue; |
| | | } |