| | |
| | | import com.moral.api.entity.HandDevice; |
| | | import com.moral.api.entity.HistoryFiveMinutely; |
| | | import com.moral.api.entity.HistoryHourly; |
| | | import com.moral.api.entity.HistoryMinutely; |
| | | import com.moral.api.mapper.DeviceMapper; |
| | | import com.moral.api.mapper.HandDeviceMapper; |
| | | import com.moral.api.pojo.query.handdevice.HandDevicePageCond; |
| | |
| | | map.put("a21028",ObjectUtils.isEmpty(map.get("a21028"))?0:map.get("a21028")); |
| | | rsMap.add(map); |
| | | } |
| | | }else { |
| | | }else if (type.equals("minute")){ |
| | | List<HistoryMinutely> historyMinutelys = historyHourlyService.getHistoryMinutely(mac, startDate, endDate); |
| | | for (HistoryMinutely historyMinutely : historyMinutelys) { |
| | | String value = historyMinutely.getValue(); |
| | | Map map = JSON.parseObject(value, Map.class); |
| | | map.put("time",DateUtils.dateToDateString(historyMinutely.getTime())); |
| | | map.put("a21001",ObjectUtils.isEmpty(map.get("a21001"))?0:map.get("a21001")); |
| | | map.put("a21028",ObjectUtils.isEmpty(map.get("a21028"))?0:map.get("a21028")); |
| | | rsMap.add(map); |
| | | } |
| | | }else if (type.equals("minutely")){ |
| | | List<HistoryFiveMinutely> historyFiveMinutelies = historyFiveMinutelyService.queryFiveMinutely(mac, startDate, endDate); |
| | | for (HistoryFiveMinutely historyFiveMinutely : historyFiveMinutelies) { |
| | | String value = historyFiveMinutely.getValue(); |