| | |
| | |
|
| | | @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");
|
| | |
| | | //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();
|
| | |
| | | for (String sensorKey : value.keySet()) {
|
| | | resultMap.put(sensorKey, value.get(sensorKey)[2]);
|
| | | }
|
| | | resul.add(resultMap);
|
| | | resultList.add(resultMap);
|
| | | }
|
| | | // 设备 平均值
|
| | | } else {
|
| | |
| | | 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) {
|