| | |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | String dataTime = deviceData.get("DataTime").toString(); |
| | | Date time = DateUtils.getDate(dataTime, DateUtils.yyyyMMddHHmmss_EN); |
| | | String yearAndMonth = DateUtils.dateToDateString(DateUtils.addHours(time, -1), DateUtils.yyyyMM_EN); |
| | | String yearAndMonth = DateUtils.dateToDateString(DateUtils.addHours(time, -2), DateUtils.yyyyMM_EN); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:00:00"); |
| | | String format = simpleDateFormat.format(DateUtils.addHours(time, -1)); |
| | | String format = simpleDateFormat.format(DateUtils.addHours(time, -2)); |
| | | result.put("timeUnits",yearAndMonth); |
| | | result.put("mac",mac); |
| | | result.put("time",format); |