| | |
| | | Integer start = Integer.parseInt(DateUtils.getYyyyMmDdHh(startDate)); |
| | | |
| | | Map<String, List<Map<String, Object>>> result = new HashMap<>(); |
| | | List<Map<String, Object>> warnList = qxshMapper.count7DayForWarn(start, end); |
| | | //List<Map<String, Object>> warnList = qxshMapper.count7DayForWarn(start, end); |
| | | String key = "qxshMapper.count7DayForWarn." + start + "." + end; |
| | | List<Map<String, Object>> warnList = CacheUtils.getListByKey(key); |
| | | if (null == warnList) { |
| | | warnList = qxshMapper.count7DayForWarn(start, end); |
| | | CacheUtils.putListByKey(key, warnList); |
| | | } |
| | | result.put("warningDayCount", warnList); |
| | | |
| | | List<Map<String, Object>> alarmList = qxshMapper.count7DayForAlarm(start, end); |
| | | //List<Map<String, Object>> alarmList = qxshMapper.count7DayForAlarm(start, end); |
| | | String key2 = "qxshMapper.count7DayForAlarm." + start + "." + end; |
| | | List<Map<String, Object>> alarmList = CacheUtils.getListByKey(key2); |
| | | if (null == alarmList) { |
| | | alarmList = qxshMapper.count7DayForAlarm(start, end); |
| | | CacheUtils.putListByKey(key2, alarmList); |
| | | } |
| | | result.put("alarmDayCount", alarmList); |
| | | |
| | | return result; |