月球大数据地理空间分析展示平台-【后端】-月球后台服务
1
13693261870
2024-11-17 796b44ea813a1133beae4f3a67f1c0263510c0c7
src/main/java/com/moon/server/service/sys/ReportService.java
@@ -16,11 +16,8 @@
import java.io.File;
import java.util.*;
/**
 * 报告模板
 * @author WWW
 */
@Service
@SuppressWarnings("ALL")
public class ReportService implements ReportMapper {
    @Autowired
    ReportMapper reportMapper;
@@ -94,6 +91,11 @@
    }
    @Override
    public List<CountEntity> countSizesByType() {
        return reportMapper.countSizesByType();
    }
    @Override
    public List<CountEntity> countServices() {
        return reportMapper.countServices();
    }
@@ -103,9 +105,11 @@
        return reportMapper.countOperates();
    }
    /**
     * 创建报告
     */
    @Override
    public List<CountEntity> countSizesByPrj() {
        return reportMapper.countSizesByPrj();
    }
    public void createReport(UserEntity ue, ReportEntity re, HttpServletResponse res) throws Exception {
        AttachEntity ae = attachService.selectByGuid(re.getGuid());
        if (null == ae) {
@@ -134,9 +138,6 @@
        }
    }
    /**
     * 生成报告
     */
    private void generateReport(String source, String target, ReportEntity re) {
        if (StaticData.S1.equals(re.getType())) {
            switch (re.getCode()) {
@@ -169,9 +170,6 @@
        }
    }
    /**
     * 创建 用户流量统计 Word
     */
    public void createCountOperatesWord(String source, String target) {
        List<CountEntity> list = countOperates();
        if (null == list || list.isEmpty()) {
@@ -188,9 +186,6 @@
        WordHelper.generateWord(source, target, null, addList);
    }
    /**
     * 创建 服务调用量统计 Word
     */
    public void createCountServicesWord(String source, String target) {
        List<CountEntity> list = countServices();
        if (null == list || list.isEmpty()) {
@@ -207,9 +202,6 @@
        WordHelper.generateWord(source, target, null, addList);
    }
    /**
     * 创建 数据量统计 Word
     */
    public void createCountSizesWord(String source, String target) {
        List<CountEntity> list = countSizes();
        if (null == list || list.isEmpty()) {
@@ -226,9 +218,6 @@
        WordHelper.generateWord(source, target, null, addList);
    }
    /**
     * 创建 用户流量统计 Excel
     */
    public void createCountOperatesExcel(String source, String target) {
        List<CountEntity> list = countOperates();
        if (null == list || list.isEmpty()) {
@@ -246,9 +235,6 @@
        ExcelHelper.writeToTemplate(source, target, map);
    }
    /**
     * 创建 服务调用量统计 Excel
     */
    public void createCountServicesExcel(String source, String target) {
        List<CountEntity> list = countServices();
        if (null == list || list.isEmpty()) {
@@ -266,9 +252,6 @@
        ExcelHelper.writeToTemplate(source, target, map);
    }
    /**
     * 创建 数据量统计 Excel
     */
    public void createCountSizesExcel(String source, String target) {
        List<CountEntity> list = countSizes();
        if (null == list || list.isEmpty()) {
@@ -287,9 +270,6 @@
        ExcelHelper.writeToTemplate(source, target, map);
    }
    /**
     * 获取下载实体类
     */
    private DownloadEntity getDownloadEntity(UserEntity ue, String file) {
        DownloadEntity de = new DownloadEntity();
        de.setName(FileHelper.getFileName(file));