| | |
| | | parameters.put("type", "month");
|
| | | parameters.put("format", "yyyy-MM");
|
| | | parameters.put("typeFormat", "%Y-%m-%d");
|
| | | parameters.put("monitorPointId", parameters.remove("monitorPoint"));
|
| | | List<Map<String, Object>> list = historyMinutelyService.getMonitorPointOrDeviceAvgData(parameters);
|
| | | String sensorKey = parameters.get("sensorKey").toString();
|
| | | for (Map<String, Object> map : list) {
|
| | | String time = map.get("time").toString();
|
| | | time = time.substring(time.length() - 2);
|
| | | map.put("time", Integer.valueOf(time));
|
| | | map.put("value", map.get(sensorKey));
|
| | | map.remove(sensorKey);
|
| | | map.put("value", map.remove(sensorKey));
|
| | | }
|
| | | return new ResultBean<List<Map<String, Object>>>(list);
|
| | | }
|