|  |  |  | 
|---|
|  |  |  | for (Map<String, Object> deviceData : minutelyData) { | 
|---|
|  |  |  | if (!ObjectUtils.isEmpty(deviceData)) { | 
|---|
|  |  |  | Map<String, Object> minutelyDataMap = new LinkedHashMap<>(); | 
|---|
|  |  |  | JSONObject jo = new JSONObject(true); | 
|---|
|  |  |  | Map<String, Object> map = new HashMap<>(); | 
|---|
|  |  |  | minutelyDataMap.put("mac", deviceData.get("mac")); | 
|---|
|  |  |  | minutelyDataMap.put("time", endTime.toString()); | 
|---|
|  |  |  | JSONArray jsonArray = new JSONArray(); | 
|---|
|  |  |  | for (String key : deviceData.keySet()) { | 
|---|
|  |  |  | if (!key.equals("mac") && !key.startsWith("M")) { | 
|---|
|  |  |  | List<Object> date = new ArrayList<>(); | 
|---|
|  |  |  | date.add(deviceData.get(key)); | 
|---|
|  |  |  | date.add(deviceData.get("MIN" + key)); | 
|---|
|  |  |  | date.add(deviceData.get("MAX" + key)); | 
|---|
|  |  |  | jo.put(key, date); | 
|---|
|  |  |  | map.put(key, date); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | jsonArray.add(jo); | 
|---|
|  |  |  | minutelyDataMap.put("json", jsonArray.get(0).toString()); | 
|---|
|  |  |  | minutelyDataMap.put("json", JSONObject.toJSONString(map)); | 
|---|
|  |  |  | minutelyDataList.add(minutelyDataMap); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|