管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-02-26 76888937ff6070d074896675f962d20f4551cc1b
添加统计数据功能
已修改1个文件
68 ■■■■■ 文件已修改
src/main/java/com/lf/server/service/sys/ReportService.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/service/sys/ReportService.java
@@ -199,11 +199,15 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        ArrayList<String[]> addList = new ArrayList<>();
        for (CountEntity ce : list) {
            allCount += ce.getCount();
            String[] strs = new String[]{"" + rows++, ce.getM1(), ce.getM2(), ce.getCount().toString()};
            addList.add(strs);
        }
        if (addList.size() > 0) {
            addList.add(new String[]{"" + rows, "总计", " ", "" + allCount});
        }
        WordHelper.generateWord(source, target, null, addList);
@@ -218,11 +222,15 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        ArrayList<String[]> addList = new ArrayList<>();
        for (CountEntity ce : list) {
            allCount += ce.getCount();
            String[] strs = new String[]{"" + rows++, ce.getM1(), ce.getCount().toString()};
            addList.add(strs);
        }
        if (addList.size() > 0) {
            addList.add(new String[]{"" + rows, "总计", "" + allCount});
        }
        WordHelper.generateWord(source, target, null, addList);
@@ -238,10 +246,15 @@
        }
        int rows = 1;
        Double allSize = 0d;
        ArrayList<String[]> addList = new ArrayList<>();
        for (CountEntity ce : list) {
            allSize += ce.getSizes();
            String[] strs = new String[]{"" + rows++, ce.getM1(), FileHelper.getSizes(ce.getSizes())};
            addList.add(strs);
        }
        if (addList.size() > 0) {
            addList.add(new String[]{"" + rows, "总计", FileHelper.getSizes(allSize)});
        }
        WordHelper.generateWord(source, target, null, addList);
@@ -256,11 +269,17 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        Double allSize = 0d;
        ArrayList<String[]> addList = new ArrayList<>();
        for (CountEntity ce : list) {
            allSize += ce.getSizes();
            allCount += ce.getCount();
            String[] strs = new String[]{"" + rows++, ce.getM1(), "" + ce.getCount(), FileHelper.getSizes(ce.getSizes())};
            addList.add(strs);
        }
        if (addList.size() > 0) {
            addList.add(new String[]{"" + rows, "总计", "" + allCount, FileHelper.getSizes(allSize)});
        }
        WordHelper.generateWord(source, target, null, addList);
@@ -275,9 +294,17 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        for (CountEntity ce : list) {
            ce.setNo(rows++);
            allCount += ce.getCount();
        }
        if (list.size() > 0) {
            CountEntity ce = new CountEntity();
            ce.setNo(rows);
            ce.setM1("总计");
            ce.setCount((long) allCount);
            list.add(ce);
        }
        Map<String, List<CountEntity>> map = new HashMap<>(1);
@@ -295,9 +322,17 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        for (CountEntity ce : list) {
            ce.setNo(rows++);
            allCount += ce.getCount();
        }
        if (list.size() > 0) {
            CountEntity ce = new CountEntity();
            ce.setNo(rows);
            ce.setM1("总计");
            ce.setCount((long) allCount);
            list.add(ce);
        }
        Map<String, List<CountEntity>> map = new HashMap<>(1);
@@ -316,9 +351,18 @@
        }
        int rows = 1;
        Double allSize = 0d;
        for (CountEntity ce : list) {
            ce.setNo(rows++);
            ce.setM2(FileHelper.getSizes(ce.getSizes()));
            allSize += ce.getSizes();
        }
        if (list.size() > 0) {
            CountEntity ce = new CountEntity();
            ce.setNo(rows);
            ce.setM1("总计");
            ce.setM2(FileHelper.getSizes(allSize));
            list.add(ce);
        }
        Map<String, List<CountEntity>> map = new HashMap<>(1);
@@ -336,9 +380,21 @@
            return;
        }
        int rows = 1;
        int rows = 1, allCount = 0;
        Double allSize = 0d;
        for (CountEntity ce : list) {
            ce.setNo(rows++);
            ce.setM2(FileHelper.getSizes(ce.getSizes()));
            allCount += ce.getCount();
            allSize += ce.getSizes();
        }
        if (list.size() > 0) {
            CountEntity ce = new CountEntity();
            ce.setNo(rows);
            ce.setM1("总计");
            ce.setCount((long) allCount);
            ce.setM2(FileHelper.getSizes(allSize));
            list.add(ce);
        }
        Map<String, List<CountEntity>> map = new HashMap<>(1);