| | |
| | | } |
| | | |
| | | parameters.put("sensors1", sensorKey1); |
| | | |
| | | List<Map<String, Object>> areaList = historyMinutelyService.getAreaAvgDataByAreaCode(parameters); |
| | | if (areaList.isEmpty()) { |
| | | Integer areaCode = Integer.valueOf(request.getParameter("areaCode")); |
| | |
| | | areaMap.put("time", Integer.valueOf(time)); |
| | | } |
| | | |
| | | ArrayList<Map<String, Object>> resultList = new ArrayList<>(); |
| | | if (areaList.isEmpty()) { |
| | | resultList.addAll(monitorList); |
| | | for (Map<String, Object> map : monitorList) { |
| | | ArrayList<String> values = new ArrayList<>(); |
| | | values.add(null); |
| | | values.add(map.remove(s).toString()); |
| | | map.put("values", values); |
| | | } |
| | | return new ResultBean<List<Map<String, Object>>>(resultList); |
| | | |
| | | } |
| | | |
| | | Integer max = 0; |
| | | if (areaList.size() != 0) { |
| | | Map<String, Object> areaMap = areaList.get(areaList.size() - 1); |
| | |
| | | } else { |
| | | maxTime = max; |
| | | } |
| | | |
| | | ArrayList<Map<String, Object>> resultList = new ArrayList<>(); |
| | | |
| | | for (int i = 0; i <= maxTime; i++) { |
| | | resultList.add(null); |
| | |
| | | String resultTime = resultMap.get("time").toString(); |
| | | if (resultTime.equals(monitorTime)) { |
| | | String value = resultMap.remove(s).toString(); |
| | | String value1 = monitorMap.remove(s).toString(); |
| | | String value1 = monitorMap.get(s).toString(); |
| | | values.add(value); |
| | | values.add(value1); |
| | | resultMap.put("values", values); |
| | |
| | | resultMap.put("values", values); |
| | | } |
| | | } |
| | | |
| | | return new ResultBean<List<Map<String, Object>>>(resultList); |
| | | |
| | | } |
| | | |
| | | @GetMapping("getmpoint-byid") |
| | |
| | | } |
| | | return new ResultBean<List<Map<String, Object>>>(list); |
| | | } |
| | | |
| | | } |