| | |
| | | String yearMonthDay = sdf.format(new Date()); |
| | | History guodu = historyMapper.selectLastDataByMac(yearMonthDay, "jsxlqxpc000001"); |
| | | History baihua = historyMapper.selectLastDataByMac(yearMonthDay, "jsxlqxpc000002"); |
| | | if (!ObjectUtils.isEmpty(guodu)){ |
| | | Map<String,Object> guoduValue = JSONObject.parseObject(guodu.getValue().toString()); |
| | | JSONObject baihuaValue = JSONObject.parseObject(baihua.getValue().toString()); |
| | | guoduValue.put("mac","jsxlqxpc000001"); |
| | | baihuaValue.put("mac","jsxlqxpc000002"); |
| | | minutelyData.add(guoduValue); |
| | | } |
| | | if (!ObjectUtils.isEmpty(baihua)){ |
| | | JSONObject baihuaValue = JSONObject.parseObject(baihua.getValue().toString()); |
| | | baihuaValue.put("mac","jsxlqxpc000002"); |
| | | minutelyData.add(baihuaValue); |
| | | } |
| | | XxlJobLogger.log("RabbitMQHourlyData:" + minutelyData.size()); |
| | | if (!CollectionUtils.isEmpty(minutelyData)) { |
| | | for (Map<String, Object> deviceData : minutelyData) { |