xufenglei
2018-03-12 6a1b28591ebe95ed9f26810fbf9677da5c87692d
src/main/java/com/moral/service/impl/HistoryMinutelyServiceImpl.java
@@ -264,7 +264,7 @@
   
   @Override
   public List<Map<String, Object>> getMonitorPointOrDeviceAvgData(Map<String, Object> parameters) throws Exception {
      List<Map<String, Object>> resul ;
      List<Map<String, Object>> resultList ;
      String type = (String) parameters.get("type");
      String time = (String) parameters.get("time");
@@ -301,7 +301,7 @@
      //sensorKeys.clear();
      // 监控点平均值
      if (!parameters.containsKey("mac")) {
         resul = new ArrayList<Map<String,Object>>();
         resultList = new ArrayList<Map<String,Object>>();
         Integer monitorPointId = Integer.valueOf(parameters.get("monitorPoint").toString());
         List<Map<String, Object>> deviceVersions = deviceMapper.getDeviceVersionIdByMonitorPoint(monitorPointId);
         ExecutorService threadPool = Executors.newCachedThreadPool();
@@ -366,7 +366,7 @@
            for (String sensorKey : value.keySet()) {
               resultMap.put(sensorKey, value.get(sensorKey)[2]);
            }
            resul.add(resultMap);
            resultList.add(resultMap);
         }
      // 设备 平均值   
      } else {
@@ -381,9 +381,9 @@
            parameters.put("sensorKeyColumn", sensorKeyColumn);
            
         }
         resul = historyMinutelyMapper.getMonitorPointOrDeviceAvgData(parameters);
         resultList = historyMinutelyMapper.getMonitorPointOrDeviceAvgData(parameters);
      }
      return resul;
      return resultList;
   }
   private String getSensorKeyColumnBySensors(List<Map<String, Object>> sensors,Map<String, Object> parameters) {