| | |
| | | HistoryAqi beforeHistoryAqi = new HistoryAqi(); |
| | | beforeHistoryAqi = historyAqiService.getHistoryApiByTimeAndGuid(guid,beforeTime); |
| | | if (!ObjectUtils.isEmpty(beforeHistoryAqi)){ |
| | | String value = beforeHistoryAqi.getValue(); |
| | | String value = beforeHistoryAqi.getJson(); |
| | | if (!ObjectUtils.isEmpty(value)){ |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject = JSONObject.parseObject(value); |
| | |
| | | HistoryAqi nowHistoryAqi = new HistoryAqi(); |
| | | nowHistoryAqi = historyAqiService.getHistoryApiByTimeAndGuid(guid,nowTime); |
| | | if (!ObjectUtils.isEmpty(nowHistoryAqi)){ |
| | | String value = nowHistoryAqi.getValue(); |
| | | String value = nowHistoryAqi.getJson(); |
| | | if (!ObjectUtils.isEmpty(value)){ |
| | | JSONObject jsonObject = JSONObject.parseObject(value); |
| | | if (!ObjectUtils.isEmpty(jsonObject.get("pm2_5"))){ |
| | |
| | | TVOCListNow.add(Double.parseDouble(jsonObject.get("a99054").toString())); |
| | | } |
| | | List<HistoryHourly> historyHourliesBefore = new ArrayList<>(); |
| | | historyHourliesBefore = historyHourlyService.getValueByMacAndTime("p5dnd7a0392252", df1.parse(beforeTime), df1.parse(df.format(beforeCalendar.getTime()) + ":00:01")); |
| | | historyHourliesBefore = historyHourlyService.getValueByMacAndTime(mac, df1.parse(beforeTime), df1.parse(df.format(beforeCalendar.getTime()) + ":00:01")); |
| | | if (!ObjectUtils.isEmpty(historyHourliesBefore) && historyHourliesBefore.size()>0){ |
| | | String value = historyHourliesBefore.get(0).getValue(); |
| | | JSONObject jsonObject = JSONObject.parseObject(value); |