管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-02-29 bc751e01e35da60e41db39501058aeddf3840ad9
src/main/java/com/lf/server/service/sys/ReportService.java
@@ -359,16 +359,17 @@
        }
        int rows = 1, allCount = 0;
        Double allSize = 0d;
        Double allSize = 0d, allArea = 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())};
            allArea += ce.getArea();
            String[] strs = new String[]{"" + rows++, ce.getM1(), "" + ce.getCount(), FileHelper.getSizes(ce.getSizes()), FileHelper.getSquareMeter(ce.getArea())};
            addList.add(strs);
        }
        if (addList.size() > 0) {
            addList.add(new String[]{"" + rows, "总计", "" + allCount, FileHelper.getSizes(allSize)});
            addList.add(new String[]{"" + rows, "总计", "" + allCount, FileHelper.getSizes(allSize), FileHelper.getSquareMeter(allArea)});
        }
        WordHelper.generateWord(source, target, null, addList);
@@ -520,12 +521,14 @@
        }
        int rows = 1, allCount = 0;
        Double allSize = 0d;
        Double allSize = 0d, allArea = 0d;
        for (CountEntity ce : list) {
            ce.setNo(rows++);
            ce.setM2(FileHelper.getSizes(ce.getSizes()));
            ce.setM3(FileHelper.getSquareMeter(ce.getArea()));
            allCount += ce.getCount();
            allSize += ce.getSizes();
            allArea += ce.getArea();
        }
        if (list.size() > 0) {
            CountEntity ce = new CountEntity();
@@ -533,6 +536,7 @@
            ce.setM1("总计");
            ce.setCount((long) allCount);
            ce.setM2(FileHelper.getSizes(allSize));
            ce.setM3(FileHelper.getSquareMeter(allArea));
            list.add(ce);
        }