管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-01 870e42b9961f184f9fdfafb0fb18b15640b3813d
src/main/java/com/lf/server/service/sys/ReportService.java
@@ -21,7 +21,6 @@
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
 * 报告模板
@@ -131,15 +130,11 @@
    @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;
@@ -154,6 +149,9 @@
     * 统计钻孔点面积
     */
    private void countExplorationArea(List<CountEntity> list) {
        if (null == list) {
            return;
        }
        for (CountEntity ce : list) {
            if (0 == ce.getCount()) {
                continue;