| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 报告模板 |
| | |
| | | @Override |
| | | public List<CountEntity> countExplorationPoints() { |
| | | String key = RedisCacheKey.dataCountKey("countExplorationPoints"); |
| | | Object obj = redisService.get(key); |
| | | if (obj instanceof List<?>) { |
| | | return (List<CountEntity>) obj; |
| | | } |
| | | |
| | | List<CountEntity> list = reportMapper.countExplorationPoints(); |
| | | if (null != list && list.size() > 0) { |
| | | List<CountEntity> list = redisService.getListByKey(key); |
| | | if (null == list) { |
| | | list = reportMapper.countExplorationPoints(); |
| | | countExplorationArea(list); |
| | | redisService.put(key, list, StaticData.I2, TimeUnit.MINUTES); |
| | | redisService.saveListByKey(key, list, StaticData.I2); |
| | | } |
| | | |
| | | return list; |
| | |
| | | * 统计钻孔点面积 |
| | | */ |
| | | private void countExplorationArea(List<CountEntity> list) { |
| | | if (null == list) { |
| | | return; |
| | | } |
| | | for (CountEntity ce : list) { |
| | | if (0 == ce.getCount()) { |
| | | continue; |