lizijie
2022-09-09 33d898d8146223184fcaab82a9e16649434a1ab6
src/main/java/com/moral/task/RabbitMQInsertQiandengPark.java
@@ -176,12 +176,16 @@
            String yearMonthDay = sdf.format(new Date());
            History guodu = historyMapper.selectLastDataByMac(yearMonthDay, "jsxlqxpc000001");
            History baihua = historyMapper.selectLastDataByMac(yearMonthDay, "jsxlqxpc000002");
            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);
            minutelyData.add(baihuaValue);
            if (!ObjectUtils.isEmpty(guodu)){
                Map<String,Object> guoduValue = JSONObject.parseObject(guodu.getValue().toString());
                guoduValue.put("mac","jsxlqxpc000001");
                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) {