管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-06 f849c87a07300020dbef300c79d1eacfc1439f84
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;
@@ -150,10 +145,78 @@
        return reportMapper.selectExplorationPoints(StringHelper.getRightLike(code));
    }
    @Override
    public List<CountEntity> countDemAreaByPrj() {
        return reportMapper.countDemAreaByPrj();
    }
    @Override
    public List<CountEntity> countMptAreaByPrj() {
        return reportMapper.countMptAreaByPrj();
    }
    @Override
    public List<CountEntity> countOsgbAreaByPrj() {
        return reportMapper.countOsgbAreaByPrj();
    }
    @Override
    public List<CountEntity> countLasAreaByPrj() {
        return reportMapper.countLasAreaByPrj();
    }
    @Override
    public List<CountEntity> countSurveyWorksiteByPrj() {
        return reportMapper.countSurveyWorksiteByPrj();
    }
    @Override
    public List<CountEntity> countExplorationReportByPrj() {
        return reportMapper.countExplorationReportByPrj();
    }
    @Override
    public List<CountEntity> countCollapseByPrj() {
        return reportMapper.countCollapseByPrj();
    }
    @Override
    public List<CountEntity> countDebrisFlowByPrj() {
        return reportMapper.countDebrisFlowByPrj();
    }
    @Override
    public List<CountEntity> countGroundCollapseByPrj() {
        return reportMapper.countGroundCollapseByPrj();
    }
    @Override
    public List<CountEntity> countHighSteepSlopeByPrj() {
        return reportMapper.countHighSteepSlopeByPrj();
    }
    @Override
    public List<CountEntity> countLandSlideByPrj() {
        return reportMapper.countLandSlideByPrj();
    }
    @Override
    public List<CountEntity> countUnstableSlopeByPrj() {
        return reportMapper.countUnstableSlopeByPrj();
    }
    @Override
    public List<CountEntity> countWaterDamageByPrj() {
        return reportMapper.countWaterDamageByPrj();
    }
    /**
     * 统计钻孔点面积
     */
    private void countExplorationArea(List<CountEntity> list) {
        if (null == list) {
            return;
        }
        for (CountEntity ce : list) {
            if (0 == ce.getCount()) {
                continue;